================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880a2d312d0 by task syz-executor.1/4256 CPU: 0 PID: 4256 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:__find_get_block+0x284/0xde0 fs/buffer.c:1293 Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 64 0a 00 00 48 83 3d 96 0b 41 08 00 0f 84 bf 04 00 00 e8 63 0e b2 ff fb 66 0f 1f 44 00 00 <4d> 85 e4 0f 84 52 02 00 00 e8 4e 0e b2 ff 0f 1f 44 00 00 e8 44 0e RSP: 0018:ffff88809a95fac0 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: ffff88804cdfc4c0 RBX: 0000000000000000 RCX: 1ffff110099bf9b2 RDX: 0000000000000000 RSI: ffffffff81b0770d RDI: ffff88804cdfcd44 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888042be07e0 R13: 00000000000003b9 R14: 0000000000001000 R15: ffff888042be07e0 sb_find_get_block include/linux/buffer_head.h:346 [inline] recently_deleted fs/ext4/ialloc.c:684 [inline] find_inode_bit+0x213/0x520 fs/ext4/ialloc.c:724 __ext4_new_inode+0x160c/0x5a20 fs/ext4/ialloc.c:916 ext4_symlink+0x3f5/0xc00 fs/ext4/namei.c:3176 vfs_symlink+0x453/0x6c0 fs/namei.c:4129 do_symlinkat+0x258/0x2c0 fs/namei.c:4156 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fd823d1da37 Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 0a 01 00 00 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:00007fff63b32b18 EFLAGS: 00000206 ORIG_RAX: 000000000000010a RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd823d1da37 RDX: 00007fd823d79bab RSI: 00000000ffffff9c RDI: 00007fff63b32be0 RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fff63b329b0 R10: 00007fff63b32867 R11: 0000000000000206 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007fff63b32be0 Allocated by task 4229: 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 4220: __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 ffff8880a2d31200 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880a2d31200, ffff8880a2d31600) The buggy address belongs to the page: page:ffffea00028b4c00 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea000245ff08 ffffea00027d8f08 ffff88813bff0ac0 raw: 0000000000000000 ffff8880a2d30000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a2d31180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a2d31200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a2d31280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a2d31300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a2d31380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 48 c1 ea 03 shr $0x3,%rdx 4: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 8: 0f 85 64 0a 00 00 jne 0xa72 e: 48 83 3d 96 0b 41 08 cmpq $0x0,0x8410b96(%rip) # 0x8410bac 15: 00 16: 0f 84 bf 04 00 00 je 0x4db 1c: e8 63 0e b2 ff callq 0xffb20e84 21: fb sti 22: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) * 28: 4d 85 e4 test %r12,%r12 <-- trapping instruction 2b: 0f 84 52 02 00 00 je 0x283 31: e8 4e 0e b2 ff callq 0xffb20e84 36: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 3b: e8 .byte 0xe8 3c: 44 0e rex.R (bad)