Date
June 3, 2025, 7:38 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.022342] ================================================================== [ 19.022552] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 19.022839] Free of addr fff00000c65da001 by task kunit_try_catch/211 [ 19.022965] [ 19.023167] CPU: 1 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT [ 19.023412] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.023450] Hardware name: linux,dummy-virt (DT) [ 19.023485] Call trace: [ 19.023508] show_stack+0x20/0x38 (C) [ 19.023563] dump_stack_lvl+0x8c/0xd0 [ 19.023613] print_report+0x118/0x608 [ 19.023743] kasan_report_invalid_free+0xc0/0xe8 [ 19.024255] check_slab_allocation+0xfc/0x108 [ 19.024308] __kasan_slab_pre_free+0x2c/0x48 [ 19.024499] kmem_cache_free+0xf0/0x468 [ 19.024876] kmem_cache_invalid_free+0x184/0x3c8 [ 19.025088] kunit_try_run_case+0x170/0x3f0 [ 19.025256] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.025397] kthread+0x328/0x630 [ 19.025455] ret_from_fork+0x10/0x20 [ 19.025521] [ 19.025574] Allocated by task 211: [ 19.025603] kasan_save_stack+0x3c/0x68 [ 19.025814] kasan_save_track+0x20/0x40 [ 19.025945] kasan_save_alloc_info+0x40/0x58 [ 19.025990] __kasan_slab_alloc+0xa8/0xb0 [ 19.026045] kmem_cache_alloc_noprof+0x10c/0x398 [ 19.026086] kmem_cache_invalid_free+0x12c/0x3c8 [ 19.026125] kunit_try_run_case+0x170/0x3f0 [ 19.026195] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.026239] kthread+0x328/0x630 [ 19.026278] ret_from_fork+0x10/0x20 [ 19.026437] [ 19.026458] The buggy address belongs to the object at fff00000c65da000 [ 19.026458] which belongs to the cache test_cache of size 200 [ 19.026515] The buggy address is located 1 bytes inside of [ 19.026515] 200-byte region [fff00000c65da000, fff00000c65da0c8) [ 19.026573] [ 19.026596] The buggy address belongs to the physical page: [ 19.026629] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065da [ 19.026685] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.026930] page_type: f5(slab) [ 19.027127] raw: 0bfffe0000000000 fff00000c65c9000 dead000000000122 0000000000000000 [ 19.027328] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 19.027538] page dumped because: kasan: bad access detected [ 19.027573] [ 19.027591] Memory state around the buggy address: [ 19.027626] fff00000c65d9f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 19.027670] fff00000c65d9f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 19.027713] >fff00000c65da000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 19.027750] ^ [ 19.027777] fff00000c65da080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 19.028106] fff00000c65da100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.028268] ==================================================================
[ 15.471367] ================================================================== [ 15.471906] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 15.472372] Free of addr ffff88810333d001 by task kunit_try_catch/228 [ 15.472896] [ 15.473048] CPU: 1 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT(voluntary) [ 15.473111] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.473126] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.473150] Call Trace: [ 15.473168] <TASK> [ 15.473194] dump_stack_lvl+0x73/0xb0 [ 15.473238] print_report+0xd1/0x650 [ 15.473267] ? __virt_addr_valid+0x1db/0x2d0 [ 15.473313] ? kasan_complete_mode_report_info+0x2a/0x200 [ 15.473341] ? kmem_cache_invalid_free+0x1d8/0x460 [ 15.473366] kasan_report_invalid_free+0x10a/0x130 [ 15.473396] ? kmem_cache_invalid_free+0x1d8/0x460 [ 15.473432] ? kmem_cache_invalid_free+0x1d8/0x460 [ 15.473469] check_slab_allocation+0x11f/0x130 [ 15.473500] __kasan_slab_pre_free+0x28/0x40 [ 15.473524] kmem_cache_free+0xed/0x420 [ 15.473548] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 15.473572] ? kmem_cache_invalid_free+0x1d8/0x460 [ 15.473601] kmem_cache_invalid_free+0x1d8/0x460 [ 15.473625] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 15.473648] ? finish_task_switch.isra.0+0x153/0x700 [ 15.473676] ? __switch_to+0x47/0xf50 [ 15.473715] ? __pfx_read_tsc+0x10/0x10 [ 15.473806] ? ktime_get_ts64+0x86/0x230 [ 15.473868] kunit_try_run_case+0x1a5/0x480 [ 15.473900] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.473922] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.473955] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.473982] ? __kthread_parkme+0x82/0x180 [ 15.474006] ? preempt_count_sub+0x50/0x80 [ 15.474033] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.474057] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.474083] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.474108] kthread+0x337/0x6f0 [ 15.474129] ? trace_preempt_on+0x20/0xc0 [ 15.474158] ? __pfx_kthread+0x10/0x10 [ 15.474181] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.474223] ? calculate_sigpending+0x7b/0xa0 [ 15.474254] ? __pfx_kthread+0x10/0x10 [ 15.474280] ret_from_fork+0x116/0x1d0 [ 15.474301] ? __pfx_kthread+0x10/0x10 [ 15.474325] ret_from_fork_asm+0x1a/0x30 [ 15.474369] </TASK> [ 15.474383] [ 15.484781] Allocated by task 228: [ 15.485117] kasan_save_stack+0x45/0x70 [ 15.485298] kasan_save_track+0x18/0x40 [ 15.485407] kasan_save_alloc_info+0x3b/0x50 [ 15.485824] __kasan_slab_alloc+0x91/0xa0 [ 15.486009] kmem_cache_alloc_noprof+0x123/0x3f0 [ 15.486127] kmem_cache_invalid_free+0x157/0x460 [ 15.486420] kunit_try_run_case+0x1a5/0x480 [ 15.486818] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.487185] kthread+0x337/0x6f0 [ 15.487325] ret_from_fork+0x116/0x1d0 [ 15.487564] ret_from_fork_asm+0x1a/0x30 [ 15.488163] [ 15.488291] The buggy address belongs to the object at ffff88810333d000 [ 15.488291] which belongs to the cache test_cache of size 200 [ 15.488869] The buggy address is located 1 bytes inside of [ 15.488869] 200-byte region [ffff88810333d000, ffff88810333d0c8) [ 15.489186] [ 15.489362] The buggy address belongs to the physical page: [ 15.489588] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10333d [ 15.490055] flags: 0x200000000000000(node=0|zone=2) [ 15.490270] page_type: f5(slab) [ 15.490440] raw: 0200000000000000 ffff888101117b40 dead000000000122 0000000000000000 [ 15.490754] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 15.491108] page dumped because: kasan: bad access detected [ 15.491442] [ 15.491521] Memory state around the buggy address: [ 15.491870] ffff88810333cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.492175] ffff88810333cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.492535] >ffff88810333d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 15.493193] ^ [ 15.493407] ffff88810333d080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 15.493696] ffff88810333d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.494095] ==================================================================