[v6.1] KASAN: use-after-free Read in _regulator_get

2 views
Skip to first unread message

syzbot

unread,
Aug 14, 2026, 1:12:42 PM (3 days ago) Aug 14
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e4f7d8be268e Linux 6.1.182
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=145c6279580000
kernel config: https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link: https://syzkaller.appspot.com/bug?extid=f456bb43f2a34148d5c3
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/156843a60452/disk-e4f7d8be.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/719d532a0151/vmlinux-e4f7d8be.xz
kernel image: https://storage.googleapis.com/syzbot-assets/12160bc2f9ec/bzImage-e4f7d8be.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f456bb...@syzkaller.appspotmail.com

rt1719: probe of 0-0049 failed with error -5
i2c i2c-0: new_device: Instantiated device rt1719 at 0x49
wusb3801 0-0004: supply vbus not found, using dummy regulator
==================================================================
BUG: KASAN: use-after-free in kobject_get+0x108/0x110 lib/kobject.c:631
Read of size 1 at addr ffff8881426681e4 by task syz.4.555/6946

CPU: 0 PID: 6946 Comm: syz.4.555 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
kobject_get+0x108/0x110 lib/kobject.c:631
_regulator_get+0x4ad/0x780 drivers/regulator/core.c:2244
_devm_regulator_get drivers/regulator/devres.c:31 [inline]
devm_regulator_get+0x47/0xb0 drivers/regulator/devres.c:53
wusb3801_probe+0x169/0x640 drivers/usb/typec/wusb3801.c:342
i2c_device_probe+0x7bd/0xb50 drivers/i2c/i2c-core-base.c:589
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
driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a7/0x480 drivers/base/dd.c:1034
bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
device_add+0xbcf/0x1050 drivers/base/core.c:3712
i2c_new_client_device+0xa6e/0x10a0 drivers/i2c/i2c-core-base.c:1019
new_device_store+0x23b/0x510 drivers/i2c/i2c-core-base.c:1300
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:0x7fb57b79e0d9
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:00007fb57c611028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fb57ba26090 RCX: 00007fb57b79e0d9
RDX: 000000000000000c RSI: 0000200000000400 RDI: 0000000000000007
RBP: 00007fb57b835024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb57ba26128 R14: 00007fb57ba26090 R15: 00007ffea9b11e58
</TASK>

Allocated by task 1:
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]
regulator_register+0x3da/0x1c20 drivers/regulator/core.c:5580
devm_regulator_register+0x4d/0xc0 drivers/regulator/devres.c:388
dummy_regulator_probe+0xc6/0x150 drivers/regulator/dummy.c:48
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
driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
__driver_attach+0x43d/0x6c0 drivers/base/dd.c:1220
bus_for_each_dev+0x182/0x1f0 drivers/base/bus.c:303
bus_add_driver+0x324/0x5d0 drivers/base/bus.c:620
driver_register+0x32d/0x430 drivers/base/driver.c:246
regulator_dummy_init+0x48/0xb0 drivers/regulator/dummy.c:85
regulator_init+0x8d/0xb7 drivers/regulator/core.c:6224
do_one_initcall+0x257/0x800 init/main.c:1309
do_initcall_level+0x13d/0x1ed init/main.c:1382
do_initcalls+0x4b/0x8a init/main.c:1398
kernel_init_freeable+0x401/0x5ab init/main.c:1637
kernel_init+0x19/0x1b0 init/main.c:1525
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff888142668000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 484 bytes inside of
2048-byte region [ffff888142668000, ffff888142668800)

The buggy address belongs to the physical page:
page:ffffea0005099a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888142668000 pfn:0x142668
head:ffffea0005099a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000010200 ffffea00051b9408 ffffea00050ea008 ffff888017442000
raw: ffff888142668000 0000000000080003 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 2168838140, 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]
regulator_register+0x3da/0x1c20 drivers/regulator/core.c:5580
devm_regulator_register+0x4d/0xc0 drivers/regulator/devres.c:388
dummy_regulator_probe+0xc6/0x150 drivers/regulator/dummy.c:48
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
driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
page_owner free stack trace missing

Memory state around the buggy address:
ffff888142668080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888142668100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888142668180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888142668200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888142668280: 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
Reply all
Reply to author
Forward
0 new messages