================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x18a/0x1d0 lib/list_debug.c:49 Read of size 8 at addr ffff88802ed2e958 by task syz.8.1429/12666 CPU: 2 UID: 0 PID: 12666 Comm: syz.8.1429 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 __list_del_entry_valid_or_report+0x18a/0x1d0 lib/list_debug.c:49 __list_del_entry_valid include/linux/list.h:140 [inline] __list_del_entry include/linux/list.h:261 [inline] list_del include/linux/list.h:275 [inline] uvcg_extension_drop+0x88/0x290 drivers/usb/gadget/function/uvc_configfs.c:1260 client_drop_item+0xa6/0x100 fs/configfs/dir.c:970 configfs_mkdir+0x70b/0xd40 fs/configfs/dir.c:1443 vfs_mkdir+0x364/0x850 fs/namei.c:5410 filename_mkdirat+0x48b/0x5e0 fs/namei.c:5443 __do_sys_mkdir fs/namei.c:5470 [inline] __se_sys_mkdir fs/namei.c:5467 [inline] __x64_sys_mkdir+0x6b/0x90 fs/namei.c:5467 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe27cf9e159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe27b1f6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007fe27d226090 RCX: 00007fe27cf9e159 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000500 RBP: 00007fe27d035024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe27d226128 R14: 00007fe27d226090 R15: 00007ffdbd4c8478 Allocated by task 12666: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5563 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] uvcg_extension_make+0x98/0x4e0 drivers/usb/gadget/function/uvc_configfs.c:1276 configfs_mkdir+0x7ef/0xd40 fs/configfs/dir.c:1369 vfs_mkdir+0x364/0x850 fs/namei.c:5410 filename_mkdirat+0x48b/0x5e0 fs/namei.c:5443 __do_sys_mkdir fs/namei.c:5470 [inline] __se_sys_mkdir fs/namei.c:5467 [inline] __x64_sys_mkdir+0x6b/0x90 fs/namei.c:5467 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 12666: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6499 [inline] kfree+0x22b/0x6d0 mm/slub.c:6792 config_item_cleanup+0x146/0x240 fs/configfs/item.c:128 config_item_release fs/configfs/item.c:137 [inline] kref_put include/linux/kref.h:65 [inline] config_item_put fs/configfs/item.c:149 [inline] config_item_put+0x93/0xb0 fs/configfs/item.c:146 uvcg_extension_drop+0x80/0x290 drivers/usb/gadget/function/uvc_configfs.c:1259 client_drop_item+0xa6/0x100 fs/configfs/dir.c:970 configfs_mkdir+0x70b/0xd40 fs/configfs/dir.c:1443 vfs_mkdir+0x364/0x850 fs/namei.c:5410 filename_mkdirat+0x48b/0x5e0 fs/namei.c:5443 __do_sys_mkdir fs/namei.c:5470 [inline] __se_sys_mkdir fs/namei.c:5467 [inline] __x64_sys_mkdir+0x6b/0x90 fs/namei.c:5467 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802ed2e900 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 88 bytes inside of freed 192-byte region [ffff88802ed2e900, ffff88802ed2e9c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ed2e flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c0423c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5730, tgid 5730 (syz-executor), ts 125543506714 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x4f4/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] sync_timeline_create drivers/dma-buf/sw_sync.c:104 [inline] sw_sync_debugfs_open+0x177/0x3d0 drivers/dma-buf/sw_sync.c:317 open_proxy_open+0x220/0x330 fs/debugfs/file.c:318 do_dentry_open+0x6ab/0x14d0 fs/open.c:996 vfs_open+0x82/0x3f0 fs/open.c:1101 do_open fs/namei.c:4837 [inline] path_openat+0x19fa/0x2440 fs/namei.c:5000 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 page last free pid 5730 tgid 5730 ts 125536655195 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] __kmalloc_cache_noprof+0x278/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] sync_timeline_create drivers/dma-buf/sw_sync.c:104 [inline] sw_sync_debugfs_open+0x177/0x3d0 drivers/dma-buf/sw_sync.c:317 open_proxy_open+0x220/0x330 fs/debugfs/file.c:318 do_dentry_open+0x6ab/0x14d0 fs/open.c:996 vfs_open+0x82/0x3f0 fs/open.c:1101 do_open fs/namei.c:4837 [inline] path_openat+0x19fa/0x2440 fs/namei.c:5000 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88802ed2e800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802ed2e880: 00 00 00 00 00 00 00 07 fc fc fc fc fc fc fc fc >ffff88802ed2e900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802ed2e980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802ed2ea00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================