syzbot


KMSAN: uninit-value in tbf_enqueue

Status: fixed on 2020/07/17 17:58
Subsystems: net
[Documentation on labels]
Fix commit: 9274124f023b net: stricter validation of untrusted gso packets
First crash: 1525d, last: 1437d

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in tbf_enqueue+0x718/0xf10 net/sched/sch_tbf.c:232
CPU: 1 PID: 13499 Comm: syz-executor.1 Not tainted 5.7.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x220 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 tbf_enqueue+0x718/0xf10 net/sched/sch_tbf.c:232
 __dev_xmit_skb net/core/dev.c:3710 [inline]
 __dev_queue_xmit+0x1c00/0x3b20 net/core/dev.c:4021
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4085
 packet_snd net/packet/af_packet.c:2979 [inline]
 packet_sendmsg+0x8347/0x93b0 net/packet/af_packet.c:3004
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 sock_write_iter+0x6bc/0x6d0 net/socket.c:1004
 call_write_iter include/linux/fs.h:1907 [inline]
 new_sync_write fs/read_write.c:484 [inline]
 __vfs_write+0xa5a/0xca0 fs/read_write.c:497
 vfs_write+0x444/0x8e0 fs/read_write.c:559
 ksys_write+0x267/0x450 fs/read_write.c:612
 __do_sys_write fs/read_write.c:624 [inline]
 __se_sys_write+0x92/0xb0 fs/read_write.c:621
 __x64_sys_write+0x4a/0x70 fs/read_write.c:621
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45cb29
Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fe7c365fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000050e160 RCX: 000000000045cb29
RDX: 000000000000fdef RSI: 0000000020000000 RDI: 0000000000000003
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000d2b R14: 00000000004cf84b R15: 00007fe7c36606d4

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127
 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80
 slab_alloc_node mm/slub.c:2802 [inline]
 __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4436
 __kmalloc_reserve net/core/skbuff.c:142 [inline]
 __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210
 alloc_skb include/linux/skbuff.h:1083 [inline]
 alloc_skb_with_frags+0x18c/0xa70 net/core/skbuff.c:5772
 sock_alloc_send_pskb+0xada/0xc60 net/core/sock.c:2265
 packet_alloc_skb net/packet/af_packet.c:2827 [inline]
 packet_snd net/packet/af_packet.c:2922 [inline]
 packet_sendmsg+0x66a0/0x93b0 net/packet/af_packet.c:3004
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 sock_write_iter+0x6bc/0x6d0 net/socket.c:1004
 call_write_iter include/linux/fs.h:1907 [inline]
 new_sync_write fs/read_write.c:484 [inline]
 __vfs_write+0xa5a/0xca0 fs/read_write.c:497
 vfs_write+0x444/0x8e0 fs/read_write.c:559
 ksys_write+0x267/0x450 fs/read_write.c:612
 __do_sys_write fs/read_write.c:624 [inline]
 __se_sys_write+0x92/0xb0 fs/read_write.c:621
 __x64_sys_write+0x4a/0x70 fs/read_write.c:621
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
=====================================================

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/05 18:44 https://github.com/google/kmsan.git master f0d5ec902b23 51095195 .config console log report ci-upstream-kmsan-gce
2020/07/01 20:07 https://github.com/google/kmsan.git master f0d5ec902b23 39acb39d .config console log report ci-upstream-kmsan-gce
2020/05/30 16:20 https://github.com/google/kmsan.git master f0d5ec902b23 6f3e1c7c .config console log report ci-upstream-kmsan-gce
2020/05/25 00:32 https://github.com/google/kmsan.git master 8b97c6271626 bd28eb9d .config console log report ci-upstream-kmsan-gce
2020/05/01 07:10 https://github.com/google/kmsan.git master bfa90a4a3f3f a4d01b80 .config console log report ci-upstream-kmsan-gce
2020/04/30 11:54 https://github.com/google/kmsan.git master bfa90a4a3f3f 2dd552a5 .config console log report ci-upstream-kmsan-gce
2020/04/27 10:51 https://github.com/google/kmsan.git master bfa90a4a3f3f 0ce7569e .config console log report ci-upstream-kmsan-gce
2020/04/25 11:44 https://github.com/google/kmsan.git master bfa90a4a3f3f b8bb8e5f .config console log report ci-upstream-kmsan-gce
2020/04/23 13:31 https://github.com/google/kmsan.git master 9535d09e7cff 2e44d63e .config console log report ci-upstream-kmsan-gce
2020/04/22 12:37 https://github.com/google/kmsan.git master 9535d09e7cff 2e44d63e .config console log report ci-upstream-kmsan-gce
2020/07/17 16:14 https://github.com/google/kmsan.git master f0d5ec902b23 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/05/12 14:07 https://github.com/google/kmsan.git master 34598697f9d0 160c7698 .config console log report ci-upstream-kmsan-gce-386
2020/05/11 10:45 https://github.com/google/kmsan.git master 14bcee29ad06 f8f57555 .config console log report ci-upstream-kmsan-gce-386
2020/05/11 08:54 https://github.com/google/kmsan.git master 14bcee29ad06 f8f57555 .config console log report ci-upstream-kmsan-gce-386
2020/05/09 10:15 https://github.com/google/kmsan.git master a7b0442ddfb0 e97b06d3 .config console log report ci-upstream-kmsan-gce-386
2020/05/05 12:34 https://github.com/google/kmsan.git master 21c44613a2fe 4b76dd25 .config console log report ci-upstream-kmsan-gce-386
2020/05/04 20:28 https://github.com/google/kmsan.git master 21c44613a2fe 9941337c .config console log report ci-upstream-kmsan-gce-386
2020/05/02 15:35 https://github.com/google/kmsan.git master bfa90a4a3f3f 58da4c35 .config console log report ci-upstream-kmsan-gce-386
2020/05/01 06:07 https://github.com/google/kmsan.git master bfa90a4a3f3f a4d01b80 .config console log report ci-upstream-kmsan-gce-386
2020/04/24 12:51 https://github.com/google/kmsan.git master 9535d09e7cff 03d97a1b .config console log report ci-upstream-kmsan-gce-386
2020/04/21 12:18 https://github.com/google/kmsan.git master 9535d09e7cff 2e44d63e .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.