[moderation] [bpf?] KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_percpu_elem (2)

14 views
Skip to first unread message

syzbot

unread,
Nov 10, 2024, 11:57:36 AM11/10/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: de2f378f2b77 Merge tag 'nfsd-6.12-4' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16c85ea7980000
kernel config: https://syzkaller.appspot.com/x/.config?x=e351f666e62e0b06
dashboard link: https://syzkaller.appspot.com/bug?extid=9faa5bd2a137139412e8
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
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/bf731037d3a8/disk-de2f378f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/208315e53eb0/vmlinux-de2f378f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/562fd699aa4a/bzImage-de2f378f.xz

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

==================================================================
BUG: KCSAN: data-race in bpf_lru_pop_free / htab_lru_percpu_map_lookup_percpu_elem

write to 0xffff8881150d79a8 of 4 bytes by task 22506 on cpu 1:
__local_list_add_pending kernel/bpf/bpf_lru_list.c:358 [inline]
bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:457 [inline]
bpf_lru_pop_free+0xc61/0xd30 kernel/bpf/bpf_lru_list.c:504
prealloc_lru_pop kernel/bpf/hashtab.c:308 [inline]
__htab_lru_percpu_map_update_elem+0xfe/0x630 kernel/bpf/hashtab.c:1359
bpf_percpu_hash_update+0x5e/0xa0 kernel/bpf/hashtab.c:2425
bpf_map_update_value+0x2b1/0x350 kernel/bpf/syscall.c:181
generic_map_update_batch+0x401/0x520 kernel/bpf/syscall.c:1849
bpf_map_do_batch+0x28c/0x3f0 kernel/bpf/syscall.c:5162
__sys_bpf+0x2e5/0x7a0
__do_sys_bpf kernel/bpf/syscall.c:5760 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5758 [inline]
__x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5758
x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881150d79a8 of 4 bytes by task 22523 on cpu 0:
lookup_nulls_elem_raw kernel/bpf/hashtab.c:667 [inline]
__htab_map_lookup_elem kernel/bpf/hashtab.c:697 [inline]
htab_lru_percpu_map_lookup_percpu_elem+0xe3/0x200 kernel/bpf/hashtab.c:2376
bpf_prog_30f6e55231ed8cc8+0x40/0x44
bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
__bpf_prog_run include/linux/filter.h:701 [inline]
bpf_prog_run include/linux/filter.h:708 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
bpf_trace_run3+0x10c/0x1d0 kernel/trace/bpf_trace.c:2358
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x237/0x2d0 mm/slub.c:4680
__kfree_skb+0x102/0x150 net/core/skbuff.c:1205
consume_skb+0x49/0x160 net/core/skbuff.c:1436
nlmon_xmit+0x51/0x60 drivers/net/nlmon.c:15
__netdev_start_xmit include/linux/netdevice.h:4928 [inline]
netdev_start_xmit include/linux/netdevice.h:4937 [inline]
xmit_one net/core/dev.c:3588 [inline]
dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3604
__dev_queue_xmit+0xfba/0x2040 net/core/dev.c:4432
dev_queue_xmit include/linux/netdevice.h:3094 [inline]
__netlink_deliver_tap_skb net/netlink/af_netlink.c:307 [inline]
__netlink_deliver_tap+0x39f/0x4c0 net/netlink/af_netlink.c:325
netlink_deliver_tap net/netlink/af_netlink.c:338 [inline]
netlink_deliver_tap_kernel net/netlink/af_netlink.c:347 [inline]
netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
netlink_unicast+0x64a/0x670 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:729 [inline]
__sock_sendmsg+0x140/0x180 net/socket.c:744
__sys_sendto+0x1d6/0x260 net/socket.c:2214
__do_sys_sendto net/socket.c:2226 [inline]
__se_sys_sendto net/socket.c:2222 [inline]
__x64_sys_sendto+0x78/0x90 net/socket.c:2222
x64_sys_call+0x2959/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:45
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xc806af34 -> 0x1e18f68e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 22523 Comm: syz.8.6581 Not tainted 6.12.0-rc6-syzkaller-00279-gde2f378f2b77 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================


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

syzbot

unread,
Jan 5, 2025, 11:57:15 AM1/5/25
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages