Date
July 9, 2025, 1:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.005002] ================================================================== [ 30.005089] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 30.005157] Free of addr fff00000c96bd001 by task kunit_try_catch/243 [ 30.005200] [ 30.005238] CPU: 0 UID: 0 PID: 243 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 30.005325] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.005352] Hardware name: linux,dummy-virt (DT) [ 30.005411] Call trace: [ 30.005438] show_stack+0x20/0x38 (C) [ 30.005490] dump_stack_lvl+0x8c/0xd0 [ 30.005541] print_report+0x118/0x5d0 [ 30.005585] kasan_report_invalid_free+0xc0/0xe8 [ 30.005630] check_slab_allocation+0xfc/0x108 [ 30.005686] __kasan_slab_pre_free+0x2c/0x48 [ 30.005736] kmem_cache_free+0xf0/0x468 [ 30.005788] kmem_cache_invalid_free+0x184/0x3c8 [ 30.005848] kunit_try_run_case+0x170/0x3f0 [ 30.005909] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.005964] kthread+0x328/0x630 [ 30.006007] ret_from_fork+0x10/0x20 [ 30.006763] [ 30.006797] Allocated by task 243: [ 30.006834] kasan_save_stack+0x3c/0x68 [ 30.007180] kasan_save_track+0x20/0x40 [ 30.007241] kasan_save_alloc_info+0x40/0x58 [ 30.007408] __kasan_slab_alloc+0xa8/0xb0 [ 30.007455] kmem_cache_alloc_noprof+0x10c/0x398 [ 30.007503] kmem_cache_invalid_free+0x12c/0x3c8 [ 30.007594] kunit_try_run_case+0x170/0x3f0 [ 30.007648] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.007766] kthread+0x328/0x630 [ 30.007800] ret_from_fork+0x10/0x20 [ 30.007982] [ 30.008291] The buggy address belongs to the object at fff00000c96bd000 [ 30.008291] which belongs to the cache test_cache of size 200 [ 30.008486] The buggy address is located 1 bytes inside of [ 30.008486] 200-byte region [fff00000c96bd000, fff00000c96bd0c8) [ 30.008625] [ 30.008666] The buggy address belongs to the physical page: [ 30.008731] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1096bd [ 30.008957] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.009173] page_type: f5(slab) [ 30.009257] raw: 0bfffe0000000000 fff00000c44128c0 dead000000000122 0000000000000000 [ 30.009444] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 30.009522] page dumped because: kasan: bad access detected [ 30.009864] [ 30.009922] Memory state around the buggy address: [ 30.010000] fff00000c96bcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 30.010221] fff00000c96bcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 30.010492] >fff00000c96bd000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 30.010772] ^ [ 30.010943] fff00000c96bd080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 30.011138] fff00000c96bd100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.011231] ==================================================================
[ 24.799526] ================================================================== [ 24.800683] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 24.801741] Free of addr ffff8881060a8001 by task kunit_try_catch/261 [ 24.802226] [ 24.802318] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 24.802374] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 24.802388] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.802411] Call Trace: [ 24.802426] <TASK> [ 24.802446] dump_stack_lvl+0x73/0xb0 [ 24.802481] print_report+0xd1/0x610 [ 24.802504] ? __virt_addr_valid+0x1db/0x2d0 [ 24.802530] ? kasan_complete_mode_report_info+0x2a/0x200 [ 24.802555] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.802580] kasan_report_invalid_free+0x10a/0x130 [ 24.802604] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.802629] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.802652] check_slab_allocation+0x11f/0x130 [ 24.802674] __kasan_slab_pre_free+0x28/0x40 [ 24.802714] kmem_cache_free+0xed/0x420 [ 24.802735] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 24.802780] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.802807] kmem_cache_invalid_free+0x1d8/0x460 [ 24.802910] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 24.802940] ? finish_task_switch.isra.0+0x153/0x700 [ 24.802964] ? __switch_to+0x47/0xf80 [ 24.802994] ? __pfx_read_tsc+0x10/0x10 [ 24.803016] ? ktime_get_ts64+0x86/0x230 [ 24.803060] kunit_try_run_case+0x1a5/0x480 [ 24.803085] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.803105] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.803130] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.803153] ? __kthread_parkme+0x82/0x180 [ 24.803174] ? preempt_count_sub+0x50/0x80 [ 24.803197] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.803218] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.803243] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.803268] kthread+0x337/0x6f0 [ 24.803287] ? trace_preempt_on+0x20/0xc0 [ 24.803311] ? __pfx_kthread+0x10/0x10 [ 24.803331] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.803353] ? calculate_sigpending+0x7b/0xa0 [ 24.803377] ? __pfx_kthread+0x10/0x10 [ 24.803399] ret_from_fork+0x116/0x1d0 [ 24.803418] ? __pfx_kthread+0x10/0x10 [ 24.803438] ret_from_fork_asm+0x1a/0x30 [ 24.803469] </TASK> [ 24.803481] [ 24.819742] Allocated by task 261: [ 24.820150] kasan_save_stack+0x45/0x70 [ 24.820550] kasan_save_track+0x18/0x40 [ 24.820922] kasan_save_alloc_info+0x3b/0x50 [ 24.821217] __kasan_slab_alloc+0x91/0xa0 [ 24.821548] kmem_cache_alloc_noprof+0x123/0x3f0 [ 24.821711] kmem_cache_invalid_free+0x157/0x460 [ 24.822148] kunit_try_run_case+0x1a5/0x480 [ 24.822550] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.823139] kthread+0x337/0x6f0 [ 24.823335] ret_from_fork+0x116/0x1d0 [ 24.823463] ret_from_fork_asm+0x1a/0x30 [ 24.823593] [ 24.823658] The buggy address belongs to the object at ffff8881060a8000 [ 24.823658] which belongs to the cache test_cache of size 200 [ 24.824678] The buggy address is located 1 bytes inside of [ 24.824678] 200-byte region [ffff8881060a8000, ffff8881060a80c8) [ 24.825972] [ 24.826138] The buggy address belongs to the physical page: [ 24.826592] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060a8 [ 24.827048] flags: 0x200000000000000(node=0|zone=2) [ 24.827559] page_type: f5(slab) [ 24.828007] raw: 0200000000000000 ffff8881017ad8c0 dead000000000122 0000000000000000 [ 24.828322] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 24.828545] page dumped because: kasan: bad access detected [ 24.828728] [ 24.828820] Memory state around the buggy address: [ 24.829082] ffff8881060a7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.829367] ffff8881060a7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.829653] >ffff8881060a8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 24.830014] ^ [ 24.830164] ffff8881060a8080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 24.830375] ffff8881060a8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.830647] ==================================================================