KASAN: slab-use-after-free Read in pool_ctr

Status: upstream: reported C repro on 2026/10/26 02:06
Subsystems: dm
[Documentation on labels]
Reported-by: syzbot+83827f9a59abe148bff4@syzkaller.appspotmail.com
First crash: 19d, last: 2h46m
▶ ▼ ✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
552f8171 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ✅ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KASAN: slab-use-after-free Read in pool_ctr 2026/10/23 00:49 2026/10/23 00:49 2026/10/23 01:36 33f73a1b
▶ ▼ Discussions (4)
Title Replies (including bot) Last reply
[PATCH] dm thin: prevent use-after-free when metadata and data devices alias 4 (4) 2026/10/30 19:08
[PATCH] dm thin: reject metadata and data device aliases 3 (4) 2026/10/27 13:11
[syzbot] [dm?] KASAN: slab-use-after-free Read in pool_ctr 0 (2) 2026/10/27 12:22
[PATCH] dm: reject aliased metadata/data and pool/origin devices 1 (1) 2026/10/26 12:51
▶ ▼ Last patch testing requests (2)
Created Duration User Patch Repo Result
2026/10/27 12:25 23m diasyzhangqing@gmail.com patch upstream OK job log log
2026/10/27 12:22 24m diasyzhangqing@gmail.com patch upstream OK job log log

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in pool_ctr+0x234d/0x2380 drivers/md/dm-thin.c:3363
Read of size 8 at addr ffff888036220598 by task syz.0.17/6045

CPU: 0 UID: 0 PID: 6045 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __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
 pool_ctr+0x234d/0x2380 drivers/md/dm-thin.c:3363
 dm_table_add_target+0x58b/0xee0 drivers/md/dm-table.c:749
 populate_table drivers/md/dm-ioctl.c:1602 [inline]
 table_load+0x3b9/0x7b0 drivers/md/dm-ioctl.c:1645
 ctl_ioctl+0x4d2/0xcc0 drivers/md/dm-ioctl.c:2221
 dm_ctl_ioctl+0x22/0x30 drivers/md/dm-ioctl.c:2243
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb8d5f9fb19
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:00007ffc014ae368 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb8d6225fa0 RCX: 00007fb8d5f9fb19
RDX: 0000200000000180 RSI: 00000000c138fd09 RDI: 0000000000000003
RBP: 00007fb8d6037b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb8d6225fac R14: 00007fb8d6225fa0 R15: 00007fb8d6225fa0
 </TASK>

Allocated by task 6045:
 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:409 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __kmalloc_cache_node_noprof+0x30c/0x710 mm/slub.c:5699
 _kmalloc_node_noprof include/linux/slab.h:1196 [inline]
 open_table_device drivers/md/dm.c:733 [inline]
 dm_get_table_device+0x2fc/0x820 drivers/md/dm.c:821
 dm_get_device+0x525/0x7e0 drivers/md/dm-table.c:388
 pool_ctr+0x2a8/0x2380 drivers/md/dm-thin.c:3329
 dm_table_add_target+0x58b/0xee0 drivers/md/dm-table.c:749
 populate_table drivers/md/dm-ioctl.c:1602 [inline]
 table_load+0x3b9/0x7b0 drivers/md/dm-ioctl.c:1645
 ctl_ioctl+0x4d2/0xcc0 drivers/md/dm-ioctl.c:2221
 dm_ctl_ioctl+0x22/0x30 drivers/md/dm-ioctl.c:2243
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 6045:
 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:264 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:296
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2780 [inline]
 slab_free mm/slub.c:6630 [inline]
 kfree+0x22b/0x6d0 mm/slub.c:6923
 close_table_device drivers/md/dm.c:798 [inline]
 dm_put_table_device+0x2bf/0x380 drivers/md/dm.c:841
 upgrade_mode drivers/md/dm-table.c:326 [inline]
 dm_get_device+0x3f1/0x7e0 drivers/md/dm-table.c:399
 pool_ctr+0x362/0x2380 drivers/md/dm-thin.c:3336
 dm_table_add_target+0x58b/0xee0 drivers/md/dm-table.c:749
 populate_table drivers/md/dm-ioctl.c:1602 [inline]
 table_load+0x3b9/0x7b0 drivers/md/dm-ioctl.c:1645
 ctl_ioctl+0x4d2/0xcc0 drivers/md/dm-ioctl.c:2221
 dm_ctl_ioctl+0x22/0x30 drivers/md/dm-ioctl.c:2243
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888036220580
 which belongs to the cache kmalloc-96 of size 96
