[moderation] [bpf?] KCSAN: data-race in bpf_get_ns_current_pid_tgid / bpf_get_ns_current_pid_tgid

0 views
Skip to first unread message

syzbot

unread,
Jan 5, 2026, 6:37:27 PM (2 days ago) Jan 5
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3609fa95fb0f Merge tag 'devicetree-fixes-for-6.19-2' of gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12e98922580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b319ff1b6a2797ca
dashboard link: https://syzkaller.appspot.com/bug?extid=caec04ee175c0921fd95
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [and...@kernel.org a...@kernel.org b...@vger.kernel.org dan...@iogearbox.net edd...@gmail.com hao...@google.com john.fa...@gmail.com jo...@kernel.org kps...@kernel.org linux-...@vger.kernel.org marti...@linux.dev s...@fomichev.me so...@kernel.org yongho...@linux.dev]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3018b7ea95aa/disk-3609fa95.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b7f25f6e87af/vmlinux-3609fa95.xz
kernel image: https://storage.googleapis.com/syzbot-assets/13d7f9c6c13e/bzImage-3609fa95.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+caec04...@syzkaller.appspotmail.com

==================================================================
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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages