Date
July 8, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.774822] ================================================================== [ 31.775341] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 31.775423] Free of addr fff00000c9a8a001 by task kunit_try_catch/242 [ 31.775511] [ 31.775561] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT [ 31.775655] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.775684] Hardware name: linux,dummy-virt (DT) [ 31.775738] Call trace: [ 31.775780] show_stack+0x20/0x38 (C) [ 31.775862] dump_stack_lvl+0x8c/0xd0 [ 31.775931] print_report+0x118/0x5d0 [ 31.775990] kasan_report_invalid_free+0xc0/0xe8 [ 31.776042] check_slab_allocation+0xfc/0x108 [ 31.776109] __kasan_slab_pre_free+0x2c/0x48 [ 31.776167] kmem_cache_free+0xf0/0x468 [ 31.776227] kmem_cache_invalid_free+0x184/0x3c8 [ 31.776277] kunit_try_run_case+0x170/0x3f0 [ 31.776497] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.776578] kthread+0x328/0x630 [ 31.776628] ret_from_fork+0x10/0x20 [ 31.776718] [ 31.776773] Allocated by task 242: [ 31.776817] kasan_save_stack+0x3c/0x68 [ 31.776886] kasan_save_track+0x20/0x40 [ 31.776993] kasan_save_alloc_info+0x40/0x58 [ 31.777064] __kasan_slab_alloc+0xa8/0xb0 [ 31.777134] kmem_cache_alloc_noprof+0x10c/0x398 [ 31.777251] kmem_cache_invalid_free+0x12c/0x3c8 [ 31.777319] kunit_try_run_case+0x170/0x3f0 [ 31.777432] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.777537] kthread+0x328/0x630 [ 31.777594] ret_from_fork+0x10/0x20 [ 31.777694] [ 31.777736] The buggy address belongs to the object at fff00000c9a8a000 [ 31.777736] which belongs to the cache test_cache of size 200 [ 31.777813] The buggy address is located 1 bytes inside of [ 31.777813] 200-byte region [fff00000c9a8a000, fff00000c9a8a0c8) [ 31.777883] [ 31.777903] The buggy address belongs to the physical page: [ 31.777935] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a8a [ 31.778247] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.778311] page_type: f5(slab) [ 31.778354] raw: 0bfffe0000000000 fff00000c5c50c80 dead000000000122 0000000000000000 [ 31.778405] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 31.778445] page dumped because: kasan: bad access detected [ 31.778476] [ 31.778495] Memory state around the buggy address: [ 31.778525] fff00000c9a89f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.778568] fff00000c9a89f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.778610] >fff00000c9a8a000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.778649] ^ [ 31.778676] fff00000c9a8a080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 31.778718] fff00000c9a8a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.778755] ==================================================================
[ 24.090497] ================================================================== [ 24.090992] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 24.091401] Free of addr ffff8881062bd001 by task kunit_try_catch/259 [ 24.091713] [ 24.091844] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) [ 24.091902] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.091915] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.091939] Call Trace: [ 24.091955] <TASK> [ 24.091978] dump_stack_lvl+0x73/0xb0 [ 24.092014] print_report+0xd1/0x610 [ 24.092038] ? __virt_addr_valid+0x1db/0x2d0 [ 24.092089] ? kasan_complete_mode_report_info+0x2a/0x200 [ 24.092118] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.092146] kasan_report_invalid_free+0x10a/0x130 [ 24.092170] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.092222] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.092260] check_slab_allocation+0x11f/0x130 [ 24.092282] __kasan_slab_pre_free+0x28/0x40 [ 24.092303] kmem_cache_free+0xed/0x420 [ 24.092332] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 24.092377] ? kmem_cache_invalid_free+0x1d8/0x460 [ 24.092407] kmem_cache_invalid_free+0x1d8/0x460 [ 24.092433] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 24.092461] ? finish_task_switch.isra.0+0x153/0x700 [ 24.092485] ? __switch_to+0x47/0xf50 [ 24.092519] ? __pfx_read_tsc+0x10/0x10 [ 24.092545] ? ktime_get_ts64+0x86/0x230 [ 24.092574] kunit_try_run_case+0x1a5/0x480 [ 24.092600] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.092621] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.092644] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.092674] ? __kthread_parkme+0x82/0x180 [ 24.092697] ? preempt_count_sub+0x50/0x80 [ 24.092720] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.092742] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.092770] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.092797] kthread+0x337/0x6f0 [ 24.092819] ? trace_preempt_on+0x20/0xc0 [ 24.092865] ? __pfx_kthread+0x10/0x10 [ 24.092888] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.092915] ? calculate_sigpending+0x7b/0xa0 [ 24.092943] ? __pfx_kthread+0x10/0x10 [ 24.092967] ret_from_fork+0x116/0x1d0 [ 24.092987] ? __pfx_kthread+0x10/0x10 [ 24.093009] ret_from_fork_asm+0x1a/0x30 [ 24.093045] </TASK> [ 24.093057] [ 24.103479] Allocated by task 259: [ 24.103667] kasan_save_stack+0x45/0x70 [ 24.104141] kasan_save_track+0x18/0x40 [ 24.104388] kasan_save_alloc_info+0x3b/0x50 [ 24.104680] __kasan_slab_alloc+0x91/0xa0 [ 24.105024] kmem_cache_alloc_noprof+0x123/0x3f0 [ 24.105253] kmem_cache_invalid_free+0x157/0x460 [ 24.105453] kunit_try_run_case+0x1a5/0x480 [ 24.105635] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.106101] kthread+0x337/0x6f0 [ 24.106385] ret_from_fork+0x116/0x1d0 [ 24.106677] ret_from_fork_asm+0x1a/0x30 [ 24.107077] [ 24.107176] The buggy address belongs to the object at ffff8881062bd000 [ 24.107176] which belongs to the cache test_cache of size 200 [ 24.108013] The buggy address is located 1 bytes inside of [ 24.108013] 200-byte region [ffff8881062bd000, ffff8881062bd0c8) [ 24.108484] [ 24.108574] The buggy address belongs to the physical page: [ 24.108803] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1062bd [ 24.109598] flags: 0x200000000000000(node=0|zone=2) [ 24.110032] page_type: f5(slab) [ 24.110340] raw: 0200000000000000 ffff888101d3ab40 dead000000000122 0000000000000000 [ 24.110778] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 24.111215] page dumped because: kasan: bad access detected [ 24.111459] [ 24.111540] Memory state around the buggy address: [ 24.111745] ffff8881062bcf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.112382] ffff8881062bcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.112984] >ffff8881062bd000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 24.113482] ^ [ 24.113770] ffff8881062bd080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 24.114292] ffff8881062bd100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.114589] ==================================================================