Date
July 6, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.250927] ================================================================== [ 18.251149] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 18.251222] Free of addr fff00000c1cea960 by task kunit_try_catch/192 [ 18.251266] [ 18.251296] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.251376] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.251402] Hardware name: linux,dummy-virt (DT) [ 18.251442] Call trace: [ 18.251466] show_stack+0x20/0x38 (C) [ 18.251519] dump_stack_lvl+0x8c/0xd0 [ 18.251566] print_report+0x118/0x608 [ 18.251610] kasan_report_invalid_free+0xc0/0xe8 [ 18.251659] check_slab_allocation+0xd4/0x108 [ 18.251706] __kasan_slab_pre_free+0x2c/0x48 [ 18.251753] kfree+0xe8/0x3c8 [ 18.251793] kfree_sensitive+0x3c/0xb0 [ 18.251836] kmalloc_double_kzfree+0x168/0x308 [ 18.251900] kunit_try_run_case+0x170/0x3f0 [ 18.251946] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.251997] kthread+0x328/0x630 [ 18.252038] ret_from_fork+0x10/0x20 [ 18.252085] [ 18.252105] Allocated by task 192: [ 18.252133] kasan_save_stack+0x3c/0x68 [ 18.252174] kasan_save_track+0x20/0x40 [ 18.252221] kasan_save_alloc_info+0x40/0x58 [ 18.252263] __kasan_kmalloc+0xd4/0xd8 [ 18.252299] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.252338] kmalloc_double_kzfree+0xb8/0x308 [ 18.252385] kunit_try_run_case+0x170/0x3f0 [ 18.252423] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.252465] kthread+0x328/0x630 [ 18.252506] ret_from_fork+0x10/0x20 [ 18.252542] [ 18.252560] Freed by task 192: [ 18.252586] kasan_save_stack+0x3c/0x68 [ 18.252623] kasan_save_track+0x20/0x40 [ 18.252660] kasan_save_free_info+0x4c/0x78 [ 18.252701] __kasan_slab_free+0x6c/0x98 [ 18.252737] kfree+0x214/0x3c8 [ 18.252770] kfree_sensitive+0x80/0xb0 [ 18.252806] kmalloc_double_kzfree+0x11c/0x308 [ 18.252846] kunit_try_run_case+0x170/0x3f0 [ 18.252884] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.252927] kthread+0x328/0x630 [ 18.252960] ret_from_fork+0x10/0x20 [ 18.252994] [ 18.253023] The buggy address belongs to the object at fff00000c1cea960 [ 18.253023] which belongs to the cache kmalloc-16 of size 16 [ 18.253085] The buggy address is located 0 bytes inside of [ 18.253085] 16-byte region [fff00000c1cea960, fff00000c1cea970) [ 18.253143] [ 18.253162] The buggy address belongs to the physical page: [ 18.253200] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101cea [ 18.254155] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.254248] page_type: f5(slab) [ 18.254307] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.254391] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.254648] page dumped because: kasan: bad access detected [ 18.254721] [ 18.254757] Memory state around the buggy address: [ 18.254892] fff00000c1cea800: fa fb fc fc 00 04 fc fc fa fb fc fc fa fb fc fc [ 18.256255] fff00000c1cea880: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.256342] >fff00000c1cea900: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.257861] ^ [ 18.259107] fff00000c1cea980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.259470] fff00000c1ceaa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.259580] ==================================================================
[ 11.940563] ================================================================== [ 11.940896] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 11.941813] Free of addr ffff888101e8f4e0 by task kunit_try_catch/209 [ 11.942179] [ 11.942315] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.942361] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.942373] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.942394] Call Trace: [ 11.942413] <TASK> [ 11.942430] dump_stack_lvl+0x73/0xb0 [ 11.942460] print_report+0xd1/0x650 [ 11.942482] ? __virt_addr_valid+0x1db/0x2d0 [ 11.942504] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.942525] ? kfree_sensitive+0x2e/0x90 [ 11.942546] kasan_report_invalid_free+0x10a/0x130 [ 11.942570] ? kfree_sensitive+0x2e/0x90 [ 11.942591] ? kfree_sensitive+0x2e/0x90 [ 11.942610] check_slab_allocation+0x101/0x130 [ 11.942632] __kasan_slab_pre_free+0x28/0x40 [ 11.942652] kfree+0xf0/0x3f0 [ 11.942673] ? kfree_sensitive+0x2e/0x90 [ 11.942694] kfree_sensitive+0x2e/0x90 [ 11.942713] kmalloc_double_kzfree+0x19c/0x350 [ 11.942736] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 11.942759] ? __schedule+0x10cc/0x2b60 [ 11.942781] ? __pfx_read_tsc+0x10/0x10 [ 11.942801] ? ktime_get_ts64+0x86/0x230 [ 11.942824] kunit_try_run_case+0x1a5/0x480 [ 11.942847] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.942868] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.942890] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.942913] ? __kthread_parkme+0x82/0x180 [ 11.942942] ? preempt_count_sub+0x50/0x80 [ 11.942965] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.942988] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.943009] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.943031] kthread+0x337/0x6f0 [ 11.943050] ? trace_preempt_on+0x20/0xc0 [ 11.943072] ? __pfx_kthread+0x10/0x10 [ 11.943092] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.943118] ? calculate_sigpending+0x7b/0xa0 [ 11.943142] ? __pfx_kthread+0x10/0x10 [ 11.943162] ret_from_fork+0x116/0x1d0 [ 11.943179] ? __pfx_kthread+0x10/0x10 [ 11.943199] ret_from_fork_asm+0x1a/0x30 [ 11.943229] </TASK> [ 11.943240] [ 11.951781] Allocated by task 209: [ 11.951914] kasan_save_stack+0x45/0x70 [ 11.952067] kasan_save_track+0x18/0x40 [ 11.952206] kasan_save_alloc_info+0x3b/0x50 [ 11.952404] __kasan_kmalloc+0xb7/0xc0 [ 11.952590] __kmalloc_cache_noprof+0x189/0x420 [ 11.952824] kmalloc_double_kzfree+0xa9/0x350 [ 11.953102] kunit_try_run_case+0x1a5/0x480 [ 11.953259] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.953433] kthread+0x337/0x6f0 [ 11.953552] ret_from_fork+0x116/0x1d0 [ 11.953728] ret_from_fork_asm+0x1a/0x30 [ 11.953925] [ 11.954030] Freed by task 209: [ 11.954358] kasan_save_stack+0x45/0x70 [ 11.954653] kasan_save_track+0x18/0x40 [ 11.954812] kasan_save_free_info+0x3f/0x60 [ 11.955020] __kasan_slab_free+0x56/0x70 [ 11.955252] kfree+0x222/0x3f0 [ 11.955421] kfree_sensitive+0x67/0x90 [ 11.955971] kmalloc_double_kzfree+0x12b/0x350 [ 11.956126] kunit_try_run_case+0x1a5/0x480 [ 11.956271] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.956443] kthread+0x337/0x6f0 [ 11.956753] ret_from_fork+0x116/0x1d0 [ 11.957136] ret_from_fork_asm+0x1a/0x30 [ 11.957494] [ 11.957638] The buggy address belongs to the object at ffff888101e8f4e0 [ 11.957638] which belongs to the cache kmalloc-16 of size 16 [ 11.958000] The buggy address is located 0 bytes inside of [ 11.958000] 16-byte region [ffff888101e8f4e0, ffff888101e8f4f0) [ 11.958330] [ 11.958445] The buggy address belongs to the physical page: [ 11.958897] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e8f [ 11.959550] flags: 0x200000000000000(node=0|zone=2) [ 11.959776] page_type: f5(slab) [ 11.959899] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.960316] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.960840] page dumped because: kasan: bad access detected [ 11.961087] [ 11.961171] Memory state around the buggy address: [ 11.961413] ffff888101e8f380: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 11.961741] ffff888101e8f400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.962094] >ffff888101e8f480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.962356] ^ [ 11.962596] ffff888101e8f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.963026] ffff888101e8f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.963425] ==================================================================