==================================================================
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:2179 [inline]
BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2927
Read of size 8 at addr ffff88806805d040 by task syz-executor.5/1616
CPU: 0 PID: 1616 Comm: syz-executor.5 Not tainted 5.12.0-rc6-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:2179 [inline]
sock_def_write_space+0x609/0x630 net/core/sock.c:2927
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:1427
virtnet_poll_tx+0x1e9/0x370 drivers/net/virtio_net.c:1555
__napi_poll+0xaf/0x440 net/core/dev.c:6961
napi_poll net/core/dev.c:7028 [inline]
net_rx_action+0x801/0xb40 net/core/dev.c:7115
__do_softirq+0x29b/0x9f6 kernel/softirq.c:345
invoke_softirq kernel/softirq.c:221 [inline]
__irq_exit_rcu kernel/softirq.c:422 [inline]
irq_exit_rcu+0x134/0x200 kernel/softirq.c:434
common_interrupt+0xa4/0xd0 arch/x86/kernel/irq.c:240
asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:623
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:191
Code: 74 24 10 e8 9a d0 4f f8 48 89 ef e8 c2 86 50 f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 b3 54 44 f8 65 8b 05 7c 1a f8 76 85 c0 74 0a 5b 5d c3 e8 10 10
RSP: 0000:ffffc90001befaf8 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1f60b8a
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff888031e63768 R08: 0000000000000001 R09: ffffffff8facc937
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffffea000151f588 R14: 0000000000000001 R15: 0000000000000000
mark_buffer_dirty+0x448/0x5d0 fs/buffer.c:1137
__block_commit_write.constprop.0.isra.0+0x26a/0x3c0 fs/buffer.c:2084
block_commit_write fs/buffer.c:2477 [inline]
block_page_mkwrite+0x2b6/0x310 fs/buffer.c:2526
ext4_page_mkwrite+0xbdf/0x1a10 fs/ext4/inode.c:6087
do_page_mkwrite+0x1a7/0x530 mm/memory.c:2720
do_shared_fault mm/memory.c:4003 [inline]
do_fault mm/memory.c:4071 [inline]
handle_pte_fault mm/memory.c:4318 [inline]
__handle_mm_fault+0x2baa/0x4f70 mm/memory.c:4453
handle_mm_fault+0x1bc/0x7e0 mm/memory.c:4551
do_user_addr_fault+0x483/0x1210 arch/x86/mm/fault.c:1390
handle_page_fault arch/x86/mm/fault.c:1475 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1531
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577
RIP: 0033:0x403ee3
Code: 5d c3 0f 1f 44 00 00 48 8b 0d f1 14 0a 01 48 8b 05 e2 14 0a 01 4c 8d 81 00 00 00 01 48 39 c8 72 13 4c 39 c0 73 0e 48 8d 50 04 <89> 38 48 89 15 c4 14 0a 01 c3 52 48 8d 35 6f a8 0b 00 48 89 c2 48
RSP: 002b:00007ffe34a0b1b8 EFLAGS: 00010287
RAX: 0000001b2d55c000 RBX: 000000000001826b RCX: 0000001b2d520000
RDX: 0000001b2d55c004 RSI: 0000000009260879 RDI: 000000006740ecbd
RBP: 000000006740ecbd R08: 0000001b2e520000 R09: 0000001b2d55b204
R10: 0000000000000000 R11: 0000000000000000 R12: 000000000056c090
R13: 0000000000000001 R14: 0000000000560000 R15: ffffffff820a3c09
Allocated by task 1607:
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 13:
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+0x1ba2/0x2150 kernel/signal.c:2554
arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789
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/0x60 kernel/entry/common.c:301
entry_SYSCALL_64_after_hwframe+0x44/0xae
The buggy address belongs to the object at ffff88806805cfc0
which belongs to the cache sock_inode_cache of size 1216
The buggy address is located 128 bytes inside of
1216-byte region [ffff88806805cfc0, ffff88806805d480)
The buggy address belongs to the page:
page:ffffea0001a01700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6805c
head:ffffea0001a01700 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff88814070f140
raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88806805cf00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88806805cf80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff88806805d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88806805d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806805d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================