Hello,
syzbot found the following issue on:
HEAD commit: fb28aa725e05 Linux 6.1.180
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=124c75b9580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link:
https://syzkaller.appspot.com/bug?extid=a452dee91a0f1a8db3a0
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/9a6fe2a54d0f/disk-fb28aa72.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/742b23a1d931/vmlinux-fb28aa72.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b3f257c16d2e/bzImage-fb28aa72.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+a452de...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in list_empty include/linux/list.h:292 [inline]
BUG: KASAN: use-after-free in driver_deferred_probe_del+0x63/0x240 drivers/base/dd.c:148
Read of size 8 at addr ffff8880187cfce0 by task syz.1.410/5777
CPU: 1 PID: 5777 Comm: syz.1.410 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
list_empty include/linux/list.h:292 [inline]
driver_deferred_probe_del+0x63/0x240 drivers/base/dd.c:148
device_del+0x64f/0xa80 drivers/base/core.c:3902
usb_del_gadget+0x18c/0x250 drivers/usb/gadget/udc/core.c:1580
usb_del_gadget_udc+0x11/0x30 drivers/usb/gadget/udc/core.c:1603
dummy_udc_remove+0x54/0x60 drivers/usb/gadget/udc/dummy_hcd.c:1123
platform_remove+0x92/0xe0 drivers/base/platform.c:1422
device_remove drivers/base/dd.c:547 [inline]
__device_release_driver drivers/base/dd.c:1279 [inline]
device_release_driver_internal+0x47d/0x7c0 drivers/base/dd.c:1305
unbind_store+0x2e2/0x300 drivers/base/bus.c:193
kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2265 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x482/0x9a0 fs/read_write.c:584
ksys_write+0x14d/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f75e119e019
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:00007f75e204b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f75e1425fa0 RCX: 00007f75e119e019
RDX: 000000000000000b RSI: 0000200000000400 RDI: 0000000000000004
RBP: 00007f75e123500c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f75e1426038 R14: 00007f75e1425fa0 R15: 00007ffe36562088
</TASK>
Allocated by task 5656:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
device_private_init drivers/base/core.c:3541 [inline]
device_add+0xb2/0x1050 drivers/base/core.c:3591
usb_add_gadget+0x47c/0x6f0 drivers/usb/gadget/udc/core.c:1450
usb_add_gadget_udc_release+0x198/0x1e0 drivers/usb/gadget/udc/core.c:1506
dummy_udc_probe+0x686/0x780 drivers/usb/gadget/udc/dummy_hcd.c:1102
platform_probe+0x137/0x1c0 drivers/base/platform.c:1400
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x24a/0xb40 drivers/base/dd.c:638
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
device_driver_attach+0xd9/0x1c0 drivers/base/dd.c:1131
bind_store+0x33b/0x380 drivers/base/bus.c:216
kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2265 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x482/0x9a0 fs/read_write.c:584
ksys_write+0x14d/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 5777:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x200 mm/slub.c:3700
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x217/0x450 lib/kobject.c:729
bus_remove_device+0x2bf/0x400 drivers/base/bus.c:527
device_del+0x63f/0xa80 drivers/base/core.c:3900
usb_del_gadget+0x18c/0x250 drivers/usb/gadget/udc/core.c:1580
usb_del_gadget_udc+0x11/0x30 drivers/usb/gadget/udc/core.c:1603
dummy_udc_remove+0x54/0x60 drivers/usb/gadget/udc/dummy_hcd.c:1123
platform_remove+0x92/0xe0 drivers/base/platform.c:1422
device_remove drivers/base/dd.c:547 [inline]
__device_release_driver drivers/base/dd.c:1279 [inline]
device_release_driver_internal+0x47d/0x7c0 drivers/base/dd.c:1305
unbind_store+0x2e2/0x300 drivers/base/bus.c:193
kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2265 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x482/0x9a0 fs/read_write.c:584
ksys_write+0x14d/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff8880187cfc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 224 bytes inside of
512-byte region [ffff8880187cfc00, ffff8880187cfe00)
The buggy address belongs to the physical page:
page:ffffea000061f300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x187cc
head:ffffea000061f300 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017441c80
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 3559692062, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
prep_new_page mm/page_alloc.c:2567 [inline]
get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2115
alloc_slab_page+0x5d/0x180 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2d0 mm/slub.c:1997
___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398
kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
crypto_larval_alloc+0x55/0x250 crypto/api.c:108
crypto_alloc_test_larval crypto/algapi.c:244 [inline]
__crypto_register_alg+0x246/0x5d0 crypto/algapi.c:297
crypto_register_alg+0x22b/0x3c0 crypto/algapi.c:447
crypto_register_skcipher crypto/skcipher.c:819 [inline]
crypto_register_skciphers+0x1ff/0x3d0 crypto/skcipher.c:834
simd_register_skciphers_compat+0x25/0x360 crypto/simd.c:217
sm4_init+0x1ae/0x22b arch/x86/crypto/sm4_aesni_avx2_glue.c:150
do_one_initcall+0x257/0x800 init/main.c:1309
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880187cfb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880187cfc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880187cfc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880187cfd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880187cfd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup