QAT: Invalid ioctl QAT: Invalid ioctl device lo entered promiscuous mode ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0xb1/0xd0 lib/list_debug.c:23 Read of size 8 at addr ffff8801c2bf0be8 by task syz-executor4/6622 CPU: 0 PID: 6622 Comm: syz-executor4 Not tainted 4.14.0-rc2-mm1+ #11 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __list_add_valid+0xb1/0xd0 lib/list_debug.c:23 __list_add include/linux/list.h:59 [inline] list_add include/linux/list.h:78 [inline] netif_napi_add+0x299/0x980 net/core/dev.c:5503 tun_napi_init drivers/net/tun.c:280 [inline] tun_attach+0xbc0/0x1070 drivers/net/tun.c:764 tun_set_iff drivers/net/tun.c:2205 [inline] __tun_chr_ioctl+0x2072/0x3e40 drivers/net/tun.c:2499 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2744 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007fa30c1fac08 EFLAGS: 00000216 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 00000000204c8fd8 RSI: 00000000400454ca RDI: 000000000000001c RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b9aa0 R13: 00000000ffffffff R14: 000000000000001b R15: 00000000400454ca Allocated by task 6622: 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+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3726 [inline] __kmalloc+0x162/0x760 mm/slab.c:3735 kmalloc include/linux/slab.h:513 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1469 sk_alloc+0x89/0x700 net/core/sock.c:1525 tun_chr_open+0xec/0x490 drivers/net/tun.c:2801 misc_open+0x382/0x500 drivers/char/misc.c:153 chrdev_open+0x257/0x730 fs/char_dev.c:416 do_dentry_open+0x67f/0xd70 fs/open.c:752 vfs_open+0x107/0x230 fs/open.c:866 do_last fs/namei.c:3387 [inline] path_openat+0x1157/0x3520 fs/namei.c:3527 do_filp_open+0x25b/0x3b0 fs/namei.c:3562 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_open fs/open.c:1077 [inline] SyS_open+0x2d/0x40 fs/open.c:1072 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 6622: 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:3504 [inline] kfree+0xca/0x250 mm/slab.c:3821 sk_prot_free net/core/sock.c:1508 [inline] __sk_destruct+0x74a/0x910 net/core/sock.c:1587 sk_destruct+0x47/0x80 net/core/sock.c:1595 __sk_free+0x57/0x230 net/core/sock.c:1603 sk_free+0x2a/0x40 net/core/sock.c:1614 sock_put include/net/sock.h:1651 [inline] __tun_detach+0x75b/0x1570 drivers/net/tun.c:657 tun_detach drivers/net/tun.c:664 [inline] tun_chr_close+0x44/0x60 drivers/net/tun.c:2832 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:112 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x296/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath+0x42f/0x510 arch/x86/entry/common.c:266 entry_SYSCALL_64_fastpath+0xbc/0xbe The buggy address belongs to the object at ffff8801c2bf05c0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 1576 bytes inside of 4096-byte region [ffff8801c2bf05c0, ffff8801c2bf15c0) The buggy address belongs to the page: page:ffffea00070afc00 count:1 mapcount:0 mapping:ffff8801c2bf05c0 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801c2bf05c0 0000000000000000 0000000100000001 raw: ffffea00070954a0 ffffea00070ae420 ffff8801dac00dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c2bf0a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c2bf0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c2bf0b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c2bf0c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c2bf0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================