Date
July 1, 2025, 12:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.380695] ================================================================== [ 18.380777] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8 [ 18.381890] Free of addr fff00000c7808001 by task kunit_try_catch/211 [ 18.381951] [ 18.381994] CPU: 1 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.382575] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.382611] Hardware name: linux,dummy-virt (DT) [ 18.382745] Call trace: [ 18.382874] show_stack+0x20/0x38 (C) [ 18.383195] dump_stack_lvl+0x8c/0xd0 [ 18.383324] print_report+0x118/0x608 [ 18.383559] kasan_report_invalid_free+0xc0/0xe8 [ 18.383829] check_slab_allocation+0xfc/0x108 [ 18.383931] __kasan_slab_pre_free+0x2c/0x48 [ 18.384263] kmem_cache_free+0xf0/0x468 [ 18.384415] kmem_cache_invalid_free+0x184/0x3c8 [ 18.384933] kunit_try_run_case+0x170/0x3f0 [ 18.385280] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.385486] kthread+0x328/0x630 [ 18.385534] ret_from_fork+0x10/0x20 [ 18.386131] [ 18.386314] Allocated by task 211: [ 18.386351] kasan_save_stack+0x3c/0x68 [ 18.386763] kasan_save_track+0x20/0x40 [ 18.386804] kasan_save_alloc_info+0x40/0x58 [ 18.386842] __kasan_slab_alloc+0xa8/0xb0 [ 18.387110] kmem_cache_alloc_noprof+0x10c/0x398 [ 18.387177] kmem_cache_invalid_free+0x12c/0x3c8 [ 18.387221] kunit_try_run_case+0x170/0x3f0 [ 18.387262] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.387310] kthread+0x328/0x630 [ 18.387344] ret_from_fork+0x10/0x20 [ 18.387860] [ 18.388018] The buggy address belongs to the object at fff00000c7808000 [ 18.388018] which belongs to the cache test_cache of size 200 [ 18.388335] The buggy address is located 1 bytes inside of [ 18.388335] 200-byte region [fff00000c7808000, fff00000c78080c8) [ 18.388550] [ 18.388615] The buggy address belongs to the physical page: [ 18.388651] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107808 [ 18.389081] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.389175] page_type: f5(slab) [ 18.389228] raw: 0bfffe0000000000 fff00000c3e4f3c0 dead000000000122 0000000000000000 [ 18.389280] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.389718] page dumped because: kasan: bad access detected [ 18.390186] [ 18.390268] Memory state around the buggy address: [ 18.390309] fff00000c7807f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 18.390357] fff00000c7807f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 18.390803] >fff00000c7808000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 18.391132] ^ [ 18.391170] fff00000c7808080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 18.391217] fff00000c7808100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.391600] ==================================================================
[ 12.170205] ================================================================== [ 12.171323] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460 [ 12.172193] Free of addr ffff88810390e001 by task kunit_try_catch/228 [ 12.172594] [ 12.172694] CPU: 1 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.172741] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.172752] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.172773] Call Trace: [ 12.172786] <TASK> [ 12.172804] dump_stack_lvl+0x73/0xb0 [ 12.172834] print_report+0xd1/0x650 [ 12.172855] ? __virt_addr_valid+0x1db/0x2d0 [ 12.172879] ? kasan_complete_mode_report_info+0x2a/0x200 [ 12.172901] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.172925] kasan_report_invalid_free+0x10a/0x130 [ 12.172948] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.172973] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.172995] check_slab_allocation+0x11f/0x130 [ 12.173016] __kasan_slab_pre_free+0x28/0x40 [ 12.173213] kmem_cache_free+0xed/0x420 [ 12.173241] ? kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.173262] ? kmem_cache_invalid_free+0x1d8/0x460 [ 12.173288] kmem_cache_invalid_free+0x1d8/0x460 [ 12.173311] ? __pfx_kmem_cache_invalid_free+0x10/0x10 [ 12.173333] ? finish_task_switch.isra.0+0x153/0x700 [ 12.173391] ? __switch_to+0x47/0xf50 [ 12.173419] ? __pfx_read_tsc+0x10/0x10 [ 12.173438] ? ktime_get_ts64+0x86/0x230 [ 12.173461] kunit_try_run_case+0x1a5/0x480 [ 12.173485] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.173505] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.173528] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.173549] ? __kthread_parkme+0x82/0x180 [ 12.173569] ? preempt_count_sub+0x50/0x80 [ 12.173590] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.173612] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.173633] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.173654] kthread+0x337/0x6f0 [ 12.173672] ? trace_preempt_on+0x20/0xc0 [ 12.173694] ? __pfx_kthread+0x10/0x10 [ 12.173713] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.173732] ? calculate_sigpending+0x7b/0xa0 [ 12.173755] ? __pfx_kthread+0x10/0x10 [ 12.173775] ret_from_fork+0x116/0x1d0 [ 12.173791] ? __pfx_kthread+0x10/0x10 [ 12.173810] ret_from_fork_asm+0x1a/0x30 [ 12.173839] </TASK> [ 12.173851] [ 12.192413] Allocated by task 228: [ 12.192771] kasan_save_stack+0x45/0x70 [ 12.192933] kasan_save_track+0x18/0x40 [ 12.193275] kasan_save_alloc_info+0x3b/0x50 [ 12.193762] __kasan_slab_alloc+0x91/0xa0 [ 12.194294] kmem_cache_alloc_noprof+0x123/0x3f0 [ 12.194864] kmem_cache_invalid_free+0x157/0x460 [ 12.195523] kunit_try_run_case+0x1a5/0x480 [ 12.195903] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.196281] kthread+0x337/0x6f0 [ 12.196595] ret_from_fork+0x116/0x1d0 [ 12.197123] ret_from_fork_asm+0x1a/0x30 [ 12.197612] [ 12.197885] The buggy address belongs to the object at ffff88810390e000 [ 12.197885] which belongs to the cache test_cache of size 200 [ 12.198780] The buggy address is located 1 bytes inside of [ 12.198780] 200-byte region [ffff88810390e000, ffff88810390e0c8) [ 12.200244] [ 12.200403] The buggy address belongs to the physical page: [ 12.200579] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10390e [ 12.200822] flags: 0x200000000000000(node=0|zone=2) [ 12.200988] page_type: f5(slab) [ 12.201122] raw: 0200000000000000 ffff8881010b2c80 dead000000000122 0000000000000000 [ 12.201869] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 12.202688] page dumped because: kasan: bad access detected [ 12.203209] [ 12.203387] Memory state around the buggy address: [ 12.203843] ffff88810390df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.204507] ffff88810390df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.205248] >ffff88810390e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 12.205596] ^ [ 12.205711] ffff88810390e080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc [ 12.205924] ffff88810390e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.206162] ==================================================================