================================================================== 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:2182 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2927 Read of size 8 at addr ffff8880230559c0 by task syz-executor.0/13009 CPU: 3 PID: 13009 Comm: syz-executor.0 Not tainted 5.13.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 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:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 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:2182 [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:713 skb_release_all net/core/skbuff.c:724 [inline] __kfree_skb net/core/skbuff.c:740 [inline] consume_skb net/core/skbuff.c:896 [inline] consume_skb+0x89/0x160 net/core/skbuff.c:890 __dev_kfree_skb_any+0x6b/0x80 net/core/dev.c:3194 dev_kfree_skb_any include/linux/netdevice.h:3979 [inline] e1000_unmap_and_free_tx_resource+0x141/0x200 drivers/net/ethernet/intel/e1000/e1000_main.c:1969 e1000_clean_tx_irq drivers/net/ethernet/intel/e1000/e1000_main.c:3859 [inline] e1000_clean+0x4a8/0x1c30 drivers/net/ethernet/intel/e1000/e1000_main.c:3800 __napi_poll+0xaf/0x440 net/core/dev.c:6966 napi_poll net/core/dev.c:7033 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7120 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 RIP: 0010:lock_release+0x3f1/0x720 kernel/locking/lockdep.c:5520 Code: 7e 83 f8 01 0f 85 83 01 00 00 9c 58 f6 c4 02 0f 85 6e 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c5 48 c7 45 00 00 00 00 00 c7 45 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffffc9000ccaf998 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 483d6d668399847f RCX: ffffc9000ccaf9e8 RDX: 1ffff11003a1084d RSI: 0000000000000000 RDI: 0000000000000000 RBP: 1ffff92001995f35 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000003 R14: ffff88801d084270 R15: ffff88801d083880 rcu_lock_release include/linux/rcupdate.h:272 [inline] rcu_read_unlock include/linux/rcupdate.h:711 [inline] ext4_get_group_desc+0x213/0x510 fs/ext4/balloc.c:284 recently_deleted fs/ext4/ialloc.c:682 [inline] find_inode_bit+0x1c4/0x580 fs/ext4/ialloc.c:728 __ext4_new_inode+0xc4d/0x5600 fs/ext4/ialloc.c:1063 ext4_symlink+0x489/0xd50 fs/ext4/namei.c:3463 vfs_symlink fs/namei.c:4172 [inline] vfs_symlink+0x47d/0x6a0 fs/namei.c:4157 do_symlinkat+0x27a/0x300 fs/namei.c:4202 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x67/0xe0 arch/x86/entry/common.c:143 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7fce549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000ffa1c51c EFLAGS: 00000282 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00000000ffa1c604 RCX: 00000000080eaf0c RDX: 000000000816c000 RSI: 00000000ffa1c604 RDI: 000000000816c000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 13002: 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:428 [inline] __kasan_slab_alloc+0x84/0xa0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2912 [inline] slab_alloc mm/slub.c:2920 [inline] kmem_cache_alloc+0x152/0x3a0 mm/slub.c:2925 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x230 fs/inode.c:233 new_inode_pseudo+0x14/0xe0 fs/inode.c:934 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] __ia32_sys_socket+0x6f/0xb0 net/socket.c:1508 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x67/0xe0 arch/x86/entry/common.c:143 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Freed by task 8660: 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+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1581 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1606 slab_free mm/slub.c:3166 [inline] kmem_cache_free+0x8a/0x740 mm/slub.c:3182 i_callback+0x3f/0x70 fs/inode.c:222 rcu_do_batch kernel/rcu/tree.c:2558 [inline] rcu_core+0x7ab/0x13b0 kernel/rcu/tree.c:2793 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 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:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 destroy_inode+0x129/0x1b0 fs/inode.c:288 iput_final fs/inode.c:1660 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1686 iput+0x58/0x70 fs/inode.c:1676 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:376 __dentry_kill+0x3c0/0x640 fs/dcache.c:582 dentry_kill fs/dcache.c:708 [inline] dput+0x72a/0xbc0 fs/dcache.c:888 __fput+0x3ae/0x920 fs/file_table.c:293 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 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+0x272/0x280 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 __do_fast_syscall_32+0x74/0xe0 arch/x86/entry/common.c:146 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c 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:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 destroy_inode+0x129/0x1b0 fs/inode.c:288 iput_final fs/inode.c:1660 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1686 iput+0x58/0x70 fs/inode.c:1676 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:376 __dentry_kill+0x3c0/0x640 fs/dcache.c:582 dentry_kill fs/dcache.c:708 [inline] dput+0x72a/0xbc0 fs/dcache.c:888 __fput+0x3ae/0x920 fs/file_table.c:293 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 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+0x272/0x280 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 __do_fast_syscall_32+0x74/0xe0 arch/x86/entry/common.c:146 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff888023055940 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff888023055940, ffff888023055e00) The buggy address belongs to the page: page:ffffea00008c1400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880230539c0 pfn:0x23050 head:ffffea00008c1400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000a83200 0000000300000003 ffff8880400f8a00 raw: ffff888023050540 000000008018000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 5114, ts 400027579322, free_ts 399918867909 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1644 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1784 new_slab mm/slub.c:1847 [inline] new_slab_objects mm/slub.c:2593 [inline] ___slab_alloc+0x44c/0x7a0 mm/slub.c:2756 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2796 slab_alloc_node mm/slub.c:2878 [inline] slab_alloc mm/slub.c:2920 [inline] kmem_cache_alloc+0x34b/0x3a0 mm/slub.c:2925 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x230 fs/inode.c:233 new_inode_pseudo+0x14/0xe0 fs/inode.c:934 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+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] __free_pages_ok+0x476/0xce0 mm/page_alloc.c:1572 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x8e/0xa0 mm/kasan/common.c:438 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2912 [inline] slab_alloc mm/slub.c:2920 [inline] kmem_cache_alloc_trace+0x201/0x2c0 mm/slub.c:2937 kmalloc include/linux/slab.h:556 [inline] single_open+0x49/0x1e0 fs/seq_file.c:579 do_dentry_open+0x4b9/0x11b0 fs/open.c:826 do_open fs/namei.c:3361 [inline] path_openat+0x1c0e/0x27e0 fs/namei.c:3494 do_filp_open+0x190/0x3d0 fs/namei.c:3521 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888023055880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888023055900: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888023055980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888023055a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888023055a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================