================================================================== BUG: KASAN: use-after-free in tasklet_action_common.isra.0+0x3fe/0x4c0 kernel/softirq.c:515 Read of size 8 at addr ffff8880a059b310 by task syz-executor020/7849 CPU: 0 PID: 7849 Comm: syz-executor020 Not tainted 4.19.123-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 tasklet_action_common.isra.0+0x3fe/0x4c0 kernel/softirq.c:515 __do_softirq+0x26c/0x93c kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1092 do_softirq.part.0+0x10f/0x160 kernel/softirq.c:336 do_softirq kernel/softirq.c:328 [inline] __local_bh_enable_ip+0x20e/0x270 kernel/softirq.c:189 sock_orphan include/net/sock.h:1800 [inline] bcm_release+0x49b/0x5e0 net/can/bcm.c:1572 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2cd/0x890 fs/file_table.c:278 task_work_run+0x13f/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x25a/0x2b0 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 RIP: 0033:0x408a81 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 24 1a 00 00 c3 48 83 ec 08 e8 6a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 b3 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fff6a497a90 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000408a81 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00000000006e0c5c R08: 00000000004b27cc R09: 00000000004b27cc R10: 00007fff6a497ab0 R11: 0000000000000293 R12: 00000000006e0c50 R13: 000000000000002d R14: 20c49ba5e353f7cf R15: 0000000000000001 Allocated by task 7851: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x14d/0x7a0 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:939 [inline] bcm_sendmsg+0x21d0/0x3e12 net/can/bcm.c:1378 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:632 ___sys_sendmsg+0x803/0x920 net/socket.c:2115 __sys_sendmsg+0xec/0x1b0 net/socket.c:2153 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7849: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 bcm_release+0xff/0x5e0 net/can/bcm.c:1530 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2cd/0x890 fs/file_table.c:278 task_work_run+0x13f/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x25a/0x2b0 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 ffff8880a059b240 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880a059b240, ffff8880a059b640) The buggy address belongs to the page: page:ffffea0002816680 count:1 mapcount:0 mapping:ffff88812c39cac0 index:0xffff8880a059bb40 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002234408 ffffea000229b508 ffff88812c39cac0 raw: ffff8880a059bb40 ffff8880a059a040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a059b200: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a059b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a059b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a059b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a059b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================