vcan0: j1939_tp_rxtimer: 0x00000000ae6e5078: 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 ffff8880a32e0573 by task systemd-udevd/4107 CPU: 0 PID: 4107 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:759 [inline] RIP: 0010:lock_acquire+0x267/0x8f0 kernel/locking/lockdep.c:4926 Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 c6 05 00 00 48 83 3d 25 39 3b 08 00 0f 84 65 04 00 00 48 8b 3c 24 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 03 44 24 08 48 c7 RSP: 0018:ffffc90001477710 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13291ac RBX: ffff88809bc26240 RCX: ffffffff8158fb25 RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 0000000000000282 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001 R10: fffffbfff1857d8c R11: ffffffff8c2bec67 R12: 0000000000000002 R13: ffffffff899bacc0 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:208 [inline] rcu_read_lock include/linux/rcupdate.h:601 [inline] avc_has_perm_noaudit+0xdc/0x520 security/selinux/avc.c:1143 selinux_inode_permission+0x3aa/0x610 security/selinux/hooks.c:3051 security_inode_permission+0xae/0xf0 security/security.c:1253 inode_permission+0x113/0x500 fs/namei.c:457 may_lookup fs/namei.c:1555 [inline] link_path_walk.part.0+0x1e0/0xb50 fs/namei.c:2111 link_path_walk fs/namei.c:2097 [inline] path_lookupat.isra.0+0x8d/0x530 fs/namei.c:2318 filename_lookup+0x1a3/0x3e0 fs/namei.c:2352 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x119/0x1e0 fs/stat.c:197 vfs_lstat include/linux/fs.h:3279 [inline] __do_sys_newlstat+0x96/0x120 fs/stat.c:364 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x7fbd6f1ab335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007fff12af1e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000559e7a4c4ef0 RCX: 00007fbd6f1ab335 RDX: 00007fff12af1ea0 RSI: 00007fff12af1ea0 RDI: 0000559e7a4c3ef0 RBP: 00007fff12af1f60 R08: 00007fbd6f46a258 R09: 0000000000001010 R10: 0000000000000020 R11: 0000000000000246 R12: 0000559e7a4c3ef0 R13: 0000559e7a4c3f16 R14: 0000559e7a4b7901 R15: 0000559e7a4b7906 Allocated by task 10705: 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_session_fresh_new net/can/j1939/transport.c:1469 [inline] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1552 [inline] j1939_xtp_rx_rts+0x898/0xef0 net/can/j1939/transport.c:1653 j1939_tp_cmd_recv net/can/j1939/transport.c:1924 [inline] j1939_tp_recv+0x639/0x970 net/can/j1939/transport.c:2005 j1939_can_recv+0x587/0x6f0 net/can/j1939/main.c:101 deliver net/can/af_can.c:569 [inline] can_rcv_filter+0x2a1/0x8e0 net/can/af_can.c:603 can_receive+0x2e3/0x520 net/can/af_can.c:660 can_rcv+0x12a/0x1a0 net/can/af_can.c:686 __netif_receive_skb_one_core+0xf5/0x160 net/core/dev.c:5187 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5301 process_backlog+0x21e/0x7a0 net/core/dev.c:6133 napi_poll net/core/dev.c:6571 [inline] net_rx_action+0x4c2/0x1070 net/core/dev.c:6639 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 Freed by task 4107: 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 ffff8880a32e0400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 371 bytes inside of 512-byte region [ffff8880a32e0400, ffff8880a32e0600) The buggy address belongs to the page: page:ffffea00028cb800 refcount:1 mapcount:0 mapping:ffff8880aa000a80 index:0xffff8880a32e0800 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027814c8 ffffea000259dec8 ffff8880aa000a80 raw: ffff8880a32e0800 ffff8880a32e0000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a32e0400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a32e0480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a32e0500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a32e0580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a32e0600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================