Date
July 24, 2025, 4:41 a.m.
| Environment | |
|---|---|
| qemu-arm64 | |
| qemu-x86_64 |
[ 33.262196] ================================================================== [ 33.262281] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 33.263225] Free of addr fff00000c9a95001 by task kunit_try_catch/242 [ 33.263907] [ 33.263957] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250724 #1 PREEMPT [ 33.264221] Tainted: [B]=BAD_PAGE, [N]=TEST [ 33.264295] Hardware name: linux,dummy-virt (DT) [ 33.264692] Call trace: [ 33.265096] show_stack+0x20/0x38 (C) [ 33.265504] dump_stack_lvl+0x8c/0xd0 [ 33.265967] print_report+0x118/0x5e8 [ 33.266733] kasan_report_invalid_free+0xc0/0xe8 [ 33.266808] check_slab_allocation+0xfc/0x108 [ 33.266855] __kasan_slab_pre_free+0x2c/0x48 [ 33.266910] kmem_cache_free+0xf0/0x468 [ 33.267120] kmem_cache_invalid_free+0x184/0x3c8 [ 33.267174] kunit_try_run_case+0x170/0x3f0 [ 33.267234] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.267626] kthread+0x328/0x630 [ 33.267803] ret_from_fork+0x10/0x20 [ 33.267866] [ 33.267889] Allocated by task 242: [ 33.268087] kasan_save_stack+0x3c/0x68 [ 33.268135] kasan_save_track+0x20/0x40 [ 33.268171] kasan_save_alloc_info+0x40/0x58 [ 33.268244] __kasan_slab_alloc+0xa8/0xb0 [ 33.268514] kmem_cache_alloc_noprof+0x10c/0x398 [ 33.268736] kmem_cache_invalid_free+0x12c/0x3c8 [ 33.268796] kunit_try_run_case+0x170/0x3f0 [ 33.269084] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.269398] kthread+0x328/0x630 [ 33.269546] ret_from_fork+0x10/0x20 [ 33.269731] [ 33.269766] The buggy address belongs to the object at fff00000c9a95000 [ 33.269766] which belongs to the cache test_cache of size 200 [ 33.269828] The buggy address is located 1 bytes inside of [ 33.269828] 200-byte region [fff00000c9a95000, fff00000c9a950c8) [ 33.269890] [ 33.269913] The buggy address belongs to the physical page: [ 33.269957] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a95 [ 33.270248] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 33.270524] page_type: f5(slab) [ 33.270759] raw: 0bfffe0000000000 fff00000c58d7780 dead000000000122 0000000000000000 [ 33.270867] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 33.271229] page dumped because: kasan: bad access detected [ 33.271366] [ 33.271386] Memory state around the buggy address: [ 33.271423] fff00000c9a94f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.271898] fff00000c9a94f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.272018] >fff00000c9a95000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 33.272059] ^ [ 33.272352] fff00000c9a95080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 33.272672] fff00000c9a95100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.272790] ==================================================================
[ 27.594313] ================================================================== [ 27.595861] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 27.596707] Free of addr ffff88810613d001 by task kunit_try_catch/259 [ 27.597088] [ 27.597416] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) [ 27.597586] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 27.597605] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.597631] Call Trace: [ 27.597646] <TASK> [ 27.597667] dump_stack_lvl+0x73/0xb0 [ 27.597701] print_report+0xd1/0x640 [ 27.597725] ? __virt_addr_valid+0x1db/0x2d0 [ 27.597752] ? kasan_complete_mode_report_info+0x2a/0x200 [ 27.597777] ? kmem_cache_invalid_free+0x1d8/0x460 [ 27.597802] kasan_report_invalid_free+0x10a/0x130 [ 27.597827] ? kmem_cache_invalid_free+0x1d8/0x460 [ 27.597853] ? kmem_cache_invalid_free+0x1d8/0x460 [ 27.597877] check_slab_allocation+0x11f/0x130 [ 27.597898] __kasan_slab_pre_free+0x28/0x40 [ 27.597926] kmem_cache_free+0xed/0x420 [ 27.597946] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 27.597971] ? kmem_cache_invalid_free+0x1d8/0x460 [ 27.597998] kmem_cache_invalid_free+0x1d8/0x460 [ 27.598022] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 27.598045] ? finish_task_switch.isra.0+0x153/0x700 [ 27.598068] ? __switch_to+0x47/0xf80 [ 27.598097] ? __pfx_read_tsc+0x10/0x10 [ 27.598119] ? ktime_get_ts64+0x86/0x230 [ 27.598145] kunit_try_run_case+0x1a5/0x480 [ 27.598171] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.598193] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.598219] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.598243] ? __kthread_parkme+0x82/0x180 [ 27.598264] ? preempt_count_sub+0x50/0x80 [ 27.598285] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.598308] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.598331] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.598355] kthread+0x337/0x6f0 [ 27.598374] ? trace_preempt_on+0x20/0xc0 [ 27.598399] ? __pfx_kthread+0x10/0x10 [ 27.598418] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.598442] ? calculate_sigpending+0x7b/0xa0 [ 27.598465] ? __pfx_kthread+0x10/0x10 [ 27.598487] ret_from_fork+0x116/0x1d0 [ 27.598507] ? __pfx_kthread+0x10/0x10 [ 27.598528] ret_from_fork_asm+0x1a/0x30 [ 27.598559] </TASK> [ 27.598569] [ 27.615028] Allocated by task 259: [ 27.615198] kasan_save_stack+0x45/0x70 [ 27.615391] kasan_save_track+0x18/0x40 [ 27.615560] kasan_save_alloc_info+0x3b/0x50 [ 27.615714] __kasan_slab_alloc+0x91/0xa0 [ 27.615849] kmem_cache_alloc_noprof+0x123/0x3f0 [ 27.616020] kmem_cache_invalid_free+0x157/0x460 [ 27.616534] kunit_try_run_case+0x1a5/0x480 [ 27.617565] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.618299] kthread+0x337/0x6f0 [ 27.618767] ret_from_fork+0x116/0x1d0 [ 27.619312] ret_from_fork_asm+0x1a/0x30 [ 27.619777] [ 27.620044] The buggy address belongs to the object at ffff88810613d000 [ 27.620044] which belongs to the cache test_cache of size 200 [ 27.621411] The buggy address is located 1 bytes inside of [ 27.621411] 200-byte region [ffff88810613d000, ffff88810613d0c8) [ 27.622850] [ 27.623323] The buggy address belongs to the physical page: [ 27.623822] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10613d [ 27.624434] flags: 0x200000000000000(node=0|zone=2) [ 27.625003] page_type: f5(slab) [ 27.625389] raw: 0200000000000000 ffff888100fbe500 dead000000000122 0000000000000000 [ 27.625632] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 27.625847] page dumped because: kasan: bad access detected [ 27.626406] [ 27.626532] Memory state around the buggy address: [ 27.627108] ffff88810613cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.627330] ffff88810613cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.627537] >ffff88810613d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 27.628015] ^ [ 27.628472] ffff88810613d080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 27.628734] ffff88810613d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.629503] ==================================================================