================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880b2ff6110 by task syz-executor.0/21537 CPU: 1 PID: 21537 Comm: syz-executor.0 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:qlink_free mm/kasan/quarantine.c:150 [inline] RIP: 0010:qlist_free_all+0xfc/0x140 mm/kasan/quarantine.c:166 Code: 50 08 48 8d 4a ff 83 e2 01 48 0f 45 c1 4c 8b 70 18 e9 40 ff ff ff e8 a3 36 cf ff 48 83 3d e3 0f 59 08 00 74 38 4c 89 ff 57 9d <0f> 1f 44 00 00 4d 85 e4 75 9e 49 c7 45 08 00 00 00 00 49 c7 45 00 RSP: 0018:ffff888048067118 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: ffff88809114c460 RCX: 1ffff11012110d85 RDX: 0000000000000000 RSI: ffff888090886c30 RDI: 0000000000000286 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809114c230 R13: ffff888048067150 R14: ffff88823b833640 R15: 0000000000000286 quarantine_reduce+0x1a9/0x230 mm/kasan/quarantine.c:259 kasan_kmalloc+0xa2/0x160 mm/kasan/kasan.c:538 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] kmem_cache_alloc_trace+0x11a/0x380 mm/slab.c:3623 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] snd_pcm_oss_change_params_locked+0x1a2/0x39d0 sound/core/oss/pcm_oss.c:866 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1108 [inline] snd_pcm_oss_make_ready+0xe7/0x1b0 sound/core/oss/pcm_oss.c:1167 snd_pcm_oss_set_trigger.isra.0+0x30f/0x6e0 sound/core/oss/pcm_oss.c:2071 snd_pcm_oss_poll+0x661/0xb10 sound/core/oss/pcm_oss.c:2852 vfs_poll include/linux/poll.h:90 [inline] do_select+0x8e1/0x1610 fs/select.c:507 core_sys_select+0x3ac/0x7e0 fs/select.c:650 do_pselect fs/select.c:731 [inline] __do_sys_pselect6 fs/select.c:772 [inline] __se_sys_pselect6+0x419/0x480 fs/select.c:757 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fac82bf60f9 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:00007fac81126168 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 00007fac82d16120 RCX: 00007fac82bf60f9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000040 RBP: 00007fac82c51ae9 R08: 0000000020000380 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff64fbfa1f R14: 00007fac81126300 R15: 0000000000022000 Allocated by task 21509: 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 21509: __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 get_signal+0x1b64/0x1f70 kernel/signal.c:2400 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 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 ffff8880b2ff6040 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880b2ff6040, ffff8880b2ff6440) The buggy address belongs to the page: page:ffffea0002cbfd80 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff8880b2ff64c0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002455788 ffffea000285cf88 ffff88813bff0ac0 raw: ffff8880b2ff64c0 ffff8880b2ff6040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b2ff6000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880b2ff6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b2ff6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b2ff6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b2ff6200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 50 push %rax 1: 08 48 8d or %cl,-0x73(%rax) 4: 4a ff 83 e2 01 48 0f rex.WX incq 0xf4801e2(%rbx) b: 45 c1 4c 8b 70 18 rex.RB rorl $0x18,0x70(%r11,%rcx,4) 11: e9 40 ff ff ff jmpq 0xffffff56 16: e8 a3 36 cf ff callq 0xffcf36be 1b: 48 83 3d e3 0f 59 08 cmpq $0x0,0x8590fe3(%rip) # 0x8591006 22: 00 23: 74 38 je 0x5d 25: 4c 89 ff mov %r15,%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: 4d 85 e4 test %r12,%r12 32: 75 9e jne 0xffffffd2 34: 49 c7 45 08 00 00 00 movq $0x0,0x8(%r13) 3b: 00 3c: 49 rex.WB 3d: c7 .byte 0xc7 3e: 45 rex.RB