bisecting fixing commit since 7e0165b2f1a912a06e381e91f0f4e495f4ac3736 building syzkaller on e30cbdae48129d22c125435cb72fc20447c7a0e2 testing commit 7e0165b2f1a912a06e381e91f0f4e495f4ac3736 with gcc (GCC) 8.1.0 kernel signature: 37aa94087ec17d773e2cdb3de9db3a2c5e4147d70cd46352e640280c73d60836 run #0: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #1: crashed: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer run #2: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #3: crashed: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer run #4: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #5: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #6: crashed: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer run #7: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #8: OK run #9: OK testing current HEAD 94f2630b18975bb56eee5d1a36371db967643479 testing commit 94f2630b18975bb56eee5d1a36371db967643479 with gcc (GCC) 8.1.0 kernel signature: a5bdd81ec7a095a2a5144a39da109076b7302826a75281741ef9f7f3b6d92d3c run #0: crashed: KASAN: use-after-free Read in j1939_tp_txtimer run #1: crashed: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer run #2: crashed: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 36m16.964044599s (build: 12m59.258637329s, test: 22m35.343106885s) the crash still happens on HEAD commit msg: Merge tag '5.6-rc-small-smb3-fix-for-stable' of git://git.samba.org/sfrench/cifs-2.6 crash: KASAN: slab-out-of-bounds Read in j1939_tp_txtimer ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:380 [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 ffff88808c0083fd by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.5.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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x153/0x1d0 mm/kasan/generic.c:192 memcpy+0x23/0x50 mm/kasan/common.c:127 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+0x747/0x1690 net/can/j1939/transport.c:1095 __run_hrtimer kernel/time/hrtimer.c:1517 [inline] __hrtimer_run_queues+0x32f/0xb50 kernel/time/hrtimer.c:1579 hrtimer_run_softirq+0x16c/0x250 kernel/time/hrtimer.c:1596 __do_softirq+0x262/0x9a8 kernel/softirq.c:292 run_ksoftirqd+0x94/0x100 kernel/softirq.c:603 smpboot_thread_fn+0x55f/0x8b0 kernel/smpboot.c:165 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 12082: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __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:1051 [inline] alloc_skb_with_frags+0x75/0x490 net/core/skbuff.c:5766 sock_alloc_send_pskb+0x5f5/0x790 net/core/sock.c:2242 sock_alloc_send_skb+0x13/0x20 net/core/sock.c:2259 j1939_sk_alloc_skb net/can/j1939/socket.c:843 [inline] j1939_sk_send_loop net/can/j1939/socket.c:1025 [inline] j1939_sk_sendmsg+0x60f/0x12c0 net/can/j1939/socket.c:1160 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:672 kernel_sendmsg+0x26/0x30 net/socket.c:692 sock_no_sendpage+0xfd/0x140 net/core/sock.c:2740 kernel_sendpage+0x60/0xd0 net/socket.c:3789 sock_sendpage+0x6d/0xd0 net/socket.c:950 pipe_to_sendpage+0x253/0x4b0 fs/splice.c:458 splice_from_pipe_feed fs/splice.c:512 [inline] __splice_from_pipe+0x2a7/0x770 fs/splice.c:636 splice_from_pipe+0xbb/0x120 fs/splice.c:671 generic_splice_sendpage+0x10/0x20 fs/splice.c:844 do_splice_from fs/splice.c:863 [inline] direct_splice_actor+0x104/0x1c0 fs/splice.c:1037 splice_direct_to_actor+0x345/0x950 fs/splice.c:992 do_splice_direct+0x14c/0x270 fs/splice.c:1080 do_sendfile+0x481/0xd10 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x198/0x1e0 fs/read_write.c:1511 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 11986: save_stack+0x21/0x90 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+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 skb_free_head+0x6e/0x90 net/core/skbuff.c:592 skb_release_data+0x28a/0x3f0 net/core/skbuff.c:612 skb_release_all+0x3d/0x50 net/core/skbuff.c:666 __kfree_skb net/core/skbuff.c:680 [inline] kfree_skb+0xb3/0x2d0 net/core/skbuff.c:698 skb_queue_purge+0x12/0x30 net/core/skbuff.c:3079 j1939_session_destroy net/can/j1939/transport.c:273 [inline] __j1939_session_release net/can/j1939/transport.c:284 [inline] kref_put include/linux/kref.h:65 [inline] j1939_session_put+0xdc/0x260 net/can/j1939/transport.c:289 j1939_sk_queue_drop_all.isra.5+0x155/0x290 net/can/j1939/socket.c:143 j1939_sk_release+0x4b9/0x530 net/can/j1939/socket.c:609 __sock_release+0xc2/0x270 net/socket.c:605 sock_close+0x13/0x20 net/socket.c:1283 __fput+0x25a/0x770 fs/file_table.c:280 ____fput+0x9/0x10 fs/file_table.c:313 task_work_run+0x108/0x180 kernel/task_work.c:113 get_signal+0x1696/0x1d40 kernel/signal.c:2528 do_signal+0x87/0x1710 arch/x86/kernel/signal.c:813 exit_to_usermode_loop+0x114/0x2e0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x4ff/0x5f0 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808c008000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 1021 bytes inside of 1024-byte region [ffff88808c008000, ffff88808c008400) The buggy address belongs to the page: page:ffffea0002300200 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000260b148 ffffea00023a2c48 ffff8880aa400c40 raw: 0000000000000000 ffff88808c008000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c008300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808c008380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808c008400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808c008480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808c008500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================