Date
July 18, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.582699] ================================================================== [ 15.582950] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 15.583537] Free of addr fff00000c3ef7e00 by task kunit_try_catch/192 [ 15.583591] [ 15.583626] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.583709] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.583892] Hardware name: linux,dummy-virt (DT) [ 15.583942] Call trace: [ 15.584184] show_stack+0x20/0x38 (C) [ 15.584374] dump_stack_lvl+0x8c/0xd0 [ 15.584670] print_report+0x118/0x5d0 [ 15.584740] kasan_report_invalid_free+0xc0/0xe8 [ 15.584872] check_slab_allocation+0xd4/0x108 [ 15.584948] __kasan_slab_pre_free+0x2c/0x48 [ 15.584999] kfree+0xe8/0x3c8 [ 15.585349] kfree_sensitive+0x3c/0xb0 [ 15.585510] kmalloc_double_kzfree+0x168/0x308 [ 15.585604] kunit_try_run_case+0x170/0x3f0 [ 15.585676] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.585731] kthread+0x328/0x630 [ 15.585775] ret_from_fork+0x10/0x20 [ 15.585823] [ 15.585842] Allocated by task 192: [ 15.586130] kasan_save_stack+0x3c/0x68 [ 15.586192] kasan_save_track+0x20/0x40 [ 15.586554] kasan_save_alloc_info+0x40/0x58 [ 15.586795] __kasan_kmalloc+0xd4/0xd8 [ 15.587030] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.587427] kmalloc_double_kzfree+0xb8/0x308 [ 15.587589] kunit_try_run_case+0x170/0x3f0 [ 15.587634] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.587852] kthread+0x328/0x630 [ 15.588069] ret_from_fork+0x10/0x20 [ 15.588112] [ 15.588174] Freed by task 192: [ 15.588206] kasan_save_stack+0x3c/0x68 [ 15.588247] kasan_save_track+0x20/0x40 [ 15.588296] kasan_save_free_info+0x4c/0x78 [ 15.588348] __kasan_slab_free+0x6c/0x98 [ 15.588387] kfree+0x214/0x3c8 [ 15.588431] kfree_sensitive+0x80/0xb0 [ 15.588467] kmalloc_double_kzfree+0x11c/0x308 [ 15.588504] kunit_try_run_case+0x170/0x3f0 [ 15.588552] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.588605] kthread+0x328/0x630 [ 15.588637] ret_from_fork+0x10/0x20 [ 15.588673] [ 15.588694] The buggy address belongs to the object at fff00000c3ef7e00 [ 15.588694] which belongs to the cache kmalloc-16 of size 16 [ 15.588762] The buggy address is located 0 bytes inside of [ 15.588762] 16-byte region [fff00000c3ef7e00, fff00000c3ef7e10) [ 15.588822] [ 15.588841] The buggy address belongs to the physical page: [ 15.588879] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ef7 [ 15.588946] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.589002] page_type: f5(slab) [ 15.589049] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.589112] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.589154] page dumped because: kasan: bad access detected [ 15.589186] [ 15.589205] Memory state around the buggy address: [ 15.589237] fff00000c3ef7d00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.589289] fff00000c3ef7d80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.589993] >fff00000c3ef7e00: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.590042] ^ [ 15.590073] fff00000c3ef7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.590117] fff00000c3ef7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.590175] ==================================================================
[ 12.540796] ================================================================== [ 12.541340] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 12.542002] Free of addr ffff8881025c74e0 by task kunit_try_catch/211 [ 12.542783] [ 12.542921] CPU: 1 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.542963] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.542973] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.542993] Call Trace: [ 12.543004] <TASK> [ 12.543017] dump_stack_lvl+0x73/0xb0 [ 12.543045] print_report+0xd1/0x610 [ 12.543066] ? __virt_addr_valid+0x1db/0x2d0 [ 12.543088] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.543110] ? kfree_sensitive+0x2e/0x90 [ 12.543187] kasan_report_invalid_free+0x10a/0x130 [ 12.543227] ? kfree_sensitive+0x2e/0x90 [ 12.543248] ? kfree_sensitive+0x2e/0x90 [ 12.543268] check_slab_allocation+0x101/0x130 [ 12.543300] __kasan_slab_pre_free+0x28/0x40 [ 12.543320] kfree+0xf0/0x3f0 [ 12.543341] ? kfree_sensitive+0x2e/0x90 [ 12.543362] kfree_sensitive+0x2e/0x90 [ 12.543381] kmalloc_double_kzfree+0x19c/0x350 [ 12.543405] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 12.543428] ? __schedule+0x10cc/0x2b60 [ 12.543450] ? __pfx_read_tsc+0x10/0x10 [ 12.543476] ? ktime_get_ts64+0x86/0x230 [ 12.543499] kunit_try_run_case+0x1a5/0x480 [ 12.543522] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.543544] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.543576] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.543599] ? __kthread_parkme+0x82/0x180 [ 12.543619] ? preempt_count_sub+0x50/0x80 [ 12.543652] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.543675] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.543698] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.543722] kthread+0x337/0x6f0 [ 12.543741] ? trace_preempt_on+0x20/0xc0 [ 12.543764] ? __pfx_kthread+0x10/0x10 [ 12.543783] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.543804] ? calculate_sigpending+0x7b/0xa0 [ 12.543827] ? __pfx_kthread+0x10/0x10 [ 12.543847] ret_from_fork+0x116/0x1d0 [ 12.543865] ? __pfx_kthread+0x10/0x10 [ 12.543893] ret_from_fork_asm+0x1a/0x30 [ 12.543923] </TASK> [ 12.543932] [ 12.554178] Allocated by task 211: [ 12.554712] kasan_save_stack+0x45/0x70 [ 12.555354] kasan_save_track+0x18/0x40 [ 12.555929] kasan_save_alloc_info+0x3b/0x50 [ 12.556623] __kasan_kmalloc+0xb7/0xc0 [ 12.556875] __kmalloc_cache_noprof+0x189/0x420 [ 12.557577] kmalloc_double_kzfree+0xa9/0x350 [ 12.558337] kunit_try_run_case+0x1a5/0x480 [ 12.558728] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.558915] kthread+0x337/0x6f0 [ 12.559585] ret_from_fork+0x116/0x1d0 [ 12.559964] ret_from_fork_asm+0x1a/0x30 [ 12.560582] [ 12.560914] Freed by task 211: [ 12.561526] kasan_save_stack+0x45/0x70 [ 12.561675] kasan_save_track+0x18/0x40 [ 12.561812] kasan_save_free_info+0x3f/0x60 [ 12.561958] __kasan_slab_free+0x56/0x70 [ 12.562098] kfree+0x222/0x3f0 [ 12.562215] kfree_sensitive+0x67/0x90 [ 12.562359] kmalloc_double_kzfree+0x12b/0x350 [ 12.562511] kunit_try_run_case+0x1a5/0x480 [ 12.562656] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.562830] kthread+0x337/0x6f0 [ 12.562949] ret_from_fork+0x116/0x1d0 [ 12.563079] ret_from_fork_asm+0x1a/0x30 [ 12.563217] [ 12.563307] The buggy address belongs to the object at ffff8881025c74e0 [ 12.563307] which belongs to the cache kmalloc-16 of size 16 [ 12.564481] The buggy address is located 0 bytes inside of [ 12.564481] 16-byte region [ffff8881025c74e0, ffff8881025c74f0) [ 12.565783] [ 12.565955] The buggy address belongs to the physical page: [ 12.566556] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025c7 [ 12.567350] flags: 0x200000000000000(node=0|zone=2) [ 12.567910] page_type: f5(slab) [ 12.568313] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.569172] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.570086] page dumped because: kasan: bad access detected [ 12.570749] [ 12.571012] Memory state around the buggy address: [ 12.571478] ffff8881025c7380: 00 06 fc fc 00 06 fc fc 00 04 fc fc 00 04 fc fc [ 12.572185] ffff8881025c7400: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc [ 12.572559] >ffff8881025c7480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.573345] ^ [ 12.573769] ffff8881025c7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.573993] ffff8881025c7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.574803] ==================================================================