bisecting fixing commit since 68d7a45eec101bc1550294c0e675a490c047b2e5 building syzkaller on b0e8efcb4b0aac61f4647a76bbe54a5d38a370ba testing commit 68d7a45eec101bc1550294c0e675a490c047b2e5 with gcc (GCC) 8.1.0 kernel signature: 903e70d281880ec9e4a2c92619377194a7688cb9 all runs: crashed: BUG: unable to handle kernel paging request in slhc_free testing current HEAD 43598c571e7ed29e4c81e35b4a870fe6b9f8d58e testing commit 43598c571e7ed29e4c81e35b4a870fe6b9f8d58e with gcc (GCC) 8.1.0 kernel signature: 51bf8c19474e65369ca0709e07679284b1d5d83f all runs: crashed: KASAN: use-after-free Read in slip_open revisions tested: 2, total time: 22m31.604859293s (build: 15m16.665621172s, test: 6m29.099602983s) the crash still happens on HEAD commit msg: Linux 4.14.156 crash: KASAN: use-after-free Read in slip_open RDX: 0000000020000100 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f465006c6d4 R13: 00000000004c3082 R14: 00000000004d6428 R15: 0000000000000004 ================================================================== BUG: KASAN: use-after-free in sl_sync drivers/net/slip/slip.c:725 [inline] BUG: KASAN: use-after-free in slip_open+0xcfb/0x1052 drivers/net/slip/slip.c:805 Read of size 8 at addr ffff88809e672d48 by task syz-executor.3/6838 CPU: 0 PID: 6838 Comm: syz-executor.3 Not tainted 4.14.156-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 sl_sync drivers/net/slip/slip.c:725 [inline] slip_open+0xcfb/0x1052 drivers/net/slip/slip.c:805 tty_ldisc_open.isra.1+0x63/0xa0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x252/0x5b0 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x300/0x1270 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x183/0xfc0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c9/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c29 RSP: 002b:00007f7bb8817c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7bb8817c90 RCX: 0000000000458c29 RDX: 0000000020000100 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7bb88186d4 R13: 00000000004c3082 R14: 00000000004d6428 R15: 0000000000000004 Allocated by task 6837: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x70/0x80 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] alloc_netdev_mqs+0x60/0xb40 net/core/dev.c:8086 sl_alloc drivers/net/slip/slip.c:751 [inline] slip_open+0x30e/0x1052 drivers/net/slip/slip.c:816 tty_ldisc_open.isra.1+0x63/0xa0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x252/0x5b0 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x300/0x1270 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x183/0xfc0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c9/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 6837: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kvfree+0x2c/0x30 mm/util.c:416 netdev_freemem net/core/dev.c:8038 [inline] free_netdev+0x28a/0x320 net/core/dev.c:8200 slip_open+0xba2/0x1052 drivers/net/slip/slip.c:862 tty_ldisc_open.isra.1+0x63/0xa0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x252/0x5b0 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x300/0x1270 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x183/0xfc0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c9/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809e672280 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2760 bytes inside of 4096-byte region [ffff88809e672280, ffff88809e673280) The buggy address belongs to the page: page:ffffea0002799c80 count:1 mapcount:0 mapping:ffff88809e672280 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff88809e672280 0000000000000000 0000000100000001 raw: ffffea00027890a0 ffffea00027cd820 ffff8880aa800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e672c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809e672c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809e672d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809e672d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809e672e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================