syzbot


KCSAN: data-race in bpf_get_ns_current_pid_tgid / bpf_get_ns_current_pid_tgid

Status: moderation: reported on 2026/01/05 23:37
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+caec04ee175c0921fd95@syzkaller.appspotmail.com
First crash: 6d17h, last: 6d17h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bpf_get_ns_current_pid_tgid / bpf_get_ns_current_pid_tgid

write to 0xffff88811a674d30 of 8 bytes by task 16658 on cpu 0:
 ____bpf_get_ns_current_pid_tgid kernel/bpf/helpers.c:619 [inline]
 bpf_get_ns_current_pid_tgid+0xf5/0x130 kernel/bpf/helpers.c:590
 bpf_prog_25916d026af20f0e+0x55/0x5d
 bpf_dispatcher_nop_func include/linux/bpf.h:1378 [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_run4+0x117/0x1e0 kernel/trace/bpf_trace.c:2118
 __traceiter_sched_switch+0x3f/0x60 include/trace/events/sched.h:220
 __do_trace_sched_switch include/trace/events/sched.h:220 [inline]
 trace_sched_switch include/trace/events/sched.h:220 [inline]
 __schedule+0xb0f/0xcd0 kernel/sched/core.c:6860
 __schedule_loop kernel/sched/core.c:6945 [inline]
 schedule+0x5f/0xd0 kernel/sched/core.c:6960
 futex_do_wait kernel/futex/waitwake.c:358 [inline]
 __futex_wait+0x117/0x260 kernel/futex/waitwake.c:687
 futex_wait+0x9d/0x1d0 kernel/futex/waitwake.c:715
 do_futex+0x2bf/0x380 kernel/futex/syscalls.c:130
 __do_sys_futex kernel/futex/syscalls.c:207 [inline]
 __se_sys_futex+0x2ed/0x360 kernel/futex/syscalls.c:188
 __x64_sys_futex+0x78/0x90 kernel/futex/syscalls.c:188
 x64_sys_call+0x2bc2/0x3000 arch/x86/include/generated/asm/syscalls_64.h:203
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff88811a674d30 of 8 bytes by task 16657 on cpu 1:
 ____bpf_get_ns_current_pid_tgid kernel/bpf/helpers.c:619 [inline]
 bpf_get_ns_current_pid_tgid+0xf5/0x130 kernel/bpf/helpers.c:590
 bpf_prog_25916d026af20f0e+0x55/0x5d
 bpf_dispatcher_nop_func include/linux/bpf.h:1378 [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_run4+0x117/0x1e0 kernel/trace/bpf_trace.c:2118
 __traceiter_sched_switch+0x3f/0x60 include/trace/events/sched.h:220
 __do_trace_sched_switch include/trace/events/sched.h:220 [inline]
 trace_sched_switch include/trace/events/sched.h:220 [inline]
 __schedule+0xb0f/0xcd0 kernel/sched/core.c:6860
 __schedule_loop kernel/sched/core.c:6945 [inline]
 schedule+0x5f/0xd0 kernel/sched/core.c:6960
 __exit_to_user_mode_loop kernel/entry/common.c:32 [inline]
 exit_to_user_mode_loop+0x44/0x740 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x1dd/0x2b0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000ffffffff -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 16657 Comm: syz.2.4605 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/05 23:37 upstream 3609fa95fb0f d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bpf_get_ns_current_pid_tgid / bpf_get_ns_current_pid_tgid
* Struck through repros no longer work on HEAD.