================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880ab683790 by task syz-executor.1/27098 CPU: 1 PID: 27098 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:register_irq_proc+0x0/0x390 kernel/irq/proc.c:353 Code: 7c 24 08 e8 e2 a8 48 00 e9 3b ff ff ff 48 8b 7c 24 18 e8 d3 a8 48 00 e9 f2 fe ff ff e8 c9 a8 48 00 e9 07 fe ff ff 0f 1f 40 00 <41> 56 41 55 41 89 fd 41 54 49 bc 00 00 00 00 00 fc ff df 55 53 48 RSP: 0018:ffff888015dcf648 EFLAGS: 00000212 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc900086d7000 RDX: 0000000000010a3f RSI: ffff88813bfbad80 RDI: 0000000000000007 RBP: ffff88813bfbad80 R08: 0000000000000001 R09: ffffed10277f75e9 R10: ffff88813bfbaf4f R11: 0000000000000000 R12: ffff88809625d840 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88813bfbadf8 __setup_irq+0xd39/0x1ac0 kernel/irq/manage.c:1565 request_threaded_irq+0x28a/0x3b0 kernel/irq/manage.c:1931 request_irq include/linux/interrupt.h:147 [inline] serial_link_irq_chain drivers/tty/serial/8250/8250_core.c:215 [inline] univ8250_setup_irq+0x74a/0x8f0 drivers/tty/serial/8250/8250_core.c:340 serial8250_do_startup+0xb29/0x2130 drivers/tty/serial/8250/8250_port.c:2323 serial8250_startup+0x5c/0x80 drivers/tty/serial/8250/8250_port.c:2434 uart_port_startup+0x3f4/0x8c0 drivers/tty/serial/serial_core.c:218 uart_startup drivers/tty/serial/serial_core.c:257 [inline] uart_startup drivers/tty/serial/serial_core.c:248 [inline] uart_port_activate+0x18a/0x250 drivers/tty/serial/serial_core.c:1756 tty_port_open+0x130/0x1c0 drivers/tty/tty_port.c:696 uart_open+0x3e/0x60 drivers/tty/serial/serial_core.c:1734 tty_open+0x280/0x990 drivers/tty/tty_io.c:2046 chrdev_open+0x266/0x770 fs/char_dev.c:423 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc1489fa0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc146f6c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc148b19f80 RCX: 00007fc1489fa0f9 RDX: 0000000000080841 RSI: 0000000020000180 RDI: ffffffffffffff9c RBP: 00007fc148a55ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff84ebd84f R14: 00007fc146f6c300 R15: 0000000000022000 Allocated by task 27099: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] bcm_tx_setup net/can/bcm.c:947 [inline] bcm_sendmsg+0x25d7/0x4150 net/can/bcm.c:1386 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 27093: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 bcm_release+0x260/0x950 net/can/bcm.c:1561 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1214 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880ab6836c0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880ab6836c0, ffff8880ab683ac0) The buggy address belongs to the page: page:ffffea0002ada080 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff8880ab683b40 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002bb6108 ffffea0002707288 ffff88813bff0ac0 raw: ffff8880ab683b40 ffff8880ab682040 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ab683680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880ab683700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880ab683780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880ab683800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880ab683880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 24 08 and $0x8,%al 2: e8 e2 a8 48 00 callq 0x48a8e9 7: e9 3b ff ff ff jmpq 0xffffff47 c: 48 8b 7c 24 18 mov 0x18(%rsp),%rdi 11: e8 d3 a8 48 00 callq 0x48a8e9 16: e9 f2 fe ff ff jmpq 0xffffff0d 1b: e8 c9 a8 48 00 callq 0x48a8e9 20: e9 07 fe ff ff jmpq 0xfffffe2c 25: 0f 1f 40 00 nopl 0x0(%rax) * 29: 41 56 push %r14 <-- trapping instruction 2b: 41 55 push %r13 2d: 41 89 fd mov %edi,%r13d 30: 41 54 push %r12 32: 49 bc 00 00 00 00 00 movabs $0xdffffc0000000000,%r12 39: fc ff df 3c: 55 push %rbp 3d: 53 push %rbx 3e: 48 rex.W