Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.925307] ================================================================== [ 18.925368] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 18.925683] Free of addr fff00000c785f001 by task kunit_try_catch/211 [ 18.925803] [ 18.925910] CPU: 1 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.926022] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.926049] Hardware name: linux,dummy-virt (DT) [ 18.926083] Call trace: [ 18.926123] show_stack+0x20/0x38 (C) [ 18.926225] dump_stack_lvl+0x8c/0xd0 [ 18.926275] print_report+0x118/0x608 [ 18.926330] kasan_report_invalid_free+0xc0/0xe8 [ 18.926573] check_slab_allocation+0xfc/0x108 [ 18.926678] __kasan_slab_pre_free+0x2c/0x48 [ 18.926826] kmem_cache_free+0xf0/0x468 [ 18.926890] kmem_cache_invalid_free+0x184/0x3c8 [ 18.926938] kunit_try_run_case+0x170/0x3f0 [ 18.926987] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.927039] kthread+0x328/0x630 [ 18.927081] ret_from_fork+0x10/0x20 [ 18.927130] [ 18.927148] Allocated by task 211: [ 18.927337] kasan_save_stack+0x3c/0x68 [ 18.927470] kasan_save_track+0x20/0x40 [ 18.927547] kasan_save_alloc_info+0x40/0x58 [ 18.927681] __kasan_slab_alloc+0xa8/0xb0 [ 18.927761] kmem_cache_alloc_noprof+0x10c/0x398 [ 18.927803] kmem_cache_invalid_free+0x12c/0x3c8 [ 18.927842] kunit_try_run_case+0x170/0x3f0 [ 18.927912] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.927956] kthread+0x328/0x630 [ 18.927989] ret_from_fork+0x10/0x20 [ 18.928025] [ 18.928044] The buggy address belongs to the object at fff00000c785f000 [ 18.928044] which belongs to the cache test_cache of size 200 [ 18.928112] The buggy address is located 1 bytes inside of [ 18.928112] 200-byte region [fff00000c785f000, fff00000c785f0c8) [ 18.928171] [ 18.928197] The buggy address belongs to the physical page: [ 18.928239] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10785f [ 18.928302] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.928351] page_type: f5(slab) [ 18.928400] raw: 0bfffe0000000000 fff00000c5ca5780 dead000000000122 0000000000000000 [ 18.928449] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.928498] page dumped because: kasan: bad access detected [ 18.928529] [ 18.928548] Memory state around the buggy address: [ 18.928578] fff00000c785ef00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 18.928627] fff00000c785ef80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 18.928678] >fff00000c785f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 18.928715] ^ [ 18.928748] fff00000c785f080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 18.928791] fff00000c785f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.928839] ==================================================================
[ 12.327098] ================================================================== [ 12.328469] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 12.329225] Free of addr ffff8881038e0001 by task kunit_try_catch/229 [ 12.330161] [ 12.330368] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.330418] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.330431] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.330467] Call Trace: [ 12.330482] <TASK> [ 12.330500] dump_stack_lvl+0x73/0xb0 [ 12.330531] print_report+0xd1/0x650 [ 12.330553] ? __virt_addr_valid+0x1db/0x2d0 [ 12.330578] ? kasan_complete_mode_report_info+0x2a/0x200 [ 12.330600] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.330625] kasan_report_invalid_free+0x10a/0x130 [ 12.330648] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.330673] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.330697] check_slab_allocation+0x11f/0x130 [ 12.330718] __kasan_slab_pre_free+0x28/0x40 [ 12.330738] kmem_cache_free+0xed/0x420 [ 12.330757] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.330777] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.330803] kmem_cache_invalid_free+0x1d8/0x460 [ 12.330827] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 12.330849] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 12.330879] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 12.330906] kunit_try_run_case+0x1a5/0x480 [ 12.330931] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.330952] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.330975] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.330997] ? __kthread_parkme+0x82/0x180 [ 12.331018] ? preempt_count_sub+0x50/0x80 [ 12.331042] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.331065] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.331086] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.331108] kthread+0x337/0x6f0 [ 12.331127] ? trace_preempt_on+0x20/0xc0 [ 12.331150] ? __pfx_kthread+0x10/0x10 [ 12.331169] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.331296] ? calculate_sigpending+0x7b/0xa0 [ 12.331329] ? __pfx_kthread+0x10/0x10 [ 12.331350] ret_from_fork+0x116/0x1d0 [ 12.331369] ? __pfx_kthread+0x10/0x10 [ 12.331388] ret_from_fork_asm+0x1a/0x30 [ 12.331419] </TASK> [ 12.331431] [ 12.345133] Allocated by task 229: [ 12.345703] kasan_save_stack+0x45/0x70 [ 12.345935] kasan_save_track+0x18/0x40 [ 12.346264] kasan_save_alloc_info+0x3b/0x50 [ 12.346606] __kasan_slab_alloc+0x91/0xa0 [ 12.346981] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.347443] kmem_cache_invalid_free+0x157/0x460 [ 12.347968] kunit_try_run_case+0x1a5/0x480 [ 12.348360] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.348623] kthread+0x337/0x6f0 [ 12.348893] ret_from_fork+0x116/0x1d0 [ 12.349184] ret_from_fork_asm+0x1a/0x30 [ 12.349435] [ 12.349542] The buggy address belongs to the object at ffff8881038e0000 [ 12.349542] which belongs to the cache test_cache of size 200 [ 12.350548] The buggy address is located 1 bytes inside of [ 12.350548] 200-byte region [ffff8881038e0000, ffff8881038e00c8) [ 12.351167] [ 12.351487] The buggy address belongs to the physical page: [ 12.351959] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e0 [ 12.352574] flags: 0x200000000000000(node=0|zone=2) [ 12.352932] page_type: f5(slab) [ 12.353359] raw: 0200000000000000 ffff888101690640 dead000000000122 0000000000000000 [ 12.353814] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.354319] page dumped because: kasan: bad access detected [ 12.354563] [ 12.354654] Memory state around the buggy address: [ 12.355027] ffff8881038dff00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 12.355441] ffff8881038dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.356168] >ffff8881038e0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 12.356964] ^ [ 12.357131] ffff8881038e0080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 12.357625] ffff8881038e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.358320] ==================================================================