Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 14.778990] ================================================================== [ 14.780036] BUG: KASAN: slab-use-after-free in kmem_cache_double_destroy+0x1bf/0x380 [ 14.780248] Read of size 1 at addr ffff888101c8f640 by task kunit_try_catch/235 [ 14.780479] [ 14.780654] CPU: 1 UID: 0 PID: 235 Comm: kunit_try_catch Tainted: G B N 6.15.2-rc1 #1 PREEMPT(voluntary) [ 14.780717] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.780733] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.780758] Call Trace: [ 14.780837] <TASK> [ 14.780862] dump_stack_lvl+0x73/0xb0 [ 14.780898] print_report+0xd1/0x650 [ 14.780922] ? __virt_addr_valid+0x1db/0x2d0 [ 14.780949] ? kmem_cache_double_destroy+0x1bf/0x380 [ 14.780971] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.780994] ? kmem_cache_double_destroy+0x1bf/0x380 [ 14.781018] kasan_report+0x141/0x180 [ 14.781041] ? kmem_cache_double_destroy+0x1bf/0x380 [ 14.781067] ? kmem_cache_double_destroy+0x1bf/0x380 [ 14.781090] __kasan_check_byte+0x3d/0x50 [ 14.781113] kmem_cache_destroy+0x25/0x1d0 [ 14.781229] kmem_cache_double_destroy+0x1bf/0x380 [ 14.781286] ? __pfx_kmem_cache_double_destroy+0x10/0x10 [ 14.781312] ? finish_task_switch.isra.0+0x153/0x700 [ 14.781345] ? __switch_to+0x5d9/0xf60 [ 14.781371] ? dequeue_task_fair+0x166/0x4e0 [ 14.781401] ? __pfx_read_tsc+0x10/0x10 [ 14.781425] ? ktime_get_ts64+0x86/0x230 [ 14.781456] kunit_try_run_case+0x1a5/0x480 [ 14.781486] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.781508] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.781535] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.781571] ? __kthread_parkme+0x82/0x180 [ 14.781608] ? preempt_count_sub+0x50/0x80 [ 14.781636] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.781661] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.781686] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.781712] kthread+0x337/0x6f0 [ 14.781731] ? trace_preempt_on+0x20/0xc0 [ 14.781757] ? __pfx_kthread+0x10/0x10 [ 14.781831] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.781859] ? calculate_sigpending+0x7b/0xa0 [ 14.781886] ? __pfx_kthread+0x10/0x10 [ 14.781908] ret_from_fork+0x41/0x80 [ 14.781933] ? __pfx_kthread+0x10/0x10 [ 14.781952] ret_from_fork_asm+0x1a/0x30 [ 14.781986] </TASK> [ 14.781999] [ 14.790888] Allocated by task 235: [ 14.791343] kasan_save_stack+0x45/0x70 [ 14.791487] kasan_save_track+0x18/0x40 [ 14.792081] kasan_save_alloc_info+0x3b/0x50 [ 14.792280] __kasan_slab_alloc+0x91/0xa0 [ 14.792397] kmem_cache_alloc_noprof+0x123/0x3f0 [ 14.792514] __kmem_cache_create_args+0x169/0x240 [ 14.792678] kmem_cache_double_destroy+0xd5/0x380 [ 14.792800] kunit_try_run_case+0x1a5/0x480 [ 14.792928] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.793058] kthread+0x337/0x6f0 [ 14.793167] ret_from_fork+0x41/0x80 [ 14.793275] ret_from_fork_asm+0x1a/0x30 [ 14.793380] [ 14.793438] Freed by task 235: [ 14.793543] kasan_save_stack+0x45/0x70 [ 14.794676] kasan_save_track+0x18/0x40 [ 14.794917] kasan_save_free_info+0x3f/0x60 [ 14.795047] __kasan_slab_free+0x56/0x70 [ 14.795210] kmem_cache_free+0x249/0x420 [ 14.795484] slab_kmem_cache_release+0x2e/0x40 [ 14.796114] kmem_cache_release+0x16/0x20 [ 14.796442] kobject_put+0x181/0x450 [ 14.796705] sysfs_slab_release+0x16/0x20 [ 14.796803] kmem_cache_destroy+0xf0/0x1d0 [ 14.796896] kmem_cache_double_destroy+0x14e/0x380 [ 14.796997] kunit_try_run_case+0x1a5/0x480 [ 14.797446] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.797575] kthread+0x337/0x6f0 [ 14.797859] ret_from_fork+0x41/0x80 [ 14.798064] ret_from_fork_asm+0x1a/0x30 [ 14.798170] [ 14.798235] The buggy address belongs to the object at ffff888101c8f640 [ 14.798235] which belongs to the cache kmem_cache of size 208 [ 14.798492] The buggy address is located 0 bytes inside of [ 14.798492] freed 208-byte region [ffff888101c8f640, ffff888101c8f710) [ 14.799022] [ 14.799247] The buggy address belongs to the physical page: [ 14.800018] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c8f [ 14.800464] flags: 0x200000000000000(node=0|zone=2) [ 14.800594] page_type: f5(slab) [ 14.801095] raw: 0200000000000000 ffff888100041000 dead000000000122 0000000000000000 [ 14.801254] raw: 0000000000000000 00000000800c000c 00000000f5000000 0000000000000000 [ 14.801508] page dumped because: kasan: bad access detected [ 14.801972] [ 14.802206] Memory state around the buggy address: [ 14.802379] ffff888101c8f500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 14.802575] ffff888101c8f580: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc [ 14.803072] >ffff888101c8f600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 14.803249] ^ [ 14.803414] ffff888101c8f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 14.803617] ffff888101c8f700: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.804071] ==================================================================