KASAN: use-after-free Read in pool_ctr

Status: upstream: reported C repro on 2026/11/24 23:18
Reported-by: syzbot+dfc8bd142efc7f30842a@syzkaller.appspotmail.com
First crash: 5d03h, last: 1h43m
▶ ▼ Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in pool_ctr 19 syz, C 3 2h47m 3h13m 0/3 upstream: reported C repro on 2026/11/29 23:54
upstream KASAN: slab-use-after-free Read in pool_ctr dm 19 syz, C done 31 14d 35d 0/30 upstream: reported C repro on 2026/10/26 02:06
linux-6.6 KASAN: slab-use-after-free Read in pool_ctr 19 syz, C 8 55m 12h47m 0/2 upstream: reported C repro on 2026/11/29 14:20

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in pool_ctr+0x86a/0xd50 drivers/md/dm-thin.c:3344
Read of size 8 at addr ffff888146be2f18 by task syz.0.17/4469

CPU: 0 PID: 4469 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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
 pool_ctr+0x86a/0xd50 drivers/md/dm-thin.c:3344
 dm_table_add_target+0x571/0xbc0 drivers/md/dm-table.c:733
 populate_table drivers/md/dm-ioctl.c:1454 [inline]
 table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1496
 ctl_ioctl drivers/md/dm-ioctl.c:2070 [inline]
 dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2092
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 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:0x7f24b6fa9b59
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:00007ffcdb09d4a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f24b7235fa0 RCX: 00007f24b6fa9b59
RDX: 0000200000000240 RSI: 00000000c138fd09 RDI: 0000000000000004
RBP: 00007f24b703a18b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f24b7235fa0 R15: 00007f24b7235fa0
 </TASK>

Allocated by task 4469:
 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_node include/linux/slab.h:585 [inline]
 open_table_device drivers/md/dm.c:723 [inline]
 dm_get_table_device+0x240/0x660 drivers/md/dm.c:792
 dm_get_device+0x3c3/0x7f0 drivers/md/dm-table.c:381
 pool_ctr+0x4a8/0xd50 drivers/md/dm-thin.c:3310
 dm_table_add_target+0x571/0xbc0 drivers/md/dm-table.c:733
 populate_table drivers/md/dm-ioctl.c:1454 [inline]
 table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1496
 ctl_ioctl drivers/md/dm-ioctl.c:2070 [inline]
 dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2092
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 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 4469:
 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:1735 [inline]
 slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1761
 slab_free mm/slub.c:3694 [inline]
 __kmem_cache_free+0xb6/0x200 mm/slub.c:3707
 close_table_device drivers/md/dm.c:769 [inline]
 dm_put_table_device+0x223/0x270 drivers/md/dm.c:812
 upgrade_mode drivers/md/dm-table.c:326 [inline]
 dm_get_device+0x61e/0x7f0 drivers/md/dm-table.c:391
 pool_ctr+0x57f/0xd50 drivers/md/dm-thin.c:3317
 dm_table_add_target+0x571/0xbc0 drivers/md/dm-table.c:733
 populate_table drivers/md/dm-ioctl.c:1454 [inline]
 table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1496
 ctl_ioctl drivers/md/dm-ioctl.c:2070 [inline]
 dm_ctl_ioctl+0xa9c/0xec0 drivers/md/dm-ioctl.c:2092
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 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 ffff888146be2f00
 which belongs to the cache kmalloc-64 of size 64
The buggy address is located 24 bytes inside of
 64-byte region [ffff888146be2f00, ffff888146be2f40)

The buggy address belongs to the physical page:
page:ffffea00051af880 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x146be2
flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000200 ffffea00050efb80 dead000000000003 ffff888018441640
raw: 0000000000000000 0000000080200020 00000001ffffffff 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 14095660816, free_ts 0
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2561
 prep_new_page mm/page_alloc.c:2568 [inline]
 get_page_from_freelist+0x208b/0x21a0 mm/page_alloc.c:4368
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5668
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2108
 alloc_slab_page+0x5d/0x180 mm/slub.c:1805
 allocate_slab mm/slub.c:1950 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2003
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3161
 __slab_alloc mm/slub.c:3247 [inline]
 slab_alloc_node mm/slub.c:3332 [inline]
 __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3405
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa3/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 usb_parse_configuration drivers/usb/core/config.c:797 [inline]
 usb_get_configuration+0xf4f/0x51c0 drivers/usb/core/config.c:989
 usb_enumerate_device drivers/usb/core/hub.c:2501 [inline]
 usb_new_device+0x12c/0x15e0 drivers/usb/core/hub.c:2639
 register_root_hub+0x258/0x550 drivers/usb/core/hcd.c:1021
 usb_add_hcd+0xbb9/0x1080 drivers/usb/core/hcd.c:3001
 dummy_hcd_probe+0x130/0x260 drivers/usb/gadget/udc/dummy_hcd.c:2728
 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
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888146be2e00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
 ffff888146be2e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff888146be2f00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                            ^
 ffff888146be2f80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
 ffff888146be3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/28 21:19 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in pool_ctr
2026/11/30 01:24 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in pool_ctr
2026/11/30 01:24 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in pool_ctr
2026/11/24 23:18 linux-6.1.y 1ca1436ccc68 50451a16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in pool_ctr
2026/11/29 22:08 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in pool_ctr
2026/11/29 22:06 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in pool_ctr
* Struck through repros no longer work on HEAD.