diff options
author | Hou Tao <houtao1@huawei.com> | 2022-11-21 15:34:40 +0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-11-21 17:40:42 +0100 |
commit | 8589e92675aa4727bede3f9230709624619844f3 (patch) | |
tree | 0d15145fcf37e6140896fc1067e7da657872e71a /net | |
parent | 2a42461a88314bbeaa3dcad3d19a4bb3d9aa546f (diff) | |
download | linux-stable-8589e92675aa4727bede3f9230709624619844f3.tar.gz linux-stable-8589e92675aa4727bede3f9230709624619844f3.tar.bz2 linux-stable-8589e92675aa4727bede3f9230709624619844f3.zip |
selftests/bpf: Add test for cgroup iterator on a dead cgroup
The test closes both iterator link fd and cgroup fd, and removes the
cgroup file to make a dead cgroup before reading from cgroup iterator.
It also uses kern_sync_rcu() and usleep() to wait for the release of
start cgroup. If the start cgroup is not pinned by cgroup iterator,
reading from iterator fd will trigger use-after-free.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Hao Luo <haoluo@google.com>
Link: https://lore.kernel.org/bpf/20221121073440.1828292-4-houtao@huaweicloud.com
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions