================================================================== 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:129 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:163 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2172 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2933 Read of size 8 at addr ffff888061791580 by task ksoftirqd/1/19 CPU: 1 PID: 19 Comm: ksoftirqd/1 Not tainted 5.12.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:129 [inline] wq_has_sleeper include/linux/wait.h:163 [inline] skwq_has_sleeper include/net/sock.h:2172 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2933 sock_wfree+0x1cc/0x240 net/core/sock.c:2066 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:712 skb_release_all net/core/skbuff.c:723 [inline] napi_consume_skb+0x1b5/0x340 net/core/skbuff.c:968 free_old_xmit_skbs+0xe4/0x270 drivers/net/virtio_net.c:1389 virtnet_poll_tx+0x1e9/0x370 drivers/net/virtio_net.c:1516 __napi_poll+0xaf/0x440 net/core/dev.c:6892 napi_poll net/core/dev.c:6959 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7036 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 run_ksoftirqd kernel/softirq.c:652 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:644 smpboot_thread_fn+0x655/0x9e0 kernel/smpboot.c:165 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 20513: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460 kasan_slab_alloc include/linux/kasan.h:223 [inline] slab_post_alloc_hook mm/slab.h:516 [inline] slab_alloc_node mm/slub.c:2907 [inline] slab_alloc mm/slub.c:2915 [inline] kmem_cache_alloc+0x155/0x370 mm/slub.c:2920 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x230 fs/inode.c:234 new_inode_pseudo+0x14/0xe0 fs/inode.c:928 sock_alloc+0x3c/0x260 net/socket.c:576 __sock_create+0xb9/0x780 net/socket.c:1372 sock_create net/socket.c:1459 [inline] __sys_socket+0xef/0x200 net/socket.c:1501 __do_sys_socket net/socket.c:1510 [inline] __se_sys_socket net/socket.c:1508 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1508 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 19: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x92/0x210 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kmem_cache_free+0x8a/0x740 mm/slub.c:3177 i_callback+0x3f/0x70 fs/inode.c:223 rcu_do_batch kernel/rcu/tree.c:2559 [inline] rcu_core+0x74a/0x12f0 kernel/rcu/tree.c:2794 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3114 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374 __dentry_kill+0x3c0/0x640 fs/dcache.c:580 dentry_kill fs/dcache.c:706 [inline] dput+0x72a/0xbc0 fs/dcache.c:886 __fput+0x3ae/0x920 fs/file_table.c:293 task_work_run+0xdd/0x1a0 kernel/task_work.c:140 get_signal+0x1c89/0x2100 kernel/signal.c:2554 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x148/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3114 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374 __dentry_kill+0x3c0/0x640 fs/dcache.c:580 dentry_kill fs/dcache.c:706 [inline] dput+0x72a/0xbc0 fs/dcache.c:886 __fput+0x3ae/0x920 fs/file_table.c:293 task_work_run+0xdd/0x1a0 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888061791500 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff888061791500, ffff8880617919c0) The buggy address belongs to the page: page:ffffea000185e400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x61790 head:ffffea000185e400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888140778a00 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888061791480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888061791500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888061791580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888061791600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888061791680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================