================================================================== 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:2143 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2911 Read of size 8 at addr ffff888043fb9080 by task kworker/0:9/22347 CPU: 0 PID: 22347 Comm: kworker/0:9 Not tainted 5.9.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events iterate_cleanup_work 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:2143 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2911 sock_wfree+0x1cc/0x240 net/core/sock.c:2038 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:651 skb_release_all net/core/skbuff.c:662 [inline] _kfree_skb_defer net/core/skbuff.c:872 [inline] napi_consume_skb net/core/skbuff.c:917 [inline] napi_consume_skb+0x12e/0x370 net/core/skbuff.c:894 free_old_xmit_skbs+0xd5/0x230 drivers/net/virtio_net.c:1389 virtnet_poll_tx+0x1e9/0x370 drivers/net/virtio_net.c:1516 napi_poll net/core/dev.c:6687 [inline] net_rx_action+0x4a1/0xe80 net/core/dev.c:6757 __do_softirq+0x2de/0xa24 kernel/softirq.c:298 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x1f3/0x230 kernel/softirq.c:435 common_interrupt+0xa3/0x1f0 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:572 RIP: 0010:arch_local_irq_restore+0x34/0x50 arch/x86/include/asm/paravirt.h:771 Code: fb 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 18 48 83 3d 41 e6 5c 08 00 74 0c 48 89 df 57 9d 0f 1f 44 00 00 5b 0f 0b 48 c7 c7 c8 3b b6 89 e8 fd 01 5b 00 eb da 90 66 2e 0f 1f RSP: 0018:ffffc9000edcfb50 EFLAGS: 00000286 RAX: 1ffffffff136c779 RBX: 0000000000000002 RCX: 0000000000000006 RDX: dffffc0000000000 RSI: ffffffff89bd68a0 RDI: 0000000000000286 RBP: ffff8880946641c0 R08: 0000000000000001 R09: ffffffff8c5f8ad7 R10: fffffbfff18bf15a R11: 0000000000000001 R12: 0000000000000000 R13: ffff888094664aa8 R14: ffff888094664ad0 R15: 0000000000000286 lock_is_held_type+0xbb/0xf0 kernel/locking/lockdep.c:5044 lock_is_held include/linux/lockdep.h:267 [inline] ___might_sleep+0x22b/0x2f0 kernel/sched/core.c:7265 get_next_corpse net/netfilter/nf_conntrack_core.c:2227 [inline] nf_ct_iterate_cleanup+0xb1/0x330 net/netfilter/nf_conntrack_core.c:2249 nf_ct_iterate_cleanup_net net/netfilter/nf_conntrack_core.c:2334 [inline] nf_ct_iterate_cleanup_net+0x113/0x170 net/netfilter/nf_conntrack_core.c:2319 iterate_cleanup_work+0x45/0x130 net/netfilter/nf_nat_masquerade.c:216 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 Allocated by task 31753: 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:518 [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+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 31774: 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:2428 [inline] rcu_core+0x5c7/0x1190 kernel/rcu/tree.c:2656 __do_softirq+0x2de/0xa24 kernel/softirq.c:298 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:2894 [inline] call_rcu+0x14f/0x7e0 kernel/rcu/tree.c:2968 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+0x3ab/0x920 fs/file_table.c:294 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:140 [inline] exit_to_user_mode_prepare+0x195/0x1c0 kernel/entry/common.c:167 syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:242 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:2894 [inline] call_rcu+0x14f/0x7e0 kernel/rcu/tree.c:2968 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+0x3ab/0x920 fs/file_table.c:294 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:140 [inline] exit_to_user_mode_prepare+0x195/0x1c0 kernel/entry/common.c:167 syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:242 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888043fb9000 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff888043fb9000, ffff888043fb94c0) The buggy address belongs to the page: page:0000000096aeccb5 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888043fb9ffd pfn:0x43fb9 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000214bd08 ffffea0001412288 ffff88821b773800 raw: ffff888043fb9ffd ffff888043fb9000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888043fb8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043fb9000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888043fb9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888043fb9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888043fb9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================