Extracting prog: 1m46.349686892s Minimizing prog: 9m55.907349905s Simplifying prog options: 0s Extracting C: 1m37.47197793s Simplifying C: 8m48.278590743s extracting reproducer from 31 programs first checking the prog from the crash report single: executing 1 programs separately with timeout 30s testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r1}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program crashed: KASAN: use-after-free Read in pool_ctr single: successfully extracted reproducer found reproducer with 3 syscalls minimizing guilty program testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) program did not crash testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program did not crash testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: ioctl$DM_DEV_CREATE(0xffffffffffffffff, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(0xffffffffffffffff, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r0}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program did not crash testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, 0x0, 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r1}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program did not crash testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, 0x0) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program did not crash testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, 0x0) program did not crash extracting C reproducer testing compiled C program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr simplifying C reproducer testing compiled C program (duration=30s, {Threaded:false Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:true Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD program crashed: KASAN: use-after-free Read in pool_ctr testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r1}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program crashed: KASAN: use-after-free Read in pool_ctr validation run: crashed=true testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r1}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program crashed: KASAN: use-after-free Read in pool_ctr validation run: crashed=true testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): openat$dm_control-ioctl$DM_DEV_CREATE-ioctl$DM_TABLE_LOAD detailed listing: executing program 0: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x40002, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000340)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x8da10, 0x0, 0x0, {0x0, {'syz', 0x0, '3\x00'}, @uuid={'LVM-syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000d40)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x20c00, 0x0, 0x0, @by_dev={r1}, [@thin_pool={0x0, 0x1018, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x1}, 0x20, @ram_num={'1:', 0x1}, 0x20, '2048', 0x20, 0x212, ' 1 read_only'}}]}) program crashed: KASAN: use-after-free Read in pool_ctr validation run: crashed=true reproducing took 26m35.411777233s repro crashed as (corrupted=false): ================================================================== BUG: KASAN: use-after-free in pool_ctr+0x8d2/0xde0 drivers/md/dm-thin.c:3360 Read of size 8 at addr ffff88802b979798 by task syz.0.17/4470 CPU: 0 PID: 4470 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 pool_ctr+0x8d2/0xde0 drivers/md/dm-thin.c:3360 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f1585b59b59 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:00007ffcd0f8cd38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1585de5fa0 RCX: 00007f1585b59b59 RDX: 0000200000000d40 RSI: 00000000c138fd09 RDI: 0000000000000003 RBP: 00007f1585bea18b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1585de5fa0 R15: 00007f1585de5fa0 Allocated by task 4470: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:625 [inline] dm_get_table_device+0x1a3/0x550 drivers/md/dm.c:713 dm_get_device+0x3b3/0x7e0 drivers/md/dm-table.c:381 pool_ctr+0x4ba/0xde0 drivers/md/dm-thin.c:3326 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4470: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 dm_put_table_device+0x24b/0x2a0 drivers/md/dm.c:749 upgrade_mode drivers/md/dm-table.c:330 [inline] dm_get_device+0x620/0x7e0 drivers/md/dm-table.c:391 pool_ctr+0x5c9/0xde0 drivers/md/dm-thin.c:3333 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88802b979780 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 24 bytes inside of 64-byte region [ffff88802b979780, ffff88802b9797c0) The buggy address belongs to the page: page:ffffea0000ae5e40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b979 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888017841640 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4361, ts 70336371098, free_ts 70336302199 prep_new_page mm/page_alloc.c:2427 [inline] get_page_from_freelist+0x2510/0x2680 mm/page_alloc.c:4202 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5511 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] kmem_cache_alloc_node_trace+0x120/0x2f0 mm/slub.c:3275 kmalloc_node include/linux/slab.h:625 [inline] kzalloc_node include/linux/slab.h:749 [inline] __get_vm_area_node+0x119/0x2d0 mm/vmalloc.c:2456 __vmalloc_node_range+0xef/0x8b0 mm/vmalloc.c:3060 __vmalloc_node mm/vmalloc.c:3120 [inline] vzalloc+0x75/0x80 mm/vmalloc.c:3190 alloc_counters+0xcc/0x750 net/ipv4/netfilter/arp_tables.c:671 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:844 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0xa3e/0x1130 net/ipv6/netfilter/ip6_tables.c:1681 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257 __do_sys_getsockopt net/socket.c:2272 [inline] __se_sys_getsockopt net/socket.c:2269 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1341 [inline] free_pcp_prepare mm/page_alloc.c:1392 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3325 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3404 __vunmap+0x8e0/0xa80 mm/vmalloc.c:2661 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:887 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0xe4b/0x1130 net/ipv6/netfilter/ip6_tables.c:1681 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257 __do_sys_getsockopt net/socket.c:2272 [inline] __se_sys_getsockopt net/socket.c:2269 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88802b979680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802b979700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88802b979780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88802b979800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88802b979880: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ================================================================== final repro crashed as (corrupted=false): ================================================================== BUG: KASAN: use-after-free in pool_ctr+0x8d2/0xde0 drivers/md/dm-thin.c:3360 Read of size 8 at addr ffff88802b979798 by task syz.0.17/4470 CPU: 0 PID: 4470 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 pool_ctr+0x8d2/0xde0 drivers/md/dm-thin.c:3360 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f1585b59b59 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:00007ffcd0f8cd38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1585de5fa0 RCX: 00007f1585b59b59 RDX: 0000200000000d40 RSI: 00000000c138fd09 RDI: 0000000000000003 RBP: 00007f1585bea18b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1585de5fa0 R15: 00007f1585de5fa0 Allocated by task 4470: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:625 [inline] dm_get_table_device+0x1a3/0x550 drivers/md/dm.c:713 dm_get_device+0x3b3/0x7e0 drivers/md/dm-table.c:381 pool_ctr+0x4ba/0xde0 drivers/md/dm-thin.c:3326 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4470: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 dm_put_table_device+0x24b/0x2a0 drivers/md/dm.c:749 upgrade_mode drivers/md/dm-table.c:330 [inline] dm_get_device+0x620/0x7e0 drivers/md/dm-table.c:391 pool_ctr+0x5c9/0xde0 drivers/md/dm-thin.c:3333 dm_table_add_target+0x5a2/0xba0 drivers/md/dm-table.c:723 populate_table drivers/md/dm-ioctl.c:1433 [inline] table_load+0x2ce/0x760 drivers/md/dm-ioctl.c:1475 ctl_ioctl drivers/md/dm-ioctl.c:2032 [inline] dm_ctl_ioctl+0x947/0xd00 drivers/md/dm-ioctl.c:2054 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88802b979780 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 24 bytes inside of 64-byte region [ffff88802b979780, ffff88802b9797c0) The buggy address belongs to the page: page:ffffea0000ae5e40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b979 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888017841640 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4361, ts 70336371098, free_ts 70336302199 prep_new_page mm/page_alloc.c:2427 [inline] get_page_from_freelist+0x2510/0x2680 mm/page_alloc.c:4202 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5511 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] kmem_cache_alloc_node_trace+0x120/0x2f0 mm/slub.c:3275 kmalloc_node include/linux/slab.h:625 [inline] kzalloc_node include/linux/slab.h:749 [inline] __get_vm_area_node+0x119/0x2d0 mm/vmalloc.c:2456 __vmalloc_node_range+0xef/0x8b0 mm/vmalloc.c:3060 __vmalloc_node mm/vmalloc.c:3120 [inline] vzalloc+0x75/0x80 mm/vmalloc.c:3190 alloc_counters+0xcc/0x750 net/ipv4/netfilter/arp_tables.c:671 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:844 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0xa3e/0x1130 net/ipv6/netfilter/ip6_tables.c:1681 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257 __do_sys_getsockopt net/socket.c:2272 [inline] __se_sys_getsockopt net/socket.c:2269 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1341 [inline] free_pcp_prepare mm/page_alloc.c:1392 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3325 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3404 __vunmap+0x8e0/0xa80 mm/vmalloc.c:2661 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:887 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0xe4b/0x1130 net/ipv6/netfilter/ip6_tables.c:1681 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x43f/0x2390 net/ipv6/ipv6_sockglue.c:1492 tcp_getsockopt+0x209/0x25e0 net/ipv4/tcp.c:4325 __sys_getsockopt+0x1b0/0x230 net/socket.c:2257 __do_sys_getsockopt net/socket.c:2272 [inline] __se_sys_getsockopt net/socket.c:2269 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2269 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88802b979680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802b979700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88802b979780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88802b979800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88802b979880: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ==================================================================