================================================================== BUG: KASAN: use-after-free in sl_sync drivers/net/slip/slip.c:725 [inline] BUG: KASAN: use-after-free in slip_open+0xd14/0xff1 drivers/net/slip/slip.c:805 Read of size 8 at addr ffff8880553494c8 by task syz-executor.0/30676 CPU: 0 PID: 30676 Comm: syz-executor.0 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+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 sl_sync drivers/net/slip/slip.c:725 [inline] slip_open+0xd14/0xff1 drivers/net/slip/slip.c:805 tty_ldisc_open.isra.0+0x73/0xb0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x29a/0x610 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x95b/0x1320 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45a639 RSP: 002b:00007f51fc615c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f51fc615c90 RCX: 000000000045a639 RDX: 0000000020000080 RSI: 0000000000005423 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f51fc6166d4 R13: 00000000004c52d0 R14: 00000000004da3f0 R15: 0000000000000004 Allocated by task 30650: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x51/0x80 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x4e/0xe0 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] alloc_netdev_mqs+0x7b/0xbc0 net/core/dev.c:8086 sl_alloc drivers/net/slip/slip.c:751 [inline] slip_open+0x2f1/0xff1 drivers/net/slip/slip.c:816 tty_ldisc_open.isra.0+0x73/0xb0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x29a/0x610 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x95b/0x1320 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 30650: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kvfree+0x4d/0x60 mm/util.c:416 netdev_freemem net/core/dev.c:8038 [inline] free_netdev+0x2d0/0x360 net/core/dev.c:8200 slip_open+0xbab/0xff1 drivers/net/slip/slip.c:862 tty_ldisc_open.isra.0+0x73/0xb0 drivers/tty/tty_ldisc.c:474 tty_set_ldisc+0x29a/0x610 drivers/tty/tty_ldisc.c:599 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x95b/0x1320 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888055348a00 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2760 bytes inside of 4096-byte region [ffff888055348a00, ffff888055349a00) The buggy address belongs to the page: page:ffffea000154d200 count:1 mapcount:0 mapping:ffff888055348a00 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff888055348a00 0000000000000000 0000000100000001 raw: ffffea00027d85a0 ffffea000230c3a0 ffff8880aa800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888055349380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888055349400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888055349480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888055349500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888055349580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================