vcan0: j1939_tp_txtimer: 0x00000000d8ff2e57: tx aborted with unknown reason: -2 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:425 [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+0x777/0x1b00 net/can/j1939/transport.c:1095 Read of size 7 at addr ffff88808083234e by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.5.0-rc2-next-20191220-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:425 [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 9374: 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 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] ipv6_add_dev net/ipv6/addrconf.c:373 [inline] ipv6_add_dev+0xd1/0x10b0 net/ipv6/addrconf.c:363 addrconf_notify+0x960/0x2310 net/ipv6/addrconf.c:3491 notifier_call_chain+0xc2/0x230 kernel/notifier.c:83 __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:1893 [inline] call_netdevice_notifiers_info+0xba/0x130 net/core/dev.c:1878 call_netdevice_notifiers_extack net/core/dev.c:1905 [inline] call_netdevice_notifiers net/core/dev.c:1919 [inline] register_netdevice+0x6de/0x1020 net/core/dev.c:9360 nsim_create+0x210/0x2c0 drivers/net/netdevsim/netdev.c:309 __nsim_dev_port_add+0x362/0x650 drivers/net/netdevsim/dev.c:648 nsim_dev_port_add_all drivers/net/netdevsim/dev.c:697 [inline] nsim_dev_probe+0xb01/0xe20 drivers/net/netdevsim/dev.c:818 nsim_bus_probe+0x16/0x20 drivers/net/netdevsim/bus.c:242 really_probe+0x291/0x710 drivers/base/dd.c:548 driver_probe_device+0x110/0x220 drivers/base/dd.c:721 __device_attach_driver+0x1c9/0x230 drivers/base/dd.c:828 bus_for_each_drv+0x172/0x1f0 drivers/base/bus.c:431 __device_attach+0x237/0x390 drivers/base/dd.c:894 device_initial_probe+0x1b/0x20 drivers/base/dd.c:941 bus_probe_device+0x1f1/0x2a0 drivers/base/bus.c:491 device_add+0x14fe/0x1d00 drivers/base/core.c:2487 device_register+0x1e/0x30 drivers/base/core.c:2560 nsim_bus_dev_new drivers/net/netdevsim/bus.c:288 [inline] new_device_store+0x2ab/0x500 drivers/net/netdevsim/bus.c:182 bus_attr_store+0x79/0xa0 drivers/base/bus.c:122 sysfs_kf_write+0x116/0x170 fs/sysfs/file.c:138 kernfs_fop_write+0x270/0x4a0 fs/kernfs/file.c:315 __vfs_write+0x8a/0x110 fs/read_write.c:494 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888080832000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 846 bytes inside of 1024-byte region [ffff888080832000, ffff888080832400) The buggy address belongs to the page: page:ffffea0002020c80 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0 raw: 00fffe0000000200 ffffea00027eccc8 ffffea00028ee2c8 ffff8880aa400c40 raw: 0000000000000000 ffff888080832000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888080832200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888080832280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888080832300: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888080832380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888080832400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================