Date
July 17, 2025, 10:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.750680] ================================================================== [ 29.750765] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 29.750828] Free of addr fff00000c7ac9380 by task kunit_try_catch/223 [ 29.751155] [ 29.751260] CPU: 1 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT [ 29.751365] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.751391] Hardware name: linux,dummy-virt (DT) [ 29.751541] Call trace: [ 29.751576] show_stack+0x20/0x38 (C) [ 29.751656] dump_stack_lvl+0x8c/0xd0 [ 29.751709] print_report+0x118/0x5d0 [ 29.751754] kasan_report_invalid_free+0xc0/0xe8 [ 29.751961] check_slab_allocation+0xd4/0x108 [ 29.752038] __kasan_slab_pre_free+0x2c/0x48 [ 29.752357] kfree+0xe8/0x3c8 [ 29.752443] kfree_sensitive+0x3c/0xb0 [ 29.752527] kmalloc_double_kzfree+0x168/0x308 [ 29.752855] kunit_try_run_case+0x170/0x3f0 [ 29.752981] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.753113] kthread+0x328/0x630 [ 29.753183] ret_from_fork+0x10/0x20 [ 29.753494] [ 29.753556] Allocated by task 223: [ 29.753998] kasan_save_stack+0x3c/0x68 [ 29.754089] kasan_save_track+0x20/0x40 [ 29.754241] kasan_save_alloc_info+0x40/0x58 [ 29.754311] __kasan_kmalloc+0xd4/0xd8 [ 29.754604] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.754739] kmalloc_double_kzfree+0xb8/0x308 [ 29.754887] kunit_try_run_case+0x170/0x3f0 [ 29.754971] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.755074] kthread+0x328/0x630 [ 29.755107] ret_from_fork+0x10/0x20 [ 29.755517] [ 29.755580] Freed by task 223: [ 29.755646] kasan_save_stack+0x3c/0x68 [ 29.755786] kasan_save_track+0x20/0x40 [ 29.755873] kasan_save_free_info+0x4c/0x78 [ 29.756046] __kasan_slab_free+0x6c/0x98 [ 29.756130] kfree+0x214/0x3c8 [ 29.756185] kfree_sensitive+0x80/0xb0 [ 29.756231] kmalloc_double_kzfree+0x11c/0x308 [ 29.756272] kunit_try_run_case+0x170/0x3f0 [ 29.756315] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.756375] kthread+0x328/0x630 [ 29.756415] ret_from_fork+0x10/0x20 [ 29.756451] [ 29.756471] The buggy address belongs to the object at fff00000c7ac9380 [ 29.756471] which belongs to the cache kmalloc-16 of size 16 [ 29.756528] The buggy address is located 0 bytes inside of [ 29.756528] 16-byte region [fff00000c7ac9380, fff00000c7ac9390) [ 29.756587] [ 29.756627] The buggy address belongs to the physical page: [ 29.756665] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107ac9 [ 29.756718] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.756773] page_type: f5(slab) [ 29.756813] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 29.756872] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 29.756920] page dumped because: kasan: bad access detected [ 29.756959] [ 29.756976] Memory state around the buggy address: [ 29.757016] fff00000c7ac9280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.757070] fff00000c7ac9300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.757124] >fff00000c7ac9380: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.757171] ^ [ 29.757199] fff00000c7ac9400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.757239] fff00000c7ac9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.757277] ==================================================================
[ 26.023522] ================================================================== [ 26.023877] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 26.024171] Free of addr ffff888104561cc0 by task kunit_try_catch/241 [ 26.024555] [ 26.024662] CPU: 1 UID: 0 PID: 241 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) [ 26.024707] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.024719] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.024738] Call Trace: [ 26.024751] <TASK> [ 26.024766] dump_stack_lvl+0x73/0xb0 [ 26.024794] print_report+0xd1/0x610 [ 26.024816] ? __virt_addr_valid+0x1db/0x2d0 [ 26.024839] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.024863] ? kfree_sensitive+0x2e/0x90 [ 26.024883] kasan_report_invalid_free+0x10a/0x130 [ 26.024906] ? kfree_sensitive+0x2e/0x90 [ 26.024927] ? kfree_sensitive+0x2e/0x90 [ 26.024945] check_slab_allocation+0x101/0x130 [ 26.024966] __kasan_slab_pre_free+0x28/0x40 [ 26.024985] kfree+0xf0/0x3f0 [ 26.025005] ? kfree_sensitive+0x2e/0x90 [ 26.025028] kfree_sensitive+0x2e/0x90 [ 26.025047] kmalloc_double_kzfree+0x19c/0x350 [ 26.025068] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 26.025101] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 26.025124] ? trace_hardirqs_on+0x37/0xe0 [ 26.025147] ? __pfx_read_tsc+0x10/0x10 [ 26.025168] ? ktime_get_ts64+0x86/0x230 [ 26.025191] kunit_try_run_case+0x1a5/0x480 [ 26.025213] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.025310] ? queued_spin_lock_slowpath+0x116/0xb40 [ 26.025335] ? __kthread_parkme+0x82/0x180 [ 26.025358] ? preempt_count_sub+0x50/0x80 [ 26.025380] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.025403] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.025425] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.025447] kthread+0x337/0x6f0 [ 26.025466] ? trace_preempt_on+0x20/0xc0 [ 26.025488] ? __pfx_kthread+0x10/0x10 [ 26.025508] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.025528] ? calculate_sigpending+0x7b/0xa0 [ 26.025551] ? __pfx_kthread+0x10/0x10 [ 26.025571] ret_from_fork+0x116/0x1d0 [ 26.025589] ? __pfx_kthread+0x10/0x10 [ 26.025608] ret_from_fork_asm+0x1a/0x30 [ 26.025639] </TASK> [ 26.025648] [ 26.034522] Allocated by task 241: [ 26.034707] kasan_save_stack+0x45/0x70 [ 26.034912] kasan_save_track+0x18/0x40 [ 26.036352] kasan_save_alloc_info+0x3b/0x50 [ 26.036534] __kasan_kmalloc+0xb7/0xc0 [ 26.036671] __kmalloc_cache_noprof+0x189/0x420 [ 26.036851] kmalloc_double_kzfree+0xa9/0x350 [ 26.037063] kunit_try_run_case+0x1a5/0x480 [ 26.037280] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.037541] kthread+0x337/0x6f0 [ 26.037700] ret_from_fork+0x116/0x1d0 [ 26.037882] ret_from_fork_asm+0x1a/0x30 [ 26.038076] [ 26.038667] Freed by task 241: [ 26.038780] kasan_save_stack+0x45/0x70 [ 26.038921] kasan_save_track+0x18/0x40 [ 26.039133] kasan_save_free_info+0x3f/0x60 [ 26.039821] __kasan_slab_free+0x56/0x70 [ 26.039990] kfree+0x222/0x3f0 [ 26.040159] kfree_sensitive+0x67/0x90 [ 26.040465] kmalloc_double_kzfree+0x12b/0x350 [ 26.040683] kunit_try_run_case+0x1a5/0x480 [ 26.040887] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.041438] kthread+0x337/0x6f0 [ 26.041567] ret_from_fork+0x116/0x1d0 [ 26.041939] ret_from_fork_asm+0x1a/0x30 [ 26.042140] [ 26.042393] The buggy address belongs to the object at ffff888104561cc0 [ 26.042393] which belongs to the cache kmalloc-16 of size 16 [ 26.042946] The buggy address is located 0 bytes inside of [ 26.042946] 16-byte region [ffff888104561cc0, ffff888104561cd0) [ 26.043718] [ 26.043799] The buggy address belongs to the physical page: [ 26.043966] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104561 [ 26.044409] flags: 0x200000000000000(node=0|zone=2) [ 26.044829] page_type: f5(slab) [ 26.044999] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 26.045497] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 26.045726] page dumped because: kasan: bad access detected [ 26.045891] [ 26.045960] Memory state around the buggy address: [ 26.046130] ffff888104561b80: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc [ 26.046647] ffff888104561c00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 26.046898] >ffff888104561c80: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 26.047194] ^ [ 26.047853] ffff888104561d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.048179] ffff888104561d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.048502] ==================================================================