The buggy address is located 24 bytes inside of
 freed 96-byte region [ffff888036220580, ffff8880362205e0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36220
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801d442280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000200020 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 1, tgid 1 (swapper/0), ts 8766913109
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x112f/0x3640 mm/page_alloc.c:3940
 __alloc_frozen_pages_noprof+0x2ad/0x31e0 mm/page_alloc.c:5464
 alloc_slab_page mm/slub.c:3384 [inline]
 allocate_slab mm/slub.c:3499 [inline]
 new_slab+0xb1/0x6d0 mm/slub.c:3550
 refill_objects+0xe3/0x410 mm/slub.c:7539
 refill_sheaf mm/slub.c:2917 [inline]
 __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811
 alloc_from_pcs mm/slub.c:4887 [inline]
 slab_alloc_node mm/slub.c:5021 [inline]
 __kmalloc_cache_noprof+0x4ef/0x6d0 mm/slub.c:5676
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 class_dir_create_and_add drivers/base/core.c:3297 [inline]
 get_device_parent+0x29a/0x4c0 drivers/base/core.c:3357
 device_add+0xc3b/0x1970 drivers/base/core.c:3687
 device_create_groups_vargs+0x1f8/0x270 drivers/base/core.c:4460
 device_create+0xed/0x130 drivers/base/core.c:4499
 comedi_alloc_board_minor+0x274/0x3d0 drivers/comedi/comedi_fops.c:3534
 comedi_init+0x1c2/0x2a0 drivers/comedi/comedi_fops.c:3664
 do_one_initcall+0x11c/0x6f0 init/main.c:1419
 do_initcall_level init/main.c:1481 [inline]
 do_initcalls init/main.c:1497 [inline]
 do_basic_setup init/main.c:1517 [inline]
 kernel_init_freeable+0x6ea/0x7b0 init/main.c:1732
 kernel_init+0x21/0x1e0 init/main.c:1622
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888036220480: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
 ffff888036220500: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
>ffff888036220580: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
                            ^
 ffff888036220600: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
 ffff888036220680: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
==================================================================

Crashes (24):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/09 22:46 upstream 7475ea8b5861 bf7e1705 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/11/09 15:31 upstream 7475ea8b5861 5cecaf1f .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/11/09 14:43 upstream 7475ea8b5861 5cecaf1f .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/11/09 13:44 upstream 7475ea8b5861 5cecaf1f .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/10/22 03:40 upstream 4df4d2a577db 4ba27f85 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/22 03:05 upstream 4df4d2a577db 4ba27f85 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/22 02:32 upstream 4df4d2a577db 4ba27f85 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/11/10 00:46 upstream 7475ea8b5861 04b726fe .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/11/04 09:26 upstream 05441d697f7f 5af5b6c6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/11/04 01:09 upstream 05441d697f7f 5af5b6c6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/11/01 21:15 upstream 46fec1c3029b 25a0ae84 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/10/30 16:30 upstream d89e1d186ec9 0ec395f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/30 08:26 upstream 4dd16e31135e b498adee .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/27 23:46 upstream 62c457528529 96923c60 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/27 13:57 upstream d135ab453a74 96923c60 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/10/26 18:12 upstream 6b4b543fa187 168cb7a2 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in pool_ctr
2026/10/22 01:57 upstream 4df4d2a577db 4ba27f85 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in pool_ctr
2026/11/05 21:29 linux-next ddfe51b0a0f5 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in pool_ctr
2026/10/27 23:56 linux-next 151a134a4e6e 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in pool_ctr
2026/10/22 04:32 linux-next 9a482184d910 61c200c7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in pool_ctr
2026/11/07 14:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 58c1eb84e977 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in pool_ctr
2026/11/07 08:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 58c1eb84e977 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in pool_ctr
2026/10/31 06:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7a19f0cc94ad 0ec395f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in pool_ctr
2026/10/28 00:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7a19f0cc94ad 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in pool_ctr
* Struck through repros no longer work on HEAD.