vcan0: j1939_tp_rxtimer: 0x0000000035970115: abort rx timeout. Force session deactivation ================================================================== BUG: KASAN: use-after-free in __run_hrtimer kernel/time/hrtimer.c:1521 [inline] BUG: KASAN: use-after-free in __hrtimer_run_queues+0xe18/0xf10 kernel/time/hrtimer.c:1583 Read of size 1 at addr ffff8880a4c94173 by task systemd-udevd/4109 CPU: 0 PID: 4109 Comm: systemd-udevd Not tainted 5.6.0-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.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374 __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 __run_hrtimer kernel/time/hrtimer.c:1521 [inline] __hrtimer_run_queues+0xe18/0xf10 kernel/time/hrtimer.c:1583 hrtimer_run_softirq+0x16d/0x250 kernel/time/hrtimer.c:1600 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x192/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x19e/0x600 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:tomoyo_domain_quota_is_ok+0x133/0x500 security/tomoyo/util.c:1037 Code: 00 48 8b 6d 00 48 3b 2c 24 0f 84 85 00 00 00 e8 a3 b5 17 fe 48 8d 7d 18 48 89 f8 48 89 fa 48 c1 e8 03 83 e2 07 42 0f b6 04 30 <38> d0 7f 08 84 c0 0f 85 24 03 00 00 0f b6 5d 18 31 ff 89 de e8 a4 RSP: 0018:ffffc900016078c0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000010 RCX: ffffffff835b35cb RDX: 0000000000000000 RSI: ffffffff835b33bd RDI: ffff88809782c898 RBP: ffff88809782c880 R08: ffff8880a44d80c0 R09: fffffbfff18fb20d R10: fffffbfff18fb20c R11: ffffffff8c7d9067 R12: 0000000000000002 R13: 000000000000035e R14: dffffc0000000000 R15: 0000000000000000 tomoyo_supervisor+0x2d5/0xee0 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x257/0x360 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f6/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xeb/0x150 security/security.c:1273 vfs_getattr+0x22/0x60 fs/stat.c:117 vfs_statx_fd+0x6a/0xb0 fs/stat.c:147 vfs_fstat include/linux/fs.h:3290 [inline] __do_sys_newfstat+0x8b/0x100 fs/stat.c:388 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x7f9e34a242e2 Code: 48 8b 05 b9 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 77 33 48 63 fe b8 05 00 00 00 48 89 d6 0f 05 <48> 3d 00 f0 ff ff 77 06 f3 c3 0f 1f 40 00 48 8b 15 81 db 2b 00 f7 RSP: 002b:00007ffd8f0c8198 EFLAGS: 00000246 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 00007f9e34cdf440 RCX: 00007f9e34a242e2 RDX: 00007ffd8f0c81a0 RSI: 00007ffd8f0c81a0 RDI: 000000000000000e RBP: 000055d7056bce30 R08: 0000000000000b40 R09: 000055d7056cab40 R10: 000055d7056bce30 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000001000 R14: 000055d7056cab40 R15: 00007ffd8f0c8460 Allocated by task 1132: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] j1939_session_new+0x7c/0x3f0 net/can/j1939/transport.c:1418 j1939_tp_send+0x22f/0x800 net/can/j1939/transport.c:1877 j1939_sk_send_loop net/can/j1939/socket.c:1037 [inline] j1939_sk_sendmsg+0xabf/0x1360 net/can/j1939/socket.c:1160 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x308/0x7e0 net/socket.c:2362 ___sys_sendmsg+0x100/0x170 net/socket.c:2416 __sys_sendmmsg+0x195/0x480 net/socket.c:2506 __do_sys_sendmmsg net/socket.c:2535 [inline] __se_sys_sendmmsg net/socket.c:2532 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2532 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 4109: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:476 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 j1939_session_destroy net/can/j1939/transport.c:276 [inline] __j1939_session_release net/can/j1939/transport.c:284 [inline] kref_put include/linux/kref.h:65 [inline] j1939_session_put+0x25c/0x330 net/can/j1939/transport.c:289 j1939_tp_rxtimer+0x2e9/0x2f4 net/can/j1939/transport.c:1194 __run_hrtimer kernel/time/hrtimer.c:1519 [inline] __hrtimer_run_queues+0x3a2/0xf10 kernel/time/hrtimer.c:1583 hrtimer_run_softirq+0x16d/0x250 kernel/time/hrtimer.c:1600 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a4c94000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 371 bytes inside of 512-byte region [ffff8880a4c94000, ffff8880a4c94200) The buggy address belongs to the page: page:ffffea0002932500 refcount:1 mapcount:0 mapping:ffff8880aa000a80 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000241f7c8 ffffea0001805e88 ffff8880aa000a80 raw: 0000000000000000 ffff8880a4c94000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4c94000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4c94080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a4c94100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a4c94180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4c94200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================