netlink: 48 bytes leftover after parsing attributes in process `syz-executor.4'. ================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff888096d8ca10 by task syz-executor.2/23880 CPU: 0 PID: 23880 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/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:__sanitizer_cov_trace_pc+0x22/0x50 kernel/kcov.c:101 Code: 90 90 90 90 90 90 90 90 48 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e 81 e2 00 01 1f 00 75 2b 8b 90 60 13 00 00 <83> fa 02 75 20 48 8b 88 68 13 00 00 8b 80 64 13 00 00 48 8b 11 48 RSP: 0018:ffff88805501fa78 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff8880a3688640 RBX: 0000000000000001 RCX: ffffffff83771e23 RDX: 0000000000000000 RSI: ffffffff83771e31 RDI: 0000000000000005 RBP: ffffffff88b3e120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff88b3e0e0 R14: ffff8880a38e8740 R15: 0000000000000000 check_preemption_disabled+0x41/0x280 lib/smp_processor_id.c:51 rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:348 [inline] rcu_is_watching+0x12/0xc0 kernel/rcu/tree.c:1025 rcu_read_lock_held+0xba/0x110 kernel/rcu/update.c:283 ext4_get_group_desc+0x351/0x4e0 fs/ext4/balloc.c:284 recently_deleted fs/ext4/ialloc.c:680 [inline] find_inode_bit+0x1a0/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:0x7f25aeb35a37 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:00007ffe3199d9f8 EFLAGS: 00000202 ORIG_RAX: 000000000000010a RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f25aeb35a37 RDX: 00007f25aeb91b9e RSI: 00000000ffffff9c RDI: 00007ffe3199dac0 RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe3199d890 R10: 00007ffe3199d747 R11: 0000000000000202 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffe3199dac0 Allocated by task 23870: 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 23868: __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 ffff888096d8c940 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff888096d8c940, ffff888096d8cd40) The buggy address belongs to the page: page:ffffea00025b6300 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00025ad588 ffffea00026b8488 ffff88813bff0ac0 raw: 0000000000000000 ffff888096d8c040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096d8c900: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888096d8c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888096d8ca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096d8ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888096d8cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 48 8b 34 24 mov (%rsp),%rsi c: 65 48 8b 04 25 c0 df mov %gs:0x1dfc0,%rax 13: 01 00 15: 65 8b 15 cc 59 9f 7e mov %gs:0x7e9f59cc(%rip),%edx # 0x7e9f59e8 1c: 81 e2 00 01 1f 00 and $0x1f0100,%edx 22: 75 2b jne 0x4f 24: 8b 90 60 13 00 00 mov 0x1360(%rax),%edx * 2a: 83 fa 02 cmp $0x2,%edx <-- trapping instruction 2d: 75 20 jne 0x4f 2f: 48 8b 88 68 13 00 00 mov 0x1368(%rax),%rcx 36: 8b 80 64 13 00 00 mov 0x1364(%rax),%eax 3c: 48 8b 11 mov (%rcx),%rdx 3f: 48 rex.W