Date
July 9, 2025, 1:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.484779] ================================================================== [ 29.484924] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 29.484978] Free of addr fff00000c592c920 by task kunit_try_catch/224 [ 29.485021] [ 29.485124] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 29.485211] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.485291] Hardware name: linux,dummy-virt (DT) [ 29.485352] Call trace: [ 29.485375] show_stack+0x20/0x38 (C) [ 29.485604] dump_stack_lvl+0x8c/0xd0 [ 29.485658] print_report+0x118/0x5d0 [ 29.485763] kasan_report_invalid_free+0xc0/0xe8 [ 29.485816] check_slab_allocation+0xd4/0x108 [ 29.485878] __kasan_slab_pre_free+0x2c/0x48 [ 29.486138] kfree+0xe8/0x3c8 [ 29.486298] kfree_sensitive+0x3c/0xb0 [ 29.486350] kmalloc_double_kzfree+0x168/0x308 [ 29.486470] kunit_try_run_case+0x170/0x3f0 [ 29.486522] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.486576] kthread+0x328/0x630 [ 29.486618] ret_from_fork+0x10/0x20 [ 29.486785] [ 29.486805] Allocated by task 224: [ 29.486868] kasan_save_stack+0x3c/0x68 [ 29.486927] kasan_save_track+0x20/0x40 [ 29.486973] kasan_save_alloc_info+0x40/0x58 [ 29.487011] __kasan_kmalloc+0xd4/0xd8 [ 29.487066] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.487289] kmalloc_double_kzfree+0xb8/0x308 [ 29.487514] kunit_try_run_case+0x170/0x3f0 [ 29.487557] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.487602] kthread+0x328/0x630 [ 29.487640] ret_from_fork+0x10/0x20 [ 29.487679] [ 29.487698] Freed by task 224: [ 29.487726] kasan_save_stack+0x3c/0x68 [ 29.488091] kasan_save_track+0x20/0x40 [ 29.488238] kasan_save_free_info+0x4c/0x78 [ 29.488418] __kasan_slab_free+0x6c/0x98 [ 29.488553] kfree+0x214/0x3c8 [ 29.488678] kfree_sensitive+0x80/0xb0 [ 29.488824] kmalloc_double_kzfree+0x11c/0x308 [ 29.489029] kunit_try_run_case+0x170/0x3f0 [ 29.489095] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.489140] kthread+0x328/0x630 [ 29.489173] ret_from_fork+0x10/0x20 [ 29.489209] [ 29.489389] The buggy address belongs to the object at fff00000c592c920 [ 29.489389] which belongs to the cache kmalloc-16 of size 16 [ 29.489497] The buggy address is located 0 bytes inside of [ 29.489497] 16-byte region [fff00000c592c920, fff00000c592c930) [ 29.489656] [ 29.489764] The buggy address belongs to the physical page: [ 29.489899] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592c [ 29.490065] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.490191] page_type: f5(slab) [ 29.490239] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 29.490321] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 29.490393] page dumped because: kasan: bad access detected [ 29.490425] [ 29.490444] Memory state around the buggy address: [ 29.490475] fff00000c592c800: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 29.490520] fff00000c592c880: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.490562] >fff00000c592c900: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 29.490771] ^ [ 29.490850] fff00000c592c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.490957] fff00000c592ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.491047] ==================================================================
[ 24.470578] ================================================================== [ 24.470969] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 24.471257] Free of addr ffff8881058a8220 by task kunit_try_catch/242 [ 24.471515] [ 24.471603] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 24.471652] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 24.471665] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.471686] Call Trace: [ 24.471711] <TASK> [ 24.471729] dump_stack_lvl+0x73/0xb0 [ 24.471760] print_report+0xd1/0x610 [ 24.471795] ? __virt_addr_valid+0x1db/0x2d0 [ 24.471824] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.471849] ? kfree_sensitive+0x2e/0x90 [ 24.471872] kasan_report_invalid_free+0x10a/0x130 [ 24.471895] ? kfree_sensitive+0x2e/0x90 [ 24.471920] ? kfree_sensitive+0x2e/0x90 [ 24.471985] check_slab_allocation+0x101/0x130 [ 24.472011] __kasan_slab_pre_free+0x28/0x40 [ 24.472031] kfree+0xf0/0x3f0 [ 24.472052] ? kfree_sensitive+0x2e/0x90 [ 24.472076] kfree_sensitive+0x2e/0x90 [ 24.472099] kmalloc_double_kzfree+0x19c/0x350 [ 24.472121] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 24.472144] ? __schedule+0x10cc/0x2b60 [ 24.472168] ? __pfx_read_tsc+0x10/0x10 [ 24.472188] ? ktime_get_ts64+0x86/0x230 [ 24.472213] kunit_try_run_case+0x1a5/0x480 [ 24.472235] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.472254] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.472277] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.472300] ? __kthread_parkme+0x82/0x180 [ 24.472320] ? preempt_count_sub+0x50/0x80 [ 24.472343] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.472364] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.472388] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.472412] kthread+0x337/0x6f0 [ 24.472431] ? trace_preempt_on+0x20/0xc0 [ 24.472454] ? __pfx_kthread+0x10/0x10 [ 24.472474] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.472495] ? calculate_sigpending+0x7b/0xa0 [ 24.472519] ? __pfx_kthread+0x10/0x10 [ 24.472540] ret_from_fork+0x116/0x1d0 [ 24.472558] ? __pfx_kthread+0x10/0x10 [ 24.472578] ret_from_fork_asm+0x1a/0x30 [ 24.472607] </TASK> [ 24.472619] [ 24.480198] Allocated by task 242: [ 24.480379] kasan_save_stack+0x45/0x70 [ 24.480582] kasan_save_track+0x18/0x40 [ 24.480788] kasan_save_alloc_info+0x3b/0x50 [ 24.481113] __kasan_kmalloc+0xb7/0xc0 [ 24.481253] __kmalloc_cache_noprof+0x189/0x420 [ 24.481476] kmalloc_double_kzfree+0xa9/0x350 [ 24.481688] kunit_try_run_case+0x1a5/0x480 [ 24.482032] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.482251] kthread+0x337/0x6f0 [ 24.482414] ret_from_fork+0x116/0x1d0 [ 24.482584] ret_from_fork_asm+0x1a/0x30 [ 24.482757] [ 24.482854] Freed by task 242: [ 24.483053] kasan_save_stack+0x45/0x70 [ 24.483241] kasan_save_track+0x18/0x40 [ 24.483390] kasan_save_free_info+0x3f/0x60 [ 24.483587] __kasan_slab_free+0x56/0x70 [ 24.483739] kfree+0x222/0x3f0 [ 24.484021] kfree_sensitive+0x67/0x90 [ 24.484191] kmalloc_double_kzfree+0x12b/0x350 [ 24.484370] kunit_try_run_case+0x1a5/0x480 [ 24.484528] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.484773] kthread+0x337/0x6f0 [ 24.484980] ret_from_fork+0x116/0x1d0 [ 24.485111] ret_from_fork_asm+0x1a/0x30 [ 24.485243] [ 24.485306] The buggy address belongs to the object at ffff8881058a8220 [ 24.485306] which belongs to the cache kmalloc-16 of size 16 [ 24.485648] The buggy address is located 0 bytes inside of [ 24.485648] 16-byte region [ffff8881058a8220, ffff8881058a8230) [ 24.486046] [ 24.486138] The buggy address belongs to the physical page: [ 24.486385] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a8 [ 24.487024] flags: 0x200000000000000(node=0|zone=2) [ 24.487347] page_type: f5(slab) [ 24.487470] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 24.488308] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 24.488666] page dumped because: kasan: bad access detected [ 24.489416] [ 24.489522] Memory state around the buggy address: [ 24.490044] ffff8881058a8100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 24.490328] ffff8881058a8180: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 24.490541] >ffff8881058a8200: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 24.490781] ^ [ 24.491107] ffff8881058a8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.491386] ffff8881058a8300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.491660] ==================================================================