vcan0: j1939_xtp_rx_abort_one: 0x0000000012de4cd1: 0x00000: (3) A timeout occurred and this is the connection abort to close the session. vcan0: j1939_xtp_rx_abort_one: 0x000000004d9a02c9: 0x00000: (3) A timeout occurred and this is the connection abort to close the session. ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:380 [inline] BUG: KASAN: use-after-free in j1939_session_tx_dat net/can/j1939/transport.c:790 [inline] BUG: KASAN: use-after-free in j1939_xtp_txnext_transmiter net/can/j1939/transport.c:847 [inline] BUG: KASAN: use-after-free in j1939_tp_txtimer+0x777/0x1b00 net/can/j1939/transport.c:1095 Read of size 7 at addr ffff8880963d7917 by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.5.0-rc5-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memcpy+0x24/0x50 mm/kasan/common.c:125 memcpy include/linux/string.h:380 [inline] j1939_session_tx_dat net/can/j1939/transport.c:790 [inline] j1939_xtp_txnext_transmiter net/can/j1939/transport.c:847 [inline] j1939_tp_txtimer+0x777/0x1b00 net/can/j1939/transport.c:1095 __run_hrtimer kernel/time/hrtimer.c:1517 [inline] __hrtimer_run_queues+0x364/0xe40 kernel/time/hrtimer.c:1579 hrtimer_run_softirq+0x17e/0x270 kernel/time/hrtimer.c:1596 __do_softirq+0x262/0x98c kernel/softirq.c:292 run_ksoftirqd kernel/softirq.c:603 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:595 smpboot_thread_fn+0x6a3/0xa40 kernel/smpboot.c:165 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 9: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:141 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] j1939_tp_tx_dat_new+0x38/0x530 net/can/j1939/transport.c:568 j1939_tp_tx_dat net/can/j1939/transport.c:606 [inline] j1939_session_tx_dat net/can/j1939/transport.c:791 [inline] j1939_xtp_txnext_transmiter net/can/j1939/transport.c:847 [inline] j1939_tp_txtimer+0x7a7/0x1b00 net/can/j1939/transport.c:1095 __run_hrtimer kernel/time/hrtimer.c:1517 [inline] __hrtimer_run_queues+0x364/0xe40 kernel/time/hrtimer.c:1579 hrtimer_run_softirq+0x17e/0x270 kernel/time/hrtimer.c:1596 __do_softirq+0x262/0x98c kernel/softirq.c:292 Freed by task 9: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 skb_free_head+0x93/0xb0 net/core/skbuff.c:591 skb_release_data+0x551/0x8d0 net/core/skbuff.c:611 skb_release_all+0x4d/0x60 net/core/skbuff.c:665 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:838 [inline] consume_skb+0xfb/0x410 net/core/skbuff.c:832 can_receive+0x349/0x530 net/can/af_can.c:665 can_rcv+0x133/0x1b0 net/can/af_can.c:686 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5150 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5264 process_backlog+0x206/0x750 net/core/dev.c:6095 napi_poll net/core/dev.c:6532 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6600 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880963d7800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 279 bytes inside of 512-byte region [ffff8880963d7800, ffff8880963d7a00) The buggy address belongs to the page: page:ffffea000258f5c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 raw: 00fffe0000000200 ffffea0002653c88 ffffea000258f508 ffff8880aa400a80 raw: 0000000000000000 ffff8880963d7000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880963d7800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880963d7880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880963d7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880963d7980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880963d7a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================