syzbot


KMSAN: uninit-value in netif_skb_features

Status: fixed on 2018/05/08 18:30
Subsystems: net (incorrect?)
Reported-by: syzbot+0bbe42c764feafa82c5a@syzkaller.appspotmail.com
Fix commit: 7ce2367254e8 vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi
First crash: 1819d, last: 1787d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in copyout (2) net C 6605 3h25m 1099d 22/24 upstream: reported C repro on 2020/03/26 17:19
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) net C 138977 34d 387d 24/24 fixed on 2023/02/24 13:50

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in eth_type_vlan include/linux/if_vlan.h:283 [inline]
BUG: KMSAN: uninit-value in skb_vlan_tagged_multi include/linux/if_vlan.h:656 [inline]
BUG: KMSAN: uninit-value in vlan_features_check include/linux/if_vlan.h:672 [inline]
BUG: KMSAN: uninit-value in dflt_features_check net/core/dev.c:2949 [inline]
BUG: KMSAN: uninit-value in netif_skb_features+0xd1b/0xdc0 net/core/dev.c:3009
CPU: 1 PID: 3582 Comm: syzkaller435149 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x185/0x1d0 lib/dump_stack.c:53
 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
 eth_type_vlan include/linux/if_vlan.h:283 [inline]
 skb_vlan_tagged_multi include/linux/if_vlan.h:656 [inline]
 vlan_features_check include/linux/if_vlan.h:672 [inline]
 dflt_features_check net/core/dev.c:2949 [inline]
 netif_skb_features+0xd1b/0xdc0 net/core/dev.c:3009
 validate_xmit_skb+0x89/0x1320 net/core/dev.c:3084
 __dev_queue_xmit+0x1cb2/0x2b60 net/core/dev.c:3549
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3590
 packet_snd net/packet/af_packet.c:2944 [inline]
 packet_sendmsg+0x7c57/0x8a10 net/packet/af_packet.c:2969
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 sock_write_iter+0x3b9/0x470 net/socket.c:909
 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776
 do_iter_write+0x30d/0xd40 fs/read_write.c:932
 vfs_writev fs/read_write.c:977 [inline]
 do_writev+0x3c9/0x830 fs/read_write.c:1012
 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085
 SyS_writev+0x56/0x80 fs/read_write.c:1082
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43ffa9
RSP: 002b:00007fff2cff3948 EFLAGS: 00000217 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ffa9
RDX: 0000000000000001 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004018d0
R13: 0000000000401960 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188
 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314
 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321
 slab_post_alloc_hook mm/slab.h:445 [inline]
 slab_alloc_node mm/slub.c:2737 [inline]
 __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369
 __kmalloc_reserve net/core/skbuff.c:138 [inline]
 __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206
 alloc_skb include/linux/skbuff.h:984 [inline]
 alloc_skb_with_frags+0x1d4/0xb20 net/core/skbuff.c:5234
 sock_alloc_send_pskb+0xb56/0x1190 net/core/sock.c:2085
 packet_alloc_skb net/packet/af_packet.c:2803 [inline]
 packet_snd net/packet/af_packet.c:2894 [inline]
 packet_sendmsg+0x6444/0x8a10 net/packet/af_packet.c:2969
 sock_sendmsg_nosec net/socket.c:630 [inline]
 sock_sendmsg net/socket.c:640 [inline]
 sock_write_iter+0x3b9/0x470 net/socket.c:909
 do_iter_readv_writev+0x7bb/0x970 include/linux/fs.h:1776
 do_iter_write+0x30d/0xd40 fs/read_write.c:932
 vfs_writev fs/read_write.c:977 [inline]
 do_writev+0x3c9/0x830 fs/read_write.c:1012
 SYSC_writev+0x9b/0xb0 fs/read_write.c:1085
 SyS_writev+0x56/0x80 fs/read_write.c:1082
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
==================================================================

Crashes (119):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kmsan-gce 2018/04/07 14:00 https://github.com/google/kmsan.git master e2ab7e8abba4 66f22a7f .config console log report syz C
ci-upstream-kmsan-gce 2018/05/08 15:51 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report
ci-upstream-kmsan-gce 2018/05/08 09:50 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report
ci-upstream-kmsan-gce 2018/05/08 08:17 https://github.com/google/kmsan.git master d2d741e5d189 045bbd4a .config console log report
ci-upstream-kmsan-gce 2018/05/07 19:08 https://github.com/google/kmsan.git master d2d741e5d189 9e0846e8 .config console log report
ci-upstream-kmsan-gce 2018/05/07 15:41 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report
ci-upstream-kmsan-gce 2018/05/07 14:26 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report
ci-upstream-kmsan-gce 2018/05/07 11:09 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report
ci-upstream-kmsan-gce 2018/05/07 05:46 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report
ci-upstream-kmsan-gce 2018/05/07 03:25 https://github.com/google/kmsan.git master d2d741e5d189 a211da1a .config console log report
ci-upstream-kmsan-gce 2018/05/06 21:06 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report
ci-upstream-kmsan-gce 2018/05/06 18:42 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report
ci-upstream-kmsan-gce 2018/05/06 16:14 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report
ci-upstream-kmsan-gce 2018/05/06 15:13 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report
ci-upstream-kmsan-gce 2018/05/06 11:28 https://github.com/google/kmsan.git master d2d741e5d189 6c18ddb0 .config console log report
ci-upstream-kmsan-gce 2018/05/06 04:36 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report
ci-upstream-kmsan-gce 2018/05/06 00:11 https://github.com/google/kmsan.git master d2d741e5d189 78b251cb .config console log report
ci-upstream-kmsan-gce 2018/05/05 04:28 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/05 02:17 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/04 23:22 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/04 13:38 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/04 12:10 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/04 08:33 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/04 00:02 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/03 20:30 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/03 15:57 https://github.com/google/kmsan.git master d2d741e5d189 9ce14f4b .config console log report
ci-upstream-kmsan-gce 2018/05/03 05:16 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/03 03:35 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 20:56 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 18:00 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 16:36 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 13:15 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 06:33 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/02 01:42 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/01 22:55 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/01 16:48 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/01 15:06 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/01 11:21 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/05/01 01:50 https://github.com/google/kmsan.git master d2d741e5d189 d5b114b4 .config console log report
ci-upstream-kmsan-gce 2018/04/30 14:41 https://github.com/google/kmsan.git master d2d741e5d189 06db3cec .config console log report
ci-upstream-kmsan-gce 2018/04/30 09:19 https://github.com/google/kmsan.git master d2d741e5d189 06db3cec .config console log report
ci-upstream-kmsan-gce 2018/04/28 22:48 https://github.com/google/kmsan.git master d2d741e5d189 d5a5d045 .config console log report
ci-upstream-kmsan-gce 2018/04/28 04:14 https://github.com/google/kmsan.git master d2d741e5d189 d5a5d045 .config console log report
ci-upstream-kmsan-gce 2018/04/27 23:04 https://github.com/google/kmsan.git master d2d741e5d189 7785e404 .config console log report
ci-upstream-kmsan-gce 2018/04/27 07:10 https://github.com/google/kmsan.git master d2d741e5d189 73417389 .config console log report
ci-upstream-kmsan-gce 2018/04/27 04:10 https://github.com/google/kmsan.git master d2d741e5d189 73417389 .config console log report
ci-upstream-kmsan-gce 2018/04/26 14:44 https://github.com/google/kmsan.git master d2d741e5d189 73417389 .config console log report
ci-upstream-kmsan-gce 2018/04/06 23:50 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report
* Struck through repros no longer work on HEAD.