================================================================== 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:2159 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x6b2/0x6e0 net/core/sock.c:2919 Read of size 8 at addr ffff888067e16a80 by task systemd-udevd/4889 CPU: 1 PID: 4889 Comm: systemd-udevd Not tainted 5.10.0-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+0x107/0x163 lib/dump_stack.c:120 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:2159 [inline] sock_def_write_space+0x6b2/0x6e0 net/core/sock.c:2919 sock_wfree+0x1cc/0x240 net/core/sock.c:2052 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:656 skb_release_all net/core/skbuff.c:667 [inline] _kfree_skb_defer net/core/skbuff.c:875 [inline] napi_consume_skb+0x222/0x4c0 net/core/skbuff.c:919 free_old_xmit_skbs+0xe4/0x270 drivers/net/virtio_net.c:1394 virtnet_poll_tx+0x1e9/0x370 drivers/net/virtio_net.c:1521 napi_poll net/core/dev.c:6787 [inline] net_rx_action+0x483/0xf30 net/core/dev.c:6870 __do_softirq+0x2cb/0xad5 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+0x18a/0x1b0 kernel/softirq.c:435 common_interrupt+0xb2/0x220 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:619 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:85 [inline] RIP: 0010:lock_acquire kernel/locking/lockdep.c:5440 [inline] RIP: 0010:lock_acquire+0x2c7/0x780 kernel/locking/lockdep.c:5402 Code: 48 c7 c7 a0 c4 8b 89 48 83 c4 20 e8 03 07 ca 07 b8 ff ff ff ff 65 0f c1 05 f6 da a6 7e 83 f8 01 0f 85 5f 03 00 00 ff 34 24 9d 3a fe ff ff 65 ff 05 5d c9 a6 7e 48 8b 05 f6 70 a0 0c e8 41 fa RSP: 0018:ffffc9000164fa70 EFLAGS: 00000246 RAX: 0000000000000001 RBX: 1ffff920002c9f50 RCX: 0000000000000001 RDX: 1ffff110025654a8 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff8fe6e7af R10: fffffbfff1fcdcf5 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff8bd0a2e8 R14: 0000000000000000 R15: 0000000000000000 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x1240 kernel/locking/mutex.c:1103 kernfs_iop_getattr+0x85/0xd0 fs/kernfs/inode.c:192 vfs_getattr_nosec+0x246/0x2e0 fs/stat.c:87 vfs_getattr fs/stat.c:124 [inline] vfs_statx+0x18d/0x390 fs/stat.c:189 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3125 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:362 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fbe7f747335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007ffcbb188878 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000557710877f10 RCX: 00007fbe7f747335 RDX: 00007ffcbb1888b0 RSI: 00007ffcbb1888b0 RDI: 0000557710876f10 RBP: 00007ffcbb188970 R08: 00007fbe7fa06258 R09: 0000000000001010 R10: 00007fbe7fa05b58 R11: 0000000000000246 R12: 0000557710876f10 R13: 0000557710876f3a R14: 0000557710865dd6 R15: 0000557710865dda Allocated by task 29059: 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:512 [inline] slab_alloc_node mm/slub.c:2889 [inline] slab_alloc mm/slub.c:2897 [inline] kmem_cache_alloc+0x145/0x350 mm/slub.c:2902 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/0x300 net/socket.c:574 __sock_create+0xbc/0x880 net/socket.c:1370 sock_create net/socket.c:1457 [inline] __sys_socket+0xef/0x200 net/socket.c:1499 __do_sys_socket net/socket.c:1508 [inline] __se_sys_socket net/socket.c:1506 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1506 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4889: 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:352 __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:3140 [inline] kmem_cache_free+0x82/0x380 mm/slub.c:3156 i_callback+0x3f/0x70 fs/inode.c:223 rcu_do_batch kernel/rcu/tree.c:2489 [inline] rcu_core+0x75d/0xf80 kernel/rcu/tree.c:2723 __do_softirq+0x2cb/0xad5 kernel/softirq.c:298 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:343 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x730 kernel/rcu/tree.c:3038 destroy_inode+0x12d/0x1c0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput+0x537/0x8a0 fs/inode.c:1680 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+0x786/0xc10 fs/dcache.c:878 __fput+0x3ab/0x930 fs/file_table.c:294 task_work_run+0xdd/0x190 kernel/task_work.c:168 get_signal+0xdaf/0x2180 kernel/signal.c:2596 arch_do_signal_or_restart+0x2a8/0x1e60 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:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:343 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x730 kernel/rcu/tree.c:3038 destroy_inode+0x12d/0x1c0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput+0x537/0x8a0 fs/inode.c:1680 __sock_release net/socket.c:609 [inline] sock_release+0x15a/0x1b0 net/socket.c:625 netlink_kernel_release+0x4b/0x60 net/netlink/af_netlink.c:2107 crypto_netlink_exit+0x34/0x70 crypto/crypto_user_base.c:492 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:187 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:604 process_one_work+0x868/0x15c0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff888067e16a00 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff888067e16a00, ffff888067e16ec0) The buggy address belongs to the page: page:00000000068a035a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x67e14 head:00000000068a035a order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 0000000000000000 0000000400000001 ffff888140c47140 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888067e16980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888067e16a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888067e16a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888067e16b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888067e16b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================