Date
June 17, 2025, 3:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.090909] ================================================================== [ 22.091106] BUG: KASAN: slab-use-after-free in kmalloc_double_kzfree+0x168/0x308 [ 22.091260] Read of size 1 at addr fff00000c58ac2a0 by task kunit_try_catch/194 [ 22.091378] [ 22.091471] CPU: 0 UID: 0 PID: 194 Comm: kunit_try_catch Tainted: G B N 6.15.3-rc1 #1 PREEMPT [ 22.092041] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.092267] Hardware name: linux,dummy-virt (DT) [ 22.092358] Call trace: [ 22.092755] show_stack+0x20/0x38 (C) [ 22.093058] dump_stack_lvl+0x8c/0xd0 [ 22.093360] print_report+0x118/0x608 [ 22.093472] kasan_report+0xdc/0x128 [ 22.093658] __kasan_check_byte+0x54/0x70 [ 22.093906] kfree_sensitive+0x30/0xb0 [ 22.094022] kmalloc_double_kzfree+0x168/0x308 [ 22.095423] kunit_try_run_case+0x170/0x3f0 [ 22.095569] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.095704] kthread+0x328/0x630 [ 22.096357] ret_from_fork+0x10/0x20 [ 22.096827] [ 22.096885] Allocated by task 194: [ 22.097114] kasan_save_stack+0x3c/0x68 [ 22.097375] kasan_save_track+0x20/0x40 [ 22.097576] kasan_save_alloc_info+0x40/0x58 [ 22.097792] __kasan_kmalloc+0xd4/0xd8 [ 22.098036] __kmalloc_cache_noprof+0x16c/0x3c0 [ 22.098132] kmalloc_double_kzfree+0xb8/0x308 [ 22.098220] kunit_try_run_case+0x170/0x3f0 [ 22.098303] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.098410] kthread+0x328/0x630 [ 22.099147] ret_from_fork+0x10/0x20 [ 22.099280] [ 22.099462] Freed by task 194: [ 22.099579] kasan_save_stack+0x3c/0x68 [ 22.099683] kasan_save_track+0x20/0x40 [ 22.100081] kasan_save_free_info+0x4c/0x78 [ 22.100394] __kasan_slab_free+0x6c/0x98 [ 22.100630] kfree+0x214/0x3c8 [ 22.100723] kfree_sensitive+0x80/0xb0 [ 22.101242] kmalloc_double_kzfree+0x11c/0x308 [ 22.101368] kunit_try_run_case+0x170/0x3f0 [ 22.101468] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.101581] kthread+0x328/0x630 [ 22.101671] ret_from_fork+0x10/0x20 [ 22.101774] [ 22.102262] The buggy address belongs to the object at fff00000c58ac2a0 [ 22.102262] which belongs to the cache kmalloc-16 of size 16 [ 22.102523] The buggy address is located 0 bytes inside of [ 22.102523] freed 16-byte region [fff00000c58ac2a0, fff00000c58ac2b0) [ 22.103014] [ 22.103098] The buggy address belongs to the physical page: [ 22.103334] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058ac [ 22.103504] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.104044] page_type: f5(slab) [ 22.104204] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 22.104533] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 22.104666] page dumped because: kasan: bad access detected [ 22.104956] [ 22.105091] Memory state around the buggy address: [ 22.105383] fff00000c58ac180: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 22.105441] fff00000c58ac200: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 22.105490] >fff00000c58ac280: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 22.105533] ^ [ 22.105573] fff00000c58ac300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.105619] fff00000c58ac380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.105659] ==================================================================
[ 19.803606] ================================================================== [ 19.805460] BUG: KASAN: slab-use-after-free in kmalloc_double_kzfree+0x19c/0x350 [ 19.806040] Read of size 1 at addr ffff8881026cd0a0 by task kunit_try_catch/212 [ 19.806601] [ 19.806876] CPU: 0 UID: 0 PID: 212 Comm: kunit_try_catch Tainted: G B N 6.15.3-rc1 #1 PREEMPT(voluntary) [ 19.807008] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.807047] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 19.807102] Call Trace: [ 19.807125] <TASK> [ 19.807152] dump_stack_lvl+0x73/0xb0 [ 19.807193] print_report+0xd1/0x650 [ 19.807228] ? __virt_addr_valid+0x1db/0x2d0 [ 19.807770] ? kmalloc_double_kzfree+0x19c/0x350 [ 19.807821] ? kasan_complete_mode_report_info+0x64/0x200 [ 19.807859] ? kmalloc_double_kzfree+0x19c/0x350 [ 19.807906] kasan_report+0x141/0x180 [ 19.807956] ? kmalloc_double_kzfree+0x19c/0x350 [ 19.808081] ? kmalloc_double_kzfree+0x19c/0x350 [ 19.808141] __kasan_check_byte+0x3d/0x50 [ 19.808178] kfree_sensitive+0x22/0x90 [ 19.808214] kmalloc_double_kzfree+0x19c/0x350 [ 19.808249] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 19.808308] ? __schedule+0x10cc/0x2b60 [ 19.808350] ? __pfx_read_tsc+0x10/0x10 [ 19.808381] ? ktime_get_ts64+0x86/0x230 [ 19.808419] kunit_try_run_case+0x1a5/0x480 [ 19.808455] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.808487] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 19.808523] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 19.808557] ? __kthread_parkme+0x82/0x180 [ 19.808589] ? preempt_count_sub+0x50/0x80 [ 19.808625] ? __pfx_kunit_try_run_case+0x10/0x10 [ 19.808659] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.808690] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 19.808722] kthread+0x337/0x6f0 [ 19.808745] ? trace_preempt_on+0x20/0xc0 [ 19.808779] ? __pfx_kthread+0x10/0x10 [ 19.808803] ? _raw_spin_unlock_irq+0x47/0x80 [ 19.808832] ? calculate_sigpending+0x7b/0xa0 [ 19.808863] ? __pfx_kthread+0x10/0x10 [ 19.808887] ret_from_fork+0x41/0x80 [ 19.808918] ? __pfx_kthread+0x10/0x10 [ 19.808944] ret_from_fork_asm+0x1a/0x30 [ 19.809045] </TASK> [ 19.809081] [ 19.830024] Allocated by task 212: [ 19.830413] kasan_save_stack+0x45/0x70 [ 19.830872] kasan_save_track+0x18/0x40 [ 19.832111] kasan_save_alloc_info+0x3b/0x50 [ 19.832555] __kasan_kmalloc+0xb7/0xc0 [ 19.833220] __kmalloc_cache_noprof+0x189/0x420 [ 19.833604] kmalloc_double_kzfree+0xa9/0x350 [ 19.834072] kunit_try_run_case+0x1a5/0x480 [ 19.834671] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.835414] kthread+0x337/0x6f0 [ 19.835741] ret_from_fork+0x41/0x80 [ 19.836372] ret_from_fork_asm+0x1a/0x30 [ 19.837097] [ 19.837822] Freed by task 212: [ 19.838636] kasan_save_stack+0x45/0x70 [ 19.839020] kasan_save_track+0x18/0x40 [ 19.839438] kasan_save_free_info+0x3f/0x60 [ 19.840068] __kasan_slab_free+0x56/0x70 [ 19.840518] kfree+0x222/0x3f0 [ 19.840884] kfree_sensitive+0x67/0x90 [ 19.841833] kmalloc_double_kzfree+0x12b/0x350 [ 19.842274] kunit_try_run_case+0x1a5/0x480 [ 19.842758] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 19.843408] kthread+0x337/0x6f0 [ 19.843744] ret_from_fork+0x41/0x80 [ 19.844350] ret_from_fork_asm+0x1a/0x30 [ 19.844761] [ 19.845099] The buggy address belongs to the object at ffff8881026cd0a0 [ 19.845099] which belongs to the cache kmalloc-16 of size 16 [ 19.846045] The buggy address is located 0 bytes inside of [ 19.846045] freed 16-byte region [ffff8881026cd0a0, ffff8881026cd0b0) [ 19.847434] [ 19.848049] The buggy address belongs to the physical page: [ 19.848875] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026cd [ 19.849626] flags: 0x200000000000000(node=0|zone=2) [ 19.850121] page_type: f5(slab) [ 19.850614] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 19.851123] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.851661] page dumped because: kasan: bad access detected [ 19.852164] [ 19.852355] Memory state around the buggy address: [ 19.852666] ffff8881026ccf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.853050] ffff8881026cd000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.853538] >ffff8881026cd080: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 19.854161] ^ [ 19.854677] ffff8881026cd100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.855076] ffff8881026cd180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.855600] ==================================================================