syzbot


KMSAN: uninit-value in sock_hash_delete_elem

Status: upstream: reported C repro on 2024/04/13 00:50
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+c33bff5d5da1391df027@syzkaller.appspotmail.com
First crash: 43d, last: 4d06h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bpf?] [net?] KMSAN: uninit-value in sock_hash_delete_elem 0 (1) 2024/04/13 00:50
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/05/04 15:28 26m retest repro upstream report log

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in spin_lock_bh include/linux/spinlock.h:356 [inline]
BUG: KMSAN: uninit-value in sock_hash_delete_elem+0x239/0x710 net/core/sock_map.c:945
 spin_lock_bh include/linux/spinlock.h:356 [inline]
 sock_hash_delete_elem+0x239/0x710 net/core/sock_map.c:945
 ____bpf_map_delete_elem kernel/bpf/helpers.c:77 [inline]
 bpf_map_delete_elem+0x5c/0x80 kernel/bpf/helpers.c:73
 ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
 __bpf_prog_run32+0xb2/0xe0 kernel/bpf/core.c:2236
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run3+0x132/0x320 kernel/trace/bpf_trace.c:2421
 __bpf_trace_block_bio_remap+0x34/0x50 include/trace/events/block.h:507
 __traceiter_block_bio_remap+0xa5/0x160 include/trace/events/block.h:507
 trace_block_bio_remap include/trace/events/block.h:507 [inline]
 blk_partition_remap block/blk-core.c:571 [inline]
 submit_bio_noacct+0x2449/0x2800 block/blk-core.c:762
 submit_bio+0x58a/0x5b0 block/blk-core.c:879
 ext4_io_submit fs/ext4/page-io.c:378 [inline]
 io_submit_add_bh fs/ext4/page-io.c:419 [inline]
 ext4_bio_write_folio+0x1e76/0x2e40 fs/ext4/page-io.c:563
 mpage_submit_folio+0x351/0x4a0 fs/ext4/inode.c:1869
 mpage_map_and_submit_buffers fs/ext4/inode.c:2115 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2254 [inline]
 ext4_do_writepages+0x3733/0x62e0 fs/ext4/inode.c:2679
 ext4_writepages+0x312/0x830 fs/ext4/inode.c:2768
 do_writepages+0x427/0xc30 mm/page-writeback.c:2612
 __writeback_single_inode+0x10d/0x12c0 fs/fs-writeback.c:1650
 writeback_sb_inodes+0xb48/0x1be0 fs/fs-writeback.c:1941
 __writeback_inodes_wb+0x14c/0x440 fs/fs-writeback.c:2012
 wb_writeback+0x4da/0xdf0 fs/fs-writeback.c:2119
 wb_check_old_data_flush fs/fs-writeback.c:2223 [inline]
 wb_do_writeback fs/fs-writeback.c:2276 [inline]
 wb_workfn+0x110c/0x1940 fs/fs-writeback.c:2304
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0xa81/0x1bd0 kernel/workqueue.c:3335
 worker_thread+0xea5/0x1560 kernel/workqueue.c:3416
 kthread+0x3e2/0x540 kernel/kthread.c:388
 ret_from_fork+0x6d/0x90 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

Local variable stack created at:
 __bpf_prog_run32+0x43/0xe0 kernel/bpf/core.c:2236
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run3+0x132/0x320 kernel/trace/bpf_trace.c:2421

CPU: 1 PID: 76 Comm: kworker/u8:5 Not tainted 6.9.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: writeback wb_workfn (flush-8:0)
=====================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/09 02:32 upstream fec50db7033e 53df08b6 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/05/17 19:48 upstream 614da38e2f7a a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/05/17 19:47 upstream 614da38e2f7a a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/05/15 22:38 upstream 614da38e2f7a 0b3dad46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/04/20 15:17 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/04/14 20:48 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/04/09 00:41 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in sock_hash_delete_elem
2024/04/20 09:19 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in sock_hash_delete_elem
* Struck through repros no longer work on HEAD.