syzbot


KMSAN: use-after-free in __netif_receive_skb_core

Status: fixed on 2019/12/13 00:31
Subsystems: kernel
[Documentation on labels]
Fix commit: cf94da6f502d Bluetooth: Fix invalid-free in bcsp_close()
First crash: 1710d, last: 1710d

Sample crash report:
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
=====================================================
BUG: KMSAN: use-after-free in skb_zcopy include/linux/skbuff.h:1414 [inline]
BUG: KMSAN: use-after-free in skb_orphan_frags_rx include/linux/skbuff.h:2722 [inline]
BUG: KMSAN: use-after-free in deliver_skb net/core/dev.c:1966 [inline]
BUG: KMSAN: use-after-free in deliver_ptype_list_skb net/core/dev.c:1984 [inline]
BUG: KMSAN: use-after-free in __netif_receive_skb_core+0x39bd/0x51a0 net/core/dev.c:4968
CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.4.0-rc5+ #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+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108
 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:245
 skb_zcopy include/linux/skbuff.h:1414 [inline]
 skb_orphan_frags_rx include/linux/skbuff.h:2722 [inline]
 deliver_skb net/core/dev.c:1966 [inline]
 deliver_ptype_list_skb net/core/dev.c:1984 [inline]
 __netif_receive_skb_core+0x39bd/0x51a0 net/core/dev.c:4968
 __netif_receive_skb_one_core net/core/dev.c:5008 [inline]
 __netif_receive_skb net/core/dev.c:5124 [inline]
 process_backlog+0x612/0x1410 net/core/dev.c:5955
 napi_poll net/core/dev.c:6392 [inline]
 net_rx_action+0x7a6/0x1aa0 net/core/dev.c:6460
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 run_ksoftirqd+0x25/0x40 kernel/softirq.c:607
 smpboot_thread_fn+0x4a3/0x990 kernel/smpboot.c:165
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_poison_shadow+0x60/0x120 mm/kmsan/kmsan.c:134
 kmsan_slab_free+0x8d/0xf0 mm/kmsan/kmsan_hooks.c:108
 slab_free_freelist_hook mm/slub.c:1473 [inline]
 slab_free mm/slub.c:3046 [inline]
 kfree+0x4c1/0x2e70 mm/slub.c:3999
 skb_free_head net/core/skbuff.c:591 [inline]
 skb_release_data+0x7de/0x9d0 net/core/skbuff.c:611
 skb_release_all net/core/skbuff.c:665 [inline]
 __kfree_skb net/core/skbuff.c:679 [inline]
 kfree_skb+0x322/0x4c0 net/core/skbuff.c:697
 bcsp_close+0x127/0x1e0 drivers/bluetooth/hci_bcsp.c:748
 hci_uart_tty_close+0x385/0x410 drivers/bluetooth/hci_ldisc.c:548
 tty_ldisc_close drivers/tty/tty_ldisc.c:494 [inline]
 tty_ldisc_kill drivers/tty/tty_ldisc.c:642 [inline]
 tty_ldisc_release+0x5dd/0xd50 drivers/tty/tty_ldisc.c:814
 tty_release_struct+0x4f/0x1d0 drivers/tty/tty_io.c:1612
 tty_release+0x1be2/0x1e80 drivers/tty/tty_io.c:1785
 __fput+0x4c9/0xba0 fs/file_table.c:280
 ____fput+0x37/0x40 fs/file_table.c:313
 task_work_run+0x22e/0x2a0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xef9/0x3a70 kernel/exit.c:819
 do_group_exit+0x18a/0x320 kernel/exit.c:923
 get_signal+0xbf6/0x32f0 kernel/signal.c:2734
 do_signal+0x6f/0xe10 arch/x86/kernel/signal.c:815
 exit_to_usermode_loop arch/x86/entry/common.c:159 [inline]
 prepare_exit_to_usermode+0x2c5/0x4d0 arch/x86/entry/common.c:194
 syscall_return_slowpath+0x90/0x610 arch/x86/entry/common.c:274
 do_syscall_64+0xdc/0x160 arch/x86/entry/common.c:301
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/12 16:26 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.