diff options
| author | Alexei Starovoitov <[email protected]> | 2024-04-27 00:25:44 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2024-04-29 21:16:41 +0000 |
| commit | 0db63c0b86e981a1e97d2596d64ceceba1a5470e (patch) | |
| tree | d7e6ddaca356bbd5069fe7a5a8aab2cfa0fe97d7 /tools/testing/selftests/bpf/prog_tests/cgroup1_hierarchy.c | |
| parent | Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf... (diff) | |
| download | kernel-0db63c0b86e981a1e97d2596d64ceceba1a5470e.tar.gz kernel-0db63c0b86e981a1e97d2596d64ceceba1a5470e.zip | |
bpf: Fix verifier assumptions about socket->sk
The verifier assumes that 'sk' field in 'struct socket' is valid
and non-NULL when 'socket' pointer itself is trusted and non-NULL.
That may not be the case when socket was just created and
passed to LSM socket_accept hook.
Fix this verifier assumption and adjust tests.
Reported-by: Liam Wisehart <[email protected]>
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Fixes: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/cgroup1_hierarchy.c')
0 files changed, 0 insertions, 0 deletions
