program: r0 = syz_open_dev$radio(&(0x7f0000000000), 0xffffffffffffffff, 0x2) ioctl$VIDIOC_S_EXT_CTRLS(r0, 0xc0205647, &(0x7f0000000040)={0xf000000, 0x1, 0x0, 0xffffffffffffffff, 0x0, &(0x7f0000000080)={0x98f903, 0x0, '\x00', @string=0x0}}) r1 = socket$kcm(0x21, 0x2, 0xa) sendmsg$kcm(r1, &(0x7f00000000c0)={0x0, 0x0, 0x0, 0x0, &(0x7f0000000100)=[{0x18, 0x110, 0xa, "1f"}], 0x18}, 0xfc40) r2 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000240), 0x2, 0x0) ioctl$DM_DEV_CREATE(r2, 0xc138fd03, &(0x7f0000000280)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x0, 0x0, 0x0, {0x0, {'syz', 0x0, '2\x00'}}}) ioctl$DM_TABLE_LOAD(r2, 0xc138fd09, &(0x7f0000000740)={0x4, 0x0, 0x0, 0x1a8, 0x138, 0x1, 0x0, 0x0, 0x0, 0x0, @by_name={0x0, {'syz', 0x0, '2\x00'}}, [@thin_pool={0x0, 0x2000, 0x0, 0x70, 'thin-pool\x00', {@ram={'/dev/ram', 0x0}, 0x20, @ram_num={'1:', 0x0}, 0x20, '128', 0x20, 0x0, ' 1 read_only'}}]}) [ 95.450060][ T48] Bluetooth: hci0: command tx timeout [ 95.647817][ T5341] ================================================================== [ 95.647832][ T5341] BUG: KASAN: slab-use-after-free in pool_ctr+0x874/0xd60 [ 95.647965][ T5341] Read of size 8 at addr ffff88804050fe18 by task syz.0.0/5341 [ 95.647976][ T5341] [ 95.647984][ T5341] CPU: 0 UID: 0 PID: 5341 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 95.647998][ T5341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 95.648006][ T5341] Call Trace: [ 95.648011][ T5341] [ 95.648017][ T5341] dump_stack_lvl+0xe8/0x150 [ 95.648067][ T5341] print_address_description+0x55/0x1e0 [ 95.648086][ T5341] ? pool_ctr+0x874/0xd60 [ 95.648098][ T5341] print_report+0x58/0x70 [ 95.648115][ T5341] kasan_report+0x117/0x150 [ 95.648134][ T5341] ? pool_ctr+0x874/0xd60 [ 95.648146][ T5341] pool_ctr+0x874/0xd60 [ 95.648159][ T5341] ? __pfx_pool_ctr+0x10/0x10 [ 95.648171][ T5341] ? rcu_is_watching+0x16/0xb0 [ 95.648189][ T5341] ? kfree+0x4d/0x650 [ 95.648200][ T5341] ? skip_spaces+0x8a/0xa0 [ 95.648248][ T5341] ? dm_split_args+0x50b/0x5d0 [ 95.648265][ T5341] dm_table_add_target+0x58d/0xc70 [ 95.648282][ T5341] table_load+0x325/0x8a0 [ 95.648296][ T5341] ? __pfx_table_load+0x10/0x10 [ 95.648309][ T5341] ? __might_fault+0xaf/0x130 [ 95.648322][ T5341] dm_ctl_ioctl+0x9ec/0xe10 [ 95.648336][ T5341] ? __pfx_table_load+0x10/0x10 [ 95.648347][ T5341] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 95.648367][ T5341] ? __fget_files+0x2a/0x420 [ 95.648381][ T5341] ? bpf_lsm_file_ioctl+0x9/0x20 [ 95.648397][ T5341] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 95.648409][ T5341] __se_sys_ioctl+0xfc/0x170 [ 95.648433][ T5341] do_syscall_64+0x16a/0x530 [ 95.648479][ T5341] ? trace_irq_disable+0x3b/0x140 [ 95.648497][ T5341] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.648510][ T5341] ? clear_bhb_loop+0x70/0xc0 [ 95.648525][ T5341] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.648537][ T5341] RIP: 0033:0x7fdcc339fb19 [ 95.648550][ T5341] 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 [ 95.648560][ T5341] RSP: 002b:00007fdcc42e3fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 95.648574][ T5341] RAX: ffffffffffffffda RBX: 00007fdcc3625fa0 RCX: 00007fdcc339fb19 [ 95.648583][ T5341] RDX: 0000200000000740 RSI: 00000000c138fd09 RDI: 0000000000000005 [ 95.648591][ T5341] RBP: 00007fdcc3437b70 R08: 0000000000000000 R09: 0000000000000000 [ 95.648598][ T5341] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 95.648606][ T5341] R13: 00007fdcc3626038 R14: 00007fdcc3625fa0 R15: 00007ffdb4cc3008 [ 95.648619][ T5341] [ 95.648623][ T5341] [ 95.648627][ T5341] Allocated by task 5341: [ 95.648633][ T5341] kasan_save_track+0x3e/0x80 [ 95.648649][ T5341] __kasan_kmalloc+0x93/0xb0 [ 95.648664][ T5341] __kmalloc_cache_node_noprof+0x3cc/0x620 [ 95.648678][ T5341] dm_get_table_device+0x23e/0x730 [ 95.648691][ T5341] dm_get_device+0x327/0x760 [ 95.648701][ T5341] pool_ctr+0x4ae/0xd60 [ 95.648710][ T5341] dm_table_add_target+0x58d/0xc70 [ 95.648721][ T5341] table_load+0x325/0x8a0 [ 95.648731][ T5341] dm_ctl_ioctl+0x9ec/0xe10 [ 95.648740][ T5341] __se_sys_ioctl+0xfc/0x170 [ 95.648753][ T5341] do_syscall_64+0x16a/0x530 [ 95.648762][ T5341] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.648772][ T5341] [ 95.648775][ T5341] Freed by task 5341: [ 95.648780][ T5341] kasan_save_track+0x3e/0x80 [ 95.648793][ T5341] kasan_save_free_info+0x40/0x50 [ 95.648804][ T5341] __kasan_slab_free+0x5c/0x80 [ 95.648817][ T5341] kfree+0x1c5/0x650 [ 95.648827][ T5341] dm_put_table_device+0x255/0x2a0 [ 95.648840][ T5341] dm_get_device+0x56f/0x760 [ 95.648850][ T5341] pool_ctr+0x585/0xd60 [ 95.648859][ T5341] dm_table_add_target+0x58d/0xc70 [ 95.648869][ T5341] table_load+0x325/0x8a0 [ 95.648879][ T5341] dm_ctl_ioctl+0x9ec/0xe10 [ 95.648888][ T5341] __se_sys_ioctl+0xfc/0x170 [ 95.648902][ T5341] do_syscall_64+0x16a/0x530 [ 95.648912][ T5341] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 95.648922][ T5341] [ 95.648924][ T5341] The buggy address belongs to the object at ffff88804050fe00 [ 95.648924][ T5341] which belongs to the cache kmalloc-96 of size 96 [ 95.648933][ T5341] The buggy address is located 24 bytes inside of [ 95.648933][ T5341] freed 96-byte region [ffff88804050fe00, ffff88804050fe60) [ 95.648944][ T5341] [ 95.648947][ T5341] The buggy address belongs to the physical page: [ 95.648953][ T5341] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4050f [ 95.648964][ T5341] flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) [ 95.648975][ T5341] page_type: f5(slab) [ 95.648986][ T5341] raw: 04fff00000000000 ffff88801c841280 dead000000000100 dead000000000122 [ 95.648995][ T5341] raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000 [ 95.649001][ T5341] page dumped because: kasan: bad access detected [ 95.649007][ T5341] page_owner tracks the page as allocated [ 95.649012][ T5341] page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 24018029097 [ 95.649029][ T5341] post_alloc_hook+0x1f9/0x250 [ 95.649040][ T5341] get_page_from_freelist+0x2224/0x2290 [ 95.649053][ T5341] __alloc_frozen_pages_noprof+0x1fe/0x410 [ 95.649067][ T5341] allocate_slab+0x7d/0x5e0 [ 95.649076][ T5341] ___slab_alloc+0x16a/0x960 [ 95.649091][ T5341] __kmalloc_cache_node_noprof+0x1d6/0x620 [ 95.649104][ T5341] __alloc_workqueue+0x7dc/0x21d0 [ 95.649115][ T5341] alloc_workqueue_noprof+0xe3/0x210 [ 95.649127][ T5341] vivid_init+0x5b3/0x620 [ 95.649177][ T5341] do_one_initcall+0x250/0x870 [ 95.649189][ T5341] do_initcall_level+0x10a/0x1a0 [ 95.649203][ T5341] do_initcalls+0x59/0xa0 [ 95.649216][ T5341] kernel_init_freeable+0x29d/0x3e0 [ 95.649229][ T5341] kernel_init+0x22/0x1d0 [ 95.649241][ T5341] ret_from_fork+0x514/0xb70 [ 95.649254][ T5341] ret_from_fork_asm+0x1a/0x30 [ 95.649265][ T5341] page last free pid 183 tgid 183 ts 24016930104 stack trace: [ 95.649273][ T5341] __free_frozen_pages+0xc97/0xd90 [ 95.649285][ T5341] __kasan_populate_vmalloc+0x1a8/0x1c0 [ 95.649298][ T5341] alloc_vmap_area+0xd10/0x1410 [ 95.649308][ T5341] __get_vm_area_node+0x200/0x2f0 [ 95.649317][ T5341] __vmalloc_node_range_noprof+0x36e/0x16f0 [ 95.649329][ T5341] __vmalloc_node_noprof+0xc2/0x100 [ 95.649339][ T5341] dup_task_struct+0x2c6/0xa00 [ 95.649353][ T5341] copy_process+0x7ea/0x4510 [ 95.649365][ T5341] kernel_clone+0x2d7/0x940 [ 95.649379][ T5341] user_mode_thread+0x115/0x180 [ 95.649393][ T5341] call_usermodehelper_exec_work+0x5c/0x230 [ 95.649406][ T5341] process_scheduled_works+0xc3d/0x1630 [ 95.649421][ T5341] worker_thread+0xa47/0xfb0 [ 95.649436][ T5341] kthread+0x38b/0x480 [ 95.649448][ T5341] ret_from_fork+0x514/0xb70 [ 95.649460][ T5341] ret_from_fork_asm+0x1a/0x30 [ 95.649472][ T5341] [ 95.649475][ T5341] Memory state around the buggy address: [ 95.649481][ T5341] ffff88804050fd00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 95.649488][ T5341] ffff88804050fd80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 95.649495][ T5341] >ffff88804050fe00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 95.649501][ T5341] ^ [ 95.649507][ T5341] ffff88804050fe80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 95.649513][ T5341] ffff88804050ff00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 95.649520][ T5341] ================================================================== [ 95.649642][ T5341] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 95.962580][ T5341] CPU: 0 UID: 0 PID: 5341 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 95.966428][ T5341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 95.970711][ T5341] Call Trace: [ 95.972231][ T5341] [ 95.973530][ T5341] vpanic+0x26f/0x710 [ 95.975254][ T5341] panic+0xc5/0xd0 [ 95.976950][ T5341] ? __pfx_panic+0x10/0x10 [ 95.978889][ T5341] ? preempt_schedule_thunk+0x16/0x40 [ 95.981167][ T5341] ? pool_ctr+0x874/0xd60 [ 95.982994][ T5341] ? preempt_schedule_thunk+0x16/0x40 [ 95.985387][ T5341] ? pool_ctr+0x874/0xd60 [ 95.987362][ T5341] check_panic_on_warn+0x89/0xb0 [ 95.989527][ T5341] ? pool_ctr+0x874/0xd60 [ 95.991351][ T5341] end_report+0x73/0x170 [ 95.993168][ T5341] ? pool_ctr+0x874/0xd60 [ 95.995008][ T5341] kasan_report+0x128/0x150 [ 95.996969][ T5341] ? pool_ctr+0x874/0xd60 [ 95.998876][ T5341] pool_ctr+0x874/0xd60 [ 96.000704][ T5341] ? __pfx_pool_ctr+0x10/0x10 [ 96.002706][ T5341] ? rcu_is_watching+0x16/0xb0 [ 96.004718][ T5341] ? kfree+0x4d/0x650 [ 96.006581][ T5341] ? skip_spaces+0x8a/0xa0 [ 96.008619][ T5341] ? dm_split_args+0x50b/0x5d0 [ 96.010733][ T5341] dm_table_add_target+0x58d/0xc70 [ 96.012949][ T5341] table_load+0x325/0x8a0 [ 96.014759][ T5341] ? __pfx_table_load+0x10/0x10 [ 96.016869][ T5341] ? __might_fault+0xaf/0x130 [ 96.018887][ T5341] dm_ctl_ioctl+0x9ec/0xe10 [ 96.020896][ T5341] ? __pfx_table_load+0x10/0x10 [ 96.023073][ T5341] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 96.025322][ T5341] ? __fget_files+0x2a/0x420 [ 96.027398][ T5341] ? bpf_lsm_file_ioctl+0x9/0x20 [ 96.029610][ T5341] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 96.031846][ T5341] __se_sys_ioctl+0xfc/0x170 [ 96.033852][ T5341] do_syscall_64+0x16a/0x530 [ 96.035867][ T5341] ? trace_irq_disable+0x3b/0x140 [ 96.038050][ T5341] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 96.040743][ T5341] ? clear_bhb_loop+0x70/0xc0 [ 96.042759][ T5341] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 96.045296][ T5341] RIP: 0033:0x7fdcc339fb19 [ 96.047235][ T5341] 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 [ 96.055334][ T5341] RSP: 002b:00007fdcc42e3fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 96.058934][ T5341] RAX: ffffffffffffffda RBX: 00007fdcc3625fa0 RCX: 00007fdcc339fb19 [ 96.062399][ T5341] RDX: 0000200000000740 RSI: 00000000c138fd09 RDI: 0000000000000005 [ 96.065896][ T5341] RBP: 00007fdcc3437b70 R08: 0000000000000000 R09: 0000000000000000 [ 96.069440][ T5341] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 96.072819][ T5341] R13: 00007fdcc3626038 R14: 00007fdcc3625fa0 R15: 00007ffdb4cc3008 [ 96.076262][ T5341] [ 96.078082][ T5341] Kernel Offset: disabled [ 96.079918][ T5341] Rebooting in 86400 seconds..