program: r0 = openat$dm_control(0xffffffffffffff9c, &(0x7f0000000000), 0x2, 0x0) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000040)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x0, 0x0, 0x0, {0x0, {'syz', 0x0, '2\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000180)={0x4, 0x0, 0x0, 0x180, 0x138, 0x1, 0x0, 0x80000, 0x0, 0x0, @by_dev={r1}, [@clone={0x0, 0x418, 0x0, 0x48, 'clone\x00', {@ram={'/dev/ram', 0x0}, 0x20, @ram={'/dev/ram', 0x0}, 0x20, @ram={'/dev/ram', 0x0}, 0x20, '8'}}]}) ioctl$DM_DEV_REMOVE(r0, 0xc138fd04, &(0x7f0000000300)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x1000, 0x0, 0x0, @by_dev={r1}}) ioctl$DM_DEV_CREATE(r0, 0xc138fd03, &(0x7f0000000440)={0x4, 0x0, 0x0, 0x138, 0x138, 0x0, 0x0, 0x400, 0x0, 0x0, {0x0, {'syz', 0x0, '1\x00'}}}) ioctl$DM_TABLE_LOAD(r0, 0xc138fd09, &(0x7f0000000580)={0x4, 0x0, 0x0, 0x1c0, 0x138, 0x1, 0x0, 0x80010, 0x0, 0x0, @by_dev={r2}, [@snapshot={0x0, 0x490, 0x0, 0x88, 'snapshot-merge\x00', {@ram_num={'1:', 0x0}, 0x20, @ram_num={'1:', 0x0}, 0x20, 'PO', 0x20, '7', ' 2 discard_zeroes_cow discard_passdown_origin'}}]}) r3 = bpf$MAP_CREATE(0x0, &(0x7f0000000740)=ANY=[@ANYBLOB="0300000004000000040000000400000000000000", @ANYRES32, @ANYBLOB="070000008657c3e1096e269bf0a4116b9f98f400", @ANYRES32=0x0, @ANYRES32, @ANYBLOB='\x00'/28], 0x50) bpf$PROG_LOAD(0x5, &(0x7f00000007c0)={0x1f, 0x17, &(0x7f0000000880)=ANY=[@ANYBLOB="1800000000000000000000000000000018110000", @ANYRES32=r3, @ANYBLOB="0000000000000000b702000014000000b7030000000000008500000005000000bf0900000000000066090600000003e70400000006000000180100002020702500000000002020207b9af8ff00000000ac9100000000000037010000f8ffffffb702000008000000b70300000000000014000000060000006e93000000000000b50302000000000085000000b7000000b70000000000000095"], &(0x7f0000000940)='GPL\x00', 0x0, 0x0, 0x0, 0x41100, 0x56, '\x00', 0x0, @fallback, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffffffff}, 0x94) [ 94.106688][ T5303] Bluetooth: hci0: command tx timeout [ 94.341315][ T5354] ================================================================== [ 94.341327][ T5354] BUG: KASAN: slab-use-after-free in snapshot_ctr+0x5cb/0x1340 [ 94.341461][ T5354] Read of size 8 at addr ffff888013893198 by task syz.0.0/5354 [ 94.341471][ T5354] [ 94.341478][ T5354] CPU: 0 UID: 0 PID: 5354 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 94.341490][ T5354] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 94.341498][ T5354] Call Trace: [ 94.341503][ T5354] [ 94.341509][ T5354] dump_stack_lvl+0xe8/0x150 [ 94.341538][ T5354] print_address_description+0x55/0x1e0 [ 94.341556][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.341569][ T5354] print_report+0x58/0x70 [ 94.341605][ T5354] kasan_report+0x117/0x150 [ 94.341632][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.341649][ T5354] snapshot_ctr+0x5cb/0x1340 [ 94.341666][ T5354] ? __pfx_snapshot_ctr+0x10/0x10 [ 94.341681][ T5354] ? skip_spaces+0x8a/0xa0 [ 94.341737][ T5354] ? dm_split_args+0x50b/0x5d0 [ 94.341751][ T5354] dm_table_add_target+0x58d/0xc70 [ 94.341768][ T5354] table_load+0x325/0x8a0 [ 94.341786][ T5354] ? __pfx_table_load+0x10/0x10 [ 94.341806][ T5354] dm_ctl_ioctl+0x9ec/0xe10 [ 94.341823][ T5354] ? __pfx_table_load+0x10/0x10 [ 94.341838][ T5354] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 94.341860][ T5354] ? __fget_files+0x2a/0x420 [ 94.341879][ T5354] ? bpf_lsm_file_ioctl+0x9/0x20 [ 94.341892][ T5354] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 94.341914][ T5354] __se_sys_ioctl+0xfc/0x170 [ 94.341928][ T5354] do_syscall_64+0x166/0x520 [ 94.341947][ T5354] ? trace_irq_disable+0x3b/0x140 [ 94.341972][ T5354] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.341984][ T5354] ? clear_bhb_loop+0x70/0xc0 [ 94.341997][ T5354] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.342010][ T5354] RIP: 0033:0x7ff04d99f559 [ 94.342022][ T5354] 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 [ 94.342032][ T5354] RSP: 002b:00007ff04e855fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 94.342046][ T5354] RAX: ffffffffffffffda RBX: 00007ff04dc26180 RCX: 00007ff04d99f559 [ 94.342055][ T5354] RDX: 0000200000000580 RSI: 00000000c138fd09 RDI: 0000000000000003 [ 94.342063][ T5354] RBP: 00007ff04da36b20 R08: 0000000000000000 R09: 0000000000000000 [ 94.342071][ T5354] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 94.342079][ T5354] R13: 00007ff04dc26218 R14: 00007ff04dc26180 R15: 00007ffe86c35498 [ 94.342093][ T5354] [ 94.342097][ T5354] [ 94.342100][ T5354] Allocated by task 5354: [ 94.342105][ T5354] kasan_save_track+0x3e/0x80 [ 94.342117][ T5354] __kasan_kmalloc+0x93/0xb0 [ 94.342127][ T5354] __kmalloc_cache_node_noprof+0x3cc/0x620 [ 94.342137][ T5354] dm_get_table_device+0x23e/0x730 [ 94.342149][ T5354] dm_get_device+0x327/0x760 [ 94.342159][ T5354] snapshot_ctr+0x2b2/0x1340 [ 94.342171][ T5354] dm_table_add_target+0x58d/0xc70 [ 94.342181][ T5354] table_load+0x325/0x8a0 [ 94.342195][ T5354] dm_ctl_ioctl+0x9ec/0xe10 [ 94.342209][ T5354] __se_sys_ioctl+0xfc/0x170 [ 94.342219][ T5354] do_syscall_64+0x166/0x520 [ 94.342228][ T5354] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.342238][ T5354] [ 94.342241][ T5354] Freed by task 5354: [ 94.342246][ T5354] kasan_save_track+0x3e/0x80 [ 94.342255][ T5354] kasan_save_free_info+0x40/0x50 [ 94.342269][ T5354] __kasan_slab_free+0x5c/0x80 [ 94.342279][ T5354] kfree+0x1c5/0x650 [ 94.342291][ T5354] dm_put_table_device+0x255/0x2a0 [ 94.342302][ T5354] dm_get_device+0x56f/0x760 [ 94.342311][ T5354] snapshot_ctr+0x471/0x1340 [ 94.342323][ T5354] dm_table_add_target+0x58d/0xc70 [ 94.342332][ T5354] table_load+0x325/0x8a0 [ 94.342346][ T5354] dm_ctl_ioctl+0x9ec/0xe10 [ 94.342360][ T5354] __se_sys_ioctl+0xfc/0x170 [ 94.342370][ T5354] do_syscall_64+0x166/0x520 [ 94.342379][ T5354] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.342389][ T5354] [ 94.342392][ T5354] The buggy address belongs to the object at ffff888013893180 [ 94.342392][ T5354] which belongs to the cache kmalloc-96 of size 96 [ 94.342401][ T5354] The buggy address is located 24 bytes inside of [ 94.342401][ T5354] freed 96-byte region [ffff888013893180, ffff8880138931e0) [ 94.342412][ T5354] [ 94.342415][ T5354] The buggy address belongs to the physical page: [ 94.342420][ T5354] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13893 [ 94.342431][ T5354] flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) [ 94.342440][ T5354] page_type: f5(slab) [ 94.342450][ T5354] raw: 00fff00000000000 ffff88801c441280 dead000000000100 dead000000000122 [ 94.342461][ T5354] raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000 [ 94.342467][ T5354] page dumped because: kasan: bad access detected [ 94.342472][ T5354] page_owner tracks the page as allocated [ 94.342476][ T5354] page last allocated via order 0, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5345, tgid 5344 (syz.0.0), ts 94182348273 [ 94.342526][ T5354] post_alloc_hook+0x1f9/0x250 [ 94.342543][ T5354] get_page_from_freelist+0x220f/0x2280 [ 94.342554][ T5354] __alloc_pages_slowpath+0x3f9/0xec0 [ 94.342564][ T5354] __alloc_frozen_pages_noprof+0x38d/0x400 [ 94.342574][ T5354] allocate_slab+0x7d/0x5e0 [ 94.342586][ T5354] ___slab_alloc+0x16a/0x960 [ 94.342597][ T5354] __kmalloc_cache_node_noprof+0x1d6/0x620 [ 94.342606][ T5354] __alloc_workqueue+0x7dc/0x21d0 [ 94.342618][ T5354] alloc_workqueue_noprof+0xe3/0x210 [ 94.342627][ T5354] dm_create+0xb8d/0xf70 [ 94.342638][ T5354] dev_create+0x1f7/0x400 [ 94.342652][ T5354] dm_ctl_ioctl+0x9ec/0xe10 [ 94.342666][ T5354] __se_sys_ioctl+0xfc/0x170 [ 94.342678][ T5354] do_syscall_64+0x166/0x520 [ 94.342687][ T5354] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.342697][ T5354] page last free pid 1376 tgid 1376 ts 94113991789 stack trace: [ 94.342705][ T5354] __free_frozen_pages+0xc97/0xd90 [ 94.342719][ T5354] __slab_free+0x269/0x2c0 [ 94.342728][ T5354] qlist_free_all+0x99/0x100 [ 94.342737][ T5354] kasan_quarantine_reduce+0x148/0x160 [ 94.342747][ T5354] __kasan_slab_alloc+0x22/0x80 [ 94.342757][ T5354] kmem_cache_alloc_node_noprof+0x34f/0x600 [ 94.342772][ T5354] __alloc_skb+0x1db/0x7a0 [ 94.342794][ T5354] mld_newpack+0x165/0xcb0 [ 94.342818][ T5354] add_grec+0x119f/0x19d0 [ 94.342829][ T5354] mld_ifc_work+0x6f1/0xd60 [ 94.342840][ T5354] process_scheduled_works+0xc3d/0x1630 [ 94.342855][ T5354] worker_thread+0xa47/0xfb0 [ 94.342870][ T5354] kthread+0x38b/0x480 [ 94.342881][ T5354] ret_from_fork+0x514/0xb70 [ 94.342893][ T5354] ret_from_fork_asm+0x1a/0x30 [ 94.342903][ T5354] [ 94.342906][ T5354] Memory state around the buggy address: [ 94.342918][ T5354] ffff888013893080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.342926][ T5354] ffff888013893100: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 94.342933][ T5354] >ffff888013893180: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 94.342939][ T5354] ^ [ 94.342945][ T5354] ffff888013893200: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc [ 94.342953][ T5354] ffff888013893280: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 94.342960][ T5354] ================================================================== [ 94.345869][ T5354] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 94.647439][ T5354] CPU: 0 UID: 0 PID: 5354 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 94.651204][ T5354] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 94.655478][ T5354] Call Trace: [ 94.656935][ T5354] [ 94.658215][ T5354] vpanic+0x56d/0xa60 [ 94.659939][ T5354] ? __pfx_vpanic+0x10/0x10 [ 94.661948][ T5354] panic+0xc5/0xd0 [ 94.663533][ T5354] ? __pfx_panic+0x10/0x10 [ 94.665174][ T5354] ? preempt_schedule_thunk+0x16/0x40 [ 94.667185][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.669223][ T5354] ? preempt_schedule_thunk+0x16/0x40 [ 94.671465][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.673472][ T5354] check_panic_on_warn+0x89/0xb0 [ 94.675539][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.677510][ T5354] end_report+0x73/0x170 [ 94.679382][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.681410][ T5354] kasan_report+0x128/0x150 [ 94.683403][ T5354] ? snapshot_ctr+0x5cb/0x1340 [ 94.685369][ T5354] snapshot_ctr+0x5cb/0x1340 [ 94.687353][ T5354] ? __pfx_snapshot_ctr+0x10/0x10 [ 94.689639][ T5354] ? skip_spaces+0x8a/0xa0 [ 94.691613][ T5354] ? dm_split_args+0x50b/0x5d0 [ 94.693729][ T5354] dm_table_add_target+0x58d/0xc70 [ 94.696102][ T5354] table_load+0x325/0x8a0 [ 94.698468][ T5354] ? __pfx_table_load+0x10/0x10 [ 94.701293][ T5354] dm_ctl_ioctl+0x9ec/0xe10 [ 94.703880][ T5354] ? __pfx_table_load+0x10/0x10 [ 94.706604][ T5354] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 94.709487][ T5354] ? __fget_files+0x2a/0x420 [ 94.712044][ T5354] ? bpf_lsm_file_ioctl+0x9/0x20 [ 94.714144][ T5354] ? __pfx_dm_ctl_ioctl+0x10/0x10 [ 94.716336][ T5354] __se_sys_ioctl+0xfc/0x170 [ 94.718300][ T5354] do_syscall_64+0x166/0x520 [ 94.720331][ T5354] ? trace_irq_disable+0x3b/0x140 [ 94.722600][ T5354] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.725350][ T5354] ? clear_bhb_loop+0x70/0xc0 [ 94.727493][ T5354] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 94.730136][ T5354] RIP: 0033:0x7ff04d99f559 [ 94.732177][ T5354] 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 [ 94.740395][ T5354] RSP: 002b:00007ff04e855fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 94.744068][ T5354] RAX: ffffffffffffffda RBX: 00007ff04dc26180 RCX: 00007ff04d99f559 [ 94.747091][ T5354] RDX: 0000200000000580 RSI: 00000000c138fd09 RDI: 0000000000000003 [ 94.750011][ T5354] RBP: 00007ff04da36b20 R08: 0000000000000000 R09: 0000000000000000 [ 94.753238][ T5354] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 94.756552][ T5354] R13: 00007ff04dc26218 R14: 00007ff04dc26180 R15: 00007ffe86c35498 [ 94.759652][ T5354] [ 94.761435][ T5354] Kernel Offset: disabled [ 94.763319][ T5354] Rebooting in 86400 seconds..