================================================================== 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:128 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:162 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2141 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2906 Read of size 8 at addr ffff8880598da540 by task syz-executor.0/9418 CPU: 0 PID: 9418 Comm: syz-executor.0 Not tainted 5.10.0-rc6-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:128 [inline] wq_has_sleeper include/linux/wait.h:162 [inline] skwq_has_sleeper include/net/sock.h:2141 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2906 sock_wfree+0x1cc/0x240 net/core/sock.c:2033 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] consume_skb net/core/skbuff.c:834 [inline] consume_skb+0x89/0x160 net/core/skbuff.c:828 __dev_kfree_skb_any+0x6b/0x80 net/core/dev.c:3109 dev_kfree_skb_any include/linux/netdevice.h:3807 [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:3860 [inline] e1000_clean+0x4a8/0x1c30 drivers/net/ethernet/intel/e1000/e1000_main.c:3801 napi_poll net/core/dev.c:6763 [inline] net_rx_action+0x4dc/0x1100 net/core/dev.c:6833 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/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+0x132/0x200 kernel/softirq.c:435 common_interrupt+0xa3/0x200 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:622 RIP: 0010:native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] RIP: 0010:seqcount_lockdep_reader_access include/linux/seqlock.h:105 [inline] RIP: 0010:ktime_get_coarse_real_ts64+0x97/0x190 kernel/time/timekeeping.c:2239 Code: 00 00 00 31 f6 48 c7 c7 48 3e 35 8b e8 42 a5 f5 ff 48 8b 74 24 40 48 c7 c7 48 3e 35 8b e8 21 9e f5 ff 58 e8 9b 7d 0f 00 53 9d 07 e8 92 7d 0f 00 f3 90 8b 2d 4a b7 d4 09 31 ff 89 eb 83 e3 01 RSP: 0018:ffffc900014d7a00 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000293 RCX: ffffffff8155a937 RDX: ffff88801226c300 RSI: ffffffff816086e5 RDI: 0000000000000000 RBP: 0000000000000200 R08: 0000000000000001 R09: ffffffff8ecc1707 R10: fffffbfff1d982e0 R11: 0000000000000001 R12: ffffc900014d7a70 R13: fffff5200029af4f R14: fffff5200029af4e R15: ffffc900014d7a78 current_time+0x72/0x2c0 fs/inode.c:2287 file_update_time+0x119/0x520 fs/inode.c:1975 pipe_write+0x1178/0x1a80 fs/pipe.c:586 call_write_iter include/linux/fs.h:1903 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x791/0xa30 fs/read_write.c:605 ksys_write+0x1ee/0x250 fs/read_write.c:658 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:137 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:160 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7f23549 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 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ffa3d9b4 EFLAGS: 00000293 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 00000000000000f8 RCX: 00000000ffa3d9e4 RDX: 000000000000000c RSI: 0000000000000007 RDI: 0000000000000000 RBP: 00000000ffa3da40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 11048: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:526 [inline] slab_alloc_node mm/slub.c:2891 [inline] slab_alloc mm/slub.c:2899 [inline] kmem_cache_alloc+0x122/0x460 mm/slub.c:2904 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:930 sock_alloc+0x3c/0x260 net/socket.c:573 __sock_create+0xb9/0x780 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] __ia32_sys_socket+0x6f/0xb0 net/socket.c:1527 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:137 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:160 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Freed by task 9399: 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+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kmem_cache_free+0x82/0x350 mm/slub.c:3158 i_callback+0x3f/0x70 fs/inode.c:223 rcu_do_batch kernel/rcu/tree.c:2476 [inline] rcu_core+0x5df/0xe80 kernel/rcu/tree.c:2711 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2953 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3027 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x3fe/0x820 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: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:151 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:164 [inline] exit_to_user_mode_prepare+0x17e/0x1a0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266 __do_fast_syscall_32+0x62/0x80 arch/x86/entry/common.c:138 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:160 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff8880598da4c0 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff8880598da4c0, ffff8880598da980) The buggy address belongs to the page: page:00000000f8241cde refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x598d8 head:00000000f8241cde order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4fff00000010200(slab|head) raw: 04fff00000010200 dead000000000100 dead000000000122 ffff8880403a23c0 raw: 0000000000000000 0000000080180018 00000001ffffffff ffff8880597a6801 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880597a6801 Memory state around the buggy address: ffff8880598da400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880598da480: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff8880598da500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880598da580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880598da600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================