================================================================== BUG: KCSAN: data-race in __bpf_get_stackid / bcmp write to 0xffff8881627f10d0 of 152 bytes by task 21267 on cpu 1: __bpf_get_stackid+0x737/0x7d0 kernel/bpf/stackmap.c:311 ____bpf_get_stackid kernel/bpf/stackmap.c:344 [inline] bpf_get_stackid+0xf3/0x130 kernel/bpf/stackmap.c:323 ____bpf_get_stackid_raw_tp kernel/trace/bpf_trace.c:1628 [inline] bpf_get_stackid_raw_tp+0xf6/0x120 kernel/trace/bpf_trace.c:1617 bpf_prog_53f0063d4d7f65ce+0x2a/0x32 bpf_dispatcher_nop_func include/linux/bpf.h:1376 [inline] __bpf_prog_run include/linux/filter.h:723 [inline] bpf_prog_run include/linux/filter.h:730 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline] bpf_trace_run2+0x107/0x1d0 kernel/trace/bpf_trace.c:2116 __do_trace_kfree include/trace/events/kmem.h:97 [inline] trace_kfree include/trace/events/kmem.h:97 [inline] kfree+0x353/0x3c0 mm/slub.c:6863 netlbl_secattr_free include/net/netlabel.h:400 [inline] selinux_netlbl_sk_security_free+0x18b/0x1d0 security/selinux/netlabel.c:162 selinux_sk_free_security+0x3a/0x50 security/selinux/hooks.c:5441 security_sk_free+0x65/0x80 security/security.c:4409 sk_prot_free net/core/sock.c:2277 [inline] __sk_destruct+0x3cd/0x500 net/core/sock.c:2384 sk_destruct net/core/sock.c:2412 [inline] __sk_free+0x227/0x270 net/core/sock.c:2423 sk_free+0x39/0x80 net/core/sock.c:2434 sock_put include/net/sock.h:1998 [inline] tcp_close+0x8d/0xd0 net/ipv4/tcp.c:3303 inet_release+0xce/0xf0 net/ipv4/af_inet.c:437 inet6_release+0x3e/0x60 net/ipv6/af_inet6.c:487 __sock_release net/socket.c:662 [inline] sock_close+0x6b/0x150 net/socket.c:1455 __fput+0x29b/0x650 fs/file_table.c:468 fput_close_sync+0xad/0x190 fs/file_table.c:573 __do_sys_close fs/open.c:1573 [inline] __se_sys_close fs/open.c:1558 [inline] __x64_sys_close+0x56/0xf0 fs/open.c:1558 x64_sys_call+0x2c25/0x3000 arch/x86/include/generated/asm/syscalls_64.h:4 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881627f10f8 of 8 bytes by task 22292 on cpu 0: memcmp lib/string.c:683 [inline] bcmp+0x23/0x90 lib/string.c:715 memcmp include/linux/fortify-string.h:727 [inline] __bpf_get_stackid+0x382/0x7d0 kernel/bpf/stackmap.c:302 ____bpf_get_stackid kernel/bpf/stackmap.c:344 [inline] bpf_get_stackid+0xf3/0x130 kernel/bpf/stackmap.c:323 ____bpf_get_stackid_raw_tp kernel/trace/bpf_trace.c:1628 [inline] bpf_get_stackid_raw_tp+0xf6/0x120 kernel/trace/bpf_trace.c:1617 bpf_prog_53f0063d4d7f65ce+0x2a/0x32 bpf_dispatcher_nop_func include/linux/bpf.h:1376 [inline] __bpf_prog_run include/linux/filter.h:723 [inline] bpf_prog_run include/linux/filter.h:730 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline] bpf_trace_run2+0x107/0x1d0 kernel/trace/bpf_trace.c:2116 __do_trace_kfree include/trace/events/kmem.h:97 [inline] trace_kfree include/trace/events/kmem.h:97 [inline] kfree+0x353/0x3c0 mm/slub.c:6863 vfree+0x28d/0x3a0 mm/vmalloc.c:3471 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:866 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1022 [inline] do_ipt_get_ctl+0xabe/0xb60 net/ipv4/netfilter/ip_tables.c:1668 nf_getsockopt+0x190/0x1b0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x137/0x180 net/ipv4/ip_sockglue.c:1777 tcp_getsockopt+0xad/0xe0 net/ipv4/tcp.c:4834 sock_common_getsockopt+0x60/0x70 net/core/sock.c:3945 do_sock_getsockopt+0x1c4/0x210 net/socket.c:2383 __sys_getsockopt net/socket.c:2412 [inline] __do_sys_getsockopt net/socket.c:2419 [inline] __se_sys_getsockopt net/socket.c:2416 [inline] __x64_sys_getsockopt+0x11e/0x1a0 net/socket.c:2416 x64_sys_call+0x2dc7/0x3000 arch/x86/include/generated/asm/syscalls_64.h:56 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xffffffff8480ada0 -> 0xffffffff81d414d5 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 22292 Comm: syz-executor Tainted: G W syzkaller #0 PREEMPT(voluntary) Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 ==================================================================