Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.929088] ================================================================== [ 19.929234] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 19.929347] Free of addr fff00000c6191560 by task kunit_try_catch/192 [ 19.929435] [ 19.929513] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.929739] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.929799] Hardware name: linux,dummy-virt (DT) [ 19.929865] Call trace: [ 19.929916] show_stack+0x20/0x38 (C) [ 19.930245] dump_stack_lvl+0x8c/0xd0 [ 19.930368] print_report+0x118/0x608 [ 19.930482] kasan_report_invalid_free+0xc0/0xe8 [ 19.930686] check_slab_allocation+0xd4/0x108 [ 19.930847] __kasan_slab_pre_free+0x2c/0x48 [ 19.930976] kfree+0xe8/0x3c8 [ 19.931255] kfree_sensitive+0x3c/0xb0 [ 19.931354] kmalloc_double_kzfree+0x168/0x308 [ 19.931715] kunit_try_run_case+0x170/0x3f0 [ 19.932092] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.932411] kthread+0x328/0x630 [ 19.932584] ret_from_fork+0x10/0x20 [ 19.932709] [ 19.932761] Allocated by task 192: [ 19.933070] kasan_save_stack+0x3c/0x68 [ 19.933174] kasan_save_track+0x20/0x40 [ 19.933270] kasan_save_alloc_info+0x40/0x58 [ 19.934100] __kasan_kmalloc+0xd4/0xd8 [ 19.934205] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.934420] kmalloc_double_kzfree+0xb8/0x308 [ 19.934545] kunit_try_run_case+0x170/0x3f0 [ 19.934635] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.934734] kthread+0x328/0x630 [ 19.934807] ret_from_fork+0x10/0x20 [ 19.934884] [ 19.934929] Freed by task 192: [ 19.935374] kasan_save_stack+0x3c/0x68 [ 19.935482] kasan_save_track+0x20/0x40 [ 19.935815] kasan_save_free_info+0x4c/0x78 [ 19.936206] __kasan_slab_free+0x6c/0x98 [ 19.936300] kfree+0x214/0x3c8 [ 19.936384] kfree_sensitive+0x80/0xb0 [ 19.936468] kmalloc_double_kzfree+0x11c/0x308 [ 19.936778] kunit_try_run_case+0x170/0x3f0 [ 19.936897] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.937002] kthread+0x328/0x630 [ 19.937436] ret_from_fork+0x10/0x20 [ 19.937544] [ 19.937596] The buggy address belongs to the object at fff00000c6191560 [ 19.937596] which belongs to the cache kmalloc-16 of size 16 [ 19.937725] The buggy address is located 0 bytes inside of [ 19.937725] 16-byte region [fff00000c6191560, fff00000c6191570) [ 19.937861] [ 19.938240] The buggy address belongs to the physical page: [ 19.938316] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106191 [ 19.938422] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.938530] page_type: f5(slab) [ 19.938616] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.939489] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.939630] page dumped because: kasan: bad access detected [ 19.939714] [ 19.939954] Memory state around the buggy address: [ 19.940173] fff00000c6191400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.940544] fff00000c6191480: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.940674] >fff00000c6191500: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.940768] ^ [ 19.941423] fff00000c6191580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.941569] fff00000c6191600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.941955] ==================================================================
[ 11.932144] ================================================================== [ 11.933248] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 11.933602] Free of addr ffff8881023854c0 by task kunit_try_catch/209 [ 11.934036] [ 11.934180] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.934223] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.934234] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.934254] Call Trace: [ 11.934266] <TASK> [ 11.934282] dump_stack_lvl+0x73/0xb0 [ 11.934310] print_report+0xd1/0x650 [ 11.934333] ? __virt_addr_valid+0x1db/0x2d0 [ 11.934356] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.934377] ? kfree_sensitive+0x2e/0x90 [ 11.934397] kasan_report_invalid_free+0x10a/0x130 [ 11.934483] ? kfree_sensitive+0x2e/0x90 [ 11.934505] ? kfree_sensitive+0x2e/0x90 [ 11.934528] check_slab_allocation+0x101/0x130 [ 11.934549] __kasan_slab_pre_free+0x28/0x40 [ 11.934568] kfree+0xf0/0x3f0 [ 11.934589] ? kfree_sensitive+0x2e/0x90 [ 11.934610] kfree_sensitive+0x2e/0x90 [ 11.934629] kmalloc_double_kzfree+0x19c/0x350 [ 11.934650] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 11.934672] ? __schedule+0x10cc/0x2b60 [ 11.934693] ? __pfx_read_tsc+0x10/0x10 [ 11.934713] ? ktime_get_ts64+0x86/0x230 [ 11.934737] kunit_try_run_case+0x1a5/0x480 [ 11.934760] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.934781] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.934803] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.934824] ? __kthread_parkme+0x82/0x180 [ 11.934843] ? preempt_count_sub+0x50/0x80 [ 11.934866] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.934888] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.934909] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.934931] kthread+0x337/0x6f0 [ 11.934949] ? trace_preempt_on+0x20/0xc0 [ 11.934970] ? __pfx_kthread+0x10/0x10 [ 11.934989] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.935009] ? calculate_sigpending+0x7b/0xa0 [ 11.935031] ? __pfx_kthread+0x10/0x10 [ 11.935051] ret_from_fork+0x116/0x1d0 [ 11.935068] ? __pfx_kthread+0x10/0x10 [ 11.935087] ret_from_fork_asm+0x1a/0x30 [ 11.935117] </TASK> [ 11.935153] [ 11.943264] Allocated by task 209: [ 11.943636] kasan_save_stack+0x45/0x70 [ 11.943807] kasan_save_track+0x18/0x40 [ 11.944008] kasan_save_alloc_info+0x3b/0x50 [ 11.944270] __kasan_kmalloc+0xb7/0xc0 [ 11.944484] __kmalloc_cache_noprof+0x189/0x420 [ 11.944647] kmalloc_double_kzfree+0xa9/0x350 [ 11.944814] kunit_try_run_case+0x1a5/0x480 [ 11.945029] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.945398] kthread+0x337/0x6f0 [ 11.945831] ret_from_fork+0x116/0x1d0 [ 11.946180] ret_from_fork_asm+0x1a/0x30 [ 11.946329] [ 11.946475] Freed by task 209: [ 11.946640] kasan_save_stack+0x45/0x70 [ 11.946807] kasan_save_track+0x18/0x40 [ 11.946988] kasan_save_free_info+0x3f/0x60 [ 11.947166] __kasan_slab_free+0x56/0x70 [ 11.947395] kfree+0x222/0x3f0 [ 11.947563] kfree_sensitive+0x67/0x90 [ 11.947729] kmalloc_double_kzfree+0x12b/0x350 [ 11.947944] kunit_try_run_case+0x1a5/0x480 [ 11.948089] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.948274] kthread+0x337/0x6f0 [ 11.948393] ret_from_fork+0x116/0x1d0 [ 11.948524] ret_from_fork_asm+0x1a/0x30 [ 11.948690] [ 11.948784] The buggy address belongs to the object at ffff8881023854c0 [ 11.948784] which belongs to the cache kmalloc-16 of size 16 [ 11.949463] The buggy address is located 0 bytes inside of [ 11.949463] 16-byte region [ffff8881023854c0, ffff8881023854d0) [ 11.949792] [ 11.949862] The buggy address belongs to the physical page: [ 11.950031] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102385 [ 11.950746] flags: 0x200000000000000(node=0|zone=2) [ 11.950998] page_type: f5(slab) [ 11.951225] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.951704] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.952051] page dumped because: kasan: bad access detected [ 11.952422] [ 11.952523] Memory state around the buggy address: [ 11.952710] ffff888102385380: 00 06 fc fc 00 06 fc fc fa fb fc fc fa fb fc fc [ 11.952928] ffff888102385400: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc [ 11.953437] >ffff888102385480: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 11.953758] ^ [ 11.953976] ffff888102385500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.954285] ffff888102385580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.954722] ==================================================================