Date
July 12, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.845056] ================================================================== [ 16.845129] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 16.845194] Free of addr fff00000c45d1ae0 by task kunit_try_catch/192 [ 16.845236] [ 16.845265] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.845349] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.845577] Hardware name: linux,dummy-virt (DT) [ 16.845934] Call trace: [ 16.845971] show_stack+0x20/0x38 (C) [ 16.846059] dump_stack_lvl+0x8c/0xd0 [ 16.846271] print_report+0x118/0x5d0 [ 16.846329] kasan_report_invalid_free+0xc0/0xe8 [ 16.846515] check_slab_allocation+0xd4/0x108 [ 16.846580] __kasan_slab_pre_free+0x2c/0x48 [ 16.846629] kfree+0xe8/0x3c8 [ 16.846848] kfree_sensitive+0x3c/0xb0 [ 16.847038] kmalloc_double_kzfree+0x168/0x308 [ 16.847145] kunit_try_run_case+0x170/0x3f0 [ 16.847207] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.847336] kthread+0x328/0x630 [ 16.847401] ret_from_fork+0x10/0x20 [ 16.847450] [ 16.847470] Allocated by task 192: [ 16.847499] kasan_save_stack+0x3c/0x68 [ 16.847541] kasan_save_track+0x20/0x40 [ 16.847581] kasan_save_alloc_info+0x40/0x58 [ 16.847622] __kasan_kmalloc+0xd4/0xd8 [ 16.847852] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.847948] kmalloc_double_kzfree+0xb8/0x308 [ 16.848037] kunit_try_run_case+0x170/0x3f0 [ 16.848137] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.848206] kthread+0x328/0x630 [ 16.848238] ret_from_fork+0x10/0x20 [ 16.848535] [ 16.848635] Freed by task 192: [ 16.848734] kasan_save_stack+0x3c/0x68 [ 16.848822] kasan_save_track+0x20/0x40 [ 16.848911] kasan_save_free_info+0x4c/0x78 [ 16.848970] __kasan_slab_free+0x6c/0x98 [ 16.849346] kfree+0x214/0x3c8 [ 16.849412] kfree_sensitive+0x80/0xb0 [ 16.849471] kmalloc_double_kzfree+0x11c/0x308 [ 16.849591] kunit_try_run_case+0x170/0x3f0 [ 16.849654] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.849699] kthread+0x328/0x630 [ 16.849764] ret_from_fork+0x10/0x20 [ 16.850189] [ 16.850279] The buggy address belongs to the object at fff00000c45d1ae0 [ 16.850279] which belongs to the cache kmalloc-16 of size 16 [ 16.850360] The buggy address is located 0 bytes inside of [ 16.850360] 16-byte region [fff00000c45d1ae0, fff00000c45d1af0) [ 16.850743] [ 16.850843] The buggy address belongs to the physical page: [ 16.850900] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1045d1 [ 16.850964] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.851013] page_type: f5(slab) [ 16.851052] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.851118] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.851160] page dumped because: kasan: bad access detected [ 16.851203] [ 16.851243] Memory state around the buggy address: [ 16.851442] fff00000c45d1980: fa fb fc fc 00 05 fc fc fa fb fc fc fa fb fc fc [ 16.851527] fff00000c45d1a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.851577] >fff00000c45d1a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.851616] ^ [ 16.851655] fff00000c45d1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.851699] fff00000c45d1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.851791] ==================================================================
[ 13.348296] ================================================================== [ 13.349029] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 13.349468] Free of addr ffff888101c9b480 by task kunit_try_catch/209 [ 13.349674] [ 13.349765] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.349808] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.349821] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.349841] Call Trace: [ 13.349853] <TASK> [ 13.349869] dump_stack_lvl+0x73/0xb0 [ 13.349899] print_report+0xd1/0x610 [ 13.349922] ? __virt_addr_valid+0x1db/0x2d0 [ 13.349945] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.349968] ? kfree_sensitive+0x2e/0x90 [ 13.350005] kasan_report_invalid_free+0x10a/0x130 [ 13.350030] ? kfree_sensitive+0x2e/0x90 [ 13.350051] ? kfree_sensitive+0x2e/0x90 [ 13.350071] check_slab_allocation+0x101/0x130 [ 13.350154] __kasan_slab_pre_free+0x28/0x40 [ 13.350204] kfree+0xf0/0x3f0 [ 13.350226] ? kfree_sensitive+0x2e/0x90 [ 13.350248] kfree_sensitive+0x2e/0x90 [ 13.350276] kmalloc_double_kzfree+0x19c/0x350 [ 13.350310] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 13.350335] ? __schedule+0x10cc/0x2b60 [ 13.350358] ? __pfx_read_tsc+0x10/0x10 [ 13.350390] ? ktime_get_ts64+0x86/0x230 [ 13.350415] kunit_try_run_case+0x1a5/0x480 [ 13.350439] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.350461] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.350495] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.350518] ? __kthread_parkme+0x82/0x180 [ 13.350539] ? preempt_count_sub+0x50/0x80 [ 13.350573] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.350597] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.350621] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.350655] kthread+0x337/0x6f0 [ 13.350674] ? trace_preempt_on+0x20/0xc0 [ 13.350697] ? __pfx_kthread+0x10/0x10 [ 13.350733] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.350755] ? calculate_sigpending+0x7b/0xa0 [ 13.350779] ? __pfx_kthread+0x10/0x10 [ 13.350800] ret_from_fork+0x116/0x1d0 [ 13.350818] ? __pfx_kthread+0x10/0x10 [ 13.350838] ret_from_fork_asm+0x1a/0x30 [ 13.350877] </TASK> [ 13.350887] [ 13.367821] Allocated by task 209: [ 13.368102] kasan_save_stack+0x45/0x70 [ 13.368423] kasan_save_track+0x18/0x40 [ 13.368558] kasan_save_alloc_info+0x3b/0x50 [ 13.368704] __kasan_kmalloc+0xb7/0xc0 [ 13.368832] __kmalloc_cache_noprof+0x189/0x420 [ 13.369120] kmalloc_double_kzfree+0xa9/0x350 [ 13.369591] kunit_try_run_case+0x1a5/0x480 [ 13.370063] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.370558] kthread+0x337/0x6f0 [ 13.370878] ret_from_fork+0x116/0x1d0 [ 13.371331] ret_from_fork_asm+0x1a/0x30 [ 13.371713] [ 13.371879] Freed by task 209: [ 13.372290] kasan_save_stack+0x45/0x70 [ 13.372647] kasan_save_track+0x18/0x40 [ 13.372780] kasan_save_free_info+0x3f/0x60 [ 13.372922] __kasan_slab_free+0x56/0x70 [ 13.373401] kfree+0x222/0x3f0 [ 13.373771] kfree_sensitive+0x67/0x90 [ 13.374220] kmalloc_double_kzfree+0x12b/0x350 [ 13.374647] kunit_try_run_case+0x1a5/0x480 [ 13.375113] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.375422] kthread+0x337/0x6f0 [ 13.375584] ret_from_fork+0x116/0x1d0 [ 13.375735] ret_from_fork_asm+0x1a/0x30 [ 13.375900] [ 13.375990] The buggy address belongs to the object at ffff888101c9b480 [ 13.375990] which belongs to the cache kmalloc-16 of size 16 [ 13.376922] The buggy address is located 0 bytes inside of [ 13.376922] 16-byte region [ffff888101c9b480, ffff888101c9b490) [ 13.378204] [ 13.378561] The buggy address belongs to the physical page: [ 13.379165] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c9b [ 13.379877] flags: 0x200000000000000(node=0|zone=2) [ 13.380408] page_type: f5(slab) [ 13.380795] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 13.381510] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 13.381734] page dumped because: kasan: bad access detected [ 13.381899] [ 13.381966] Memory state around the buggy address: [ 13.382584] ffff888101c9b380: 00 02 fc fc 00 02 fc fc fa fb fc fc fa fb fc fc [ 13.383349] ffff888101c9b400: fa fb fc fc 00 05 fc fc fa fb fc fc fa fb fc fc [ 13.384173] >ffff888101c9b480: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.385054] ^ [ 13.385428] ffff888101c9b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.385684] ffff888101c9b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.386401] ==================================================================