diff options
| author | 2026-05-04 21:04:52 +0000 | |
|---|---|---|
| committer | 2026-05-08 11:38:10 -0700 | |
| commit | 843064b0a77eed3d6d63ffc53aeaa359672b4e12 (patch) | |
| tree | 01444c3d6f6c45aca6dd30a8ea85efa3bf723d13 /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | bpf: tcp: Fix type confusion in bpf_skc_to_tcp_sock(). (diff) | |
bpf: tcp: Fix type confusion in bpf_skc_to_tcp6_sock().
bpf_skc_to_tcp6_sock() only checks if sk->sk_protocol is IPPROTO_TCP
and sk->sk_family is AF_INET6, but RAW socket can bypass it:
socket(AF_INET6, SOCK_RAW, IPPROTO_TCP)
Let's check sk->sk_type too.
Fixes: af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20260504210610.180150-6-kuniyu@google.com
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
