================================================================== BUG: KASAN: use-after-free in list_empty include/linux/list.h:282 [inline] BUG: KASAN: use-after-free in waitqueue_active include/linux/wait.h:127 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:161 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2156 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2946 Read of size 8 at addr ffff88804a155080 by task syz-executor.3/13880 CPU: 0 PID: 13880 Comm: syz-executor.3 Not tainted 5.8.0-rc5-next-20200716-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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:127 [inline] wq_has_sleeper include/linux/wait.h:161 [inline] skwq_has_sleeper include/net/sock.h:2156 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2946 sock_wfree+0x1cc/0x240 net/core/sock.c:2059 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:651 skb_release_all net/core/skbuff.c:662 [inline] __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb.part.0+0x89/0x350 net/core/skbuff.c:696 kfree_skb+0x7d/0x100 include/linux/refcount.h:270 skb_queue_purge+0x14/0x30 net/core/skbuff.c:3077 qrtr_tun_release+0x40/0x60 net/qrtr/tun.c:118 __fput+0x27e/0x8e0 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:239 [inline] __prepare_exit_to_usermode+0x1e0/0x1f0 arch/x86/entry/common.c:269 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x415d51 Code: Bad RIP value. RSP: 002b:00007fffd8bc53e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000009 RCX: 0000000000415d51 RDX: 0000000000000000 RSI: 000000000000073e RDI: 0000000000000008 RBP: 0000000000000001 R08: 000000008c12473c R09: 000000008c124740 R10: 00007fffd8bc54d0 R11: 0000000000000293 R12: 000000000078c900 R13: 000000000078c900 R14: ffffffffffffffff R15: 000000000078bf0c Allocated by task 13884: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:535 [inline] slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x138/0x3a0 mm/slab.c:3482 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x230 fs/inode.c:232 new_inode_pseudo+0x14/0xe0 fs/inode.c:928 sock_alloc+0x3c/0x260 net/socket.c:573 __sock_create+0xb9/0x740 net/socket.c:1391 sock_create net/socket.c:1478 [inline] __sys_socket+0xef/0x200 net/socket.c:1520 __do_sys_socket net/socket.c:1529 [inline] __se_sys_socket net/socket.c:1527 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1527 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 13889: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kmem_cache_free.part.0+0x67/0x1f0 mm/slab.c:3693 i_callback+0x3f/0x70 fs/inode.c:221 rcu_do_batch kernel/rcu/tree.c:2418 [inline] rcu_core+0x5dc/0x11d0 kernel/rcu/tree.c:2645 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x82/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2883 [inline] call_rcu+0x14f/0x7e0 kernel/rcu/tree.c:2957 destroy_inode+0x129/0x1b0 fs/inode.c:287 iput_final fs/inode.c:1652 [inline] iput.part.0+0x424/0x850 fs/inode.c:1678 iput+0x58/0x70 fs/inode.c:1668 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374 __dentry_kill+0x3c0/0x640 fs/dcache.c:579 dentry_kill fs/dcache.c:705 [inline] dput+0x725/0xbc0 fs/dcache.c:878 __fput+0x3a2/0x8e0 fs/file_table.c:294 task_work_run+0xdd/0x190 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:239 [inline] __prepare_exit_to_usermode+0x1e0/0x1f0 arch/x86/entry/common.c:269 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Second to last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x82/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2883 [inline] call_rcu+0x14f/0x7e0 kernel/rcu/tree.c:2957 destroy_inode+0x129/0x1b0 fs/inode.c:287 iput_final fs/inode.c:1652 [inline] iput.part.0+0x424/0x850 fs/inode.c:1678 iput+0x58/0x70 fs/inode.c:1668 __sock_release net/socket.c:608 [inline] sock_release+0x15a/0x1b0 net/socket.c:624 netlink_kernel_release+0x4b/0x60 net/netlink/af_netlink.c:2106 crypto_netlink_exit+0x34/0x70 crypto/crypto_user_base.c:492 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:186 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff88804a155000 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff88804a155000, ffff88804a1554c0) The buggy address belongs to the page: page:00000000cb66b7a2 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804a155ffd pfn:0x4a155 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0001285688 ffffea00012818c8 ffff88821b776900 raw: ffff88804a155ffd ffff88804a155000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804a154f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804a155000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804a155080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804a155100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804a155180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================