syzbot


KMSAN: uninit-value in macsec_handle_frame

Status: fixed on 2020/05/10 10:41
Subsystems: net
[Documentation on labels]
Fix commit: b06d072ccc4b macsec: restrict to ethernet devices
First crash: 1723d, last: 1723d

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in macsec_handle_frame+0x87f/0x5540 drivers/net/macsec.c:1015
CPU: 0 PID: 28621 Comm: syz-executor.1 Not tainted 5.6.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __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:118
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 macsec_handle_frame+0x87f/0x5540 drivers/net/macsec.c:1015
 __netif_receive_skb_core+0x21de/0x5840 net/core/dev.c:5088
 __netif_receive_skb_one_core net/core/dev.c:5185 [inline]
 __netif_receive_skb net/core/dev.c:5301 [inline]
 process_backlog+0x936/0x1410 net/core/dev.c:6133
 napi_poll net/core/dev.c:6571 [inline]
 net_rx_action+0x786/0x1aa0 net/core/dev.c:6639
 __do_softirq+0x311/0x83d kernel/softirq.c:293
 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1091
 </IRQ>
 do_softirq+0xed/0x150 kernel/softirq.c:338
 netif_rx_ni+0x202/0x3b0 net/core/dev.c:4747
 pn_send+0xb48/0xd20 net/phonet/af_phonet.c:185
 pn_skb_send+0x822/0xa20 net/phonet/af_phonet.c:272
 pipe_handler_request net/phonet/pep.c:144 [inline]
 pep_sock_connect+0x2ce/0x480 net/phonet/pep.c:892
 pn_socket_connect+0x6be/0xce0 net/phonet/socket.c:255
 __sys_connect_file net/socket.c:1857 [inline]
 __sys_connect+0x6f7/0x770 net/socket.c:1874
 __do_sys_connect net/socket.c:1885 [inline]
 __se_sys_connect net/socket.c:1882 [inline]
 __ia32_sys_connect+0xdb/0x130 net/socket.c:1882
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f49d99
Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000f5d440cc EFLAGS: 00000296 ORIG_RAX: 000000000000016a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000180
RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

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:82
 slab_alloc_node mm/slub.c:2793 [inline]
 __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4401
 __kmalloc_reserve net/core/skbuff.c:142 [inline]
 __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210
 alloc_skb include/linux/skbuff.h:1081 [inline]
 pn_raw_send+0xf5/0x5f0 net/phonet/af_phonet.c:207
 send_reset_indications net/phonet/af_phonet.c:345 [inline]
 phonet_rcv+0x1b40/0x2610 net/phonet/af_phonet.c:410
 __netif_receive_skb_one_core net/core/dev.c:5187 [inline]
 __netif_receive_skb net/core/dev.c:5301 [inline]
 process_backlog+0x12e1/0x1410 net/core/dev.c:6133
 napi_poll net/core/dev.c:6571 [inline]
 net_rx_action+0x786/0x1aa0 net/core/dev.c:6639
 __do_softirq+0x311/0x83d kernel/softirq.c:293
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/21 12:12 https://github.com/google/kmsan.git master a58741ac26cc 4288d95e .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.