===================================================== BUG: KMSAN: use-after-free in skb_unref include/linux/skbuff.h:1011 [inline] BUG: KMSAN: use-after-free in kfree_skb+0x23c/0x4c0 net/core/skbuff.c:693 CPU: 1 PID: 19808 Comm: syz-executor.5 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_unref include/linux/skbuff.h:1011 [inline] kfree_skb+0x23c/0x4c0 net/core/skbuff.c:693 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_set_ldisc+0x55c/0x22f0 drivers/tty/tty_ldisc.c:590 tiocsetd drivers/tty/tty_io.c:2334 [inline] tty_ioctl+0x1bc1/0x3100 drivers/tty/tty_io.c:2594 do_vfs_ioctl+0xea8/0x2c50 fs/ioctl.c:46 ksys_ioctl fs/ioctl.c:713 [inline] __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x45a219 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f09964ddc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a219 RDX: 00000000200001c0 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f09964de6d4 R13: 00000000004c4e89 R14: 00000000004d9d30 R15: 00000000ffffffff 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] kmem_cache_free_bulk+0x3ad9/0x3f10 mm/slub.c:3171 __kfree_skb_flush+0xb0/0x100 net/core/skbuff.c:862 net_rx_action+0x1a5e/0x1aa0 net/core/dev.c:6483 __do_softirq+0x4a1/0x83a kernel/softirq.c:293 invoke_softirq kernel/softirq.c:375 [inline] irq_exit+0x230/0x280 kernel/softirq.c:416 exiting_irq arch/x86/include/asm/apic.h:536 [inline] do_IRQ+0x123/0x360 arch/x86/kernel/irq.c:263 ret_from_intr+0x0/0x33 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline] default_idle+0x53/0x90 arch/x86/kernel/process.c:580 arch_cpu_idle+0x25/0x30 arch/x86/kernel/process.c:571 default_idle_call kernel/sched/idle.c:94 [inline] cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1d5/0x780 kernel/sched/idle.c:263 cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:355 rest_init+0x1be/0x1f0 init/main.c:452 arch_call_rest_init+0x13/0x15 start_kernel+0x987/0xb57 init/main.c:787 x86_64_start_reservations+0x18/0x2e arch/x86/kernel/head64.c:490 x86_64_start_kernel+0x81/0x84 arch/x86/kernel/head64.c:471 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 =====================================================