================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:381 [inline] BUG: KASAN: slab-out-of-bounds in j1939_session_tx_dat net/can/j1939/transport.c:790 [inline] BUG: KASAN: slab-out-of-bounds in j1939_xtp_txnext_transmiter net/can/j1939/transport.c:847 [inline] BUG: KASAN: slab-out-of-bounds in j1939_tp_txtimer+0x747/0x1690 net/can/j1939/transport.c:1095 Read of size 7 at addr ffff888077cbb917 by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.7.0-rc2-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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:382 __kasan_report.cold.11+0x37/0x4e mm/kasan/report.c:511 kasan_report+0x38/0x50 mm/kasan/common.c:625 check_memory_region_inline mm/kasan/generic.c:187 [inline] check_memory_region+0x1cc/0x1f0 mm/kasan/generic.c:193 memcpy+0x23/0x60 mm/kasan/common.c:106 memcpy include/linux/string.h:381 [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+0x747/0x1690 net/can/j1939/transport.c:1095 __run_hrtimer kernel/time/hrtimer.c:1520 [inline] __hrtimer_run_queues+0x224/0xc00 kernel/time/hrtimer.c:1584 hrtimer_run_softirq+0x16c/0x250 kernel/time/hrtimer.c:1601 __do_softirq+0x262/0xa02 kernel/softirq.c:292 run_ksoftirqd+0x94/0x100 kernel/softirq.c:604 smpboot_thread_fn+0x55f/0x8b0 kernel/smpboot.c:165 kthread+0x354/0x420 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 9: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:495 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:509 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4d/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.46+0x2c/0xc0 net/core/skbuff.c:142 __alloc_skb+0xd7/0x570 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1083 [inline] j1939_session_fresh_new net/can/j1939/transport.c:1459 [inline] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1552 [inline] j1939_xtp_rx_rts+0x63d/0x1030 net/can/j1939/transport.c:1653 j1939_tp_cmd_recv net/can/j1939/transport.c:1924 [inline] j1939_tp_recv+0x224/0x780 net/can/j1939/transport.c:2005 j1939_can_recv+0x4ce/0x620 net/can/j1939/main.c:101 deliver net/can/af_can.c:569 [inline] can_rcv_filter+0x4ff/0x840 net/can/af_can.c:603 can_receive+0x290/0x470 net/can/af_can.c:660 can_rcv+0xd9/0x160 net/can/af_can.c:686 __netif_receive_skb_one_core+0xe9/0x170 net/core/dev.c:5188 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5302 process_backlog+0x1ef/0x700 net/core/dev.c:6134 napi_poll net/core/dev.c:6572 [inline] net_rx_action+0x458/0xe40 net/core/dev.c:6640 __do_softirq+0x262/0xa02 kernel/softirq.c:292 Freed by task 12707: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:456 kasan_slab_free+0xe/0x10 mm/kasan/common.c:465 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 skb_free_head+0x6e/0x90 net/core/skbuff.c:590 skb_release_data+0x28a/0x3f0 net/core/skbuff.c:610 skb_release_all+0x3d/0x50 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb+0xb3/0x2d0 net/core/skbuff.c:696 skb_queue_purge+0x12/0x30 net/core/skbuff.c:3077 can_sock_destruct+0x14/0x30 net/can/af_can.c:91 j1939_sk_sock_destruct+0x63/0x80 net/can/j1939/socket.c:375 __sk_destruct+0x48/0x630 net/core/sock.c:1696 sk_destruct+0x90/0xc0 net/core/sock.c:1740 __sk_free+0xc7/0x330 net/core/sock.c:1751 sk_free+0x41/0x60 net/core/sock.c:1762 sock_put include/net/sock.h:1778 [inline] j1939_sk_release+0x37e/0x530 net/can/j1939/socket.c:625 __sock_release+0xc2/0x270 net/socket.c:605 sock_close+0x13/0x20 net/socket.c:1283 __fput+0x2a7/0x790 fs/file_table.c:280 ____fput+0x9/0x10 fs/file_table.c:313 task_work_run+0xcc/0x160 kernel/task_work.c:123 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x24e/0x2e0 arch/x86/entry/common.c:165 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:279 [inline] do_syscall_64+0x531/0x630 arch/x86/entry/common.c:305 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff888077cb8000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6423 bytes to the right of 8192-byte region [ffff888077cb8000, ffff888077cba000) The buggy address belongs to the page: page:ffffea0001df2e00 refcount:1 mapcount:0 mapping:00000000c432cd7b index:0x0 head:ffffea0001df2e00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002764508 ffffea000288af08 ffff8880aa4021c0 raw: 0000000000000000 ffff888077cb8000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888077cbb800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888077cbb880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888077cbb900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888077cbb980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888077cbba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================