================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880a1b540d0 by task syz-executor.4/16764 CPU: 1 PID: 16764 Comm: syz-executor.4 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: 0033:0x7f9852d673c1 Code: ff 41 08 c5 0f 85 f7 01 00 00 41 83 c6 01 44 39 73 04 0f 86 b7 00 00 00 48 8b 04 24 44 89 f7 48 8b 53 28 4d 89 f8 48 03 14 f8 <80> 3d f0 ec 16 00 00 49 89 d7 89 d5 75 37 b8 00 00 00 80 48 01 d0 RSP: 002b:00007ffd57badf10 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 00007f985252e008 RBX: 00007f9852eda0e8 RCX: 0000001b31c20000 RDX: ffffffff8187c064 RSI: 0000001b31c258a0 RDI: 0000000000000964 RBP: 00000000f78d89c4 R08: ffffffff8187c049 R09: 00000000f78d89c8 R10: 0000000000000000 R11: 0000000000000000 R12: 00007f9852ece000 R13: 0000000000000001 R14: 0000000000000964 R15: ffffffff8187c049 Allocated by task 16812: 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 16796: __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 ffff8880a1b54000 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880a1b54000, ffff8880a1b54400) The buggy address belongs to the page: page:ffffea000286d500 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff8880a1b54d80 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002863588 ffffea0002a36288 ffff88813bff0ac0 raw: ffff8880a1b54d80 ffff8880a1b54000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1b53f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a1b54000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a1b54080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a1b54100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1b54180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================