Date
July 9, 2025, 1:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.253973] ================================================================== [ 29.254022] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 29.254085] Read of size 1 at addr fff00000c97e2a00 by task kunit_try_catch/196 [ 29.254132] [ 29.254160] CPU: 0 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 29.254631] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.254694] Hardware name: linux,dummy-virt (DT) [ 29.254724] Call trace: [ 29.254777] show_stack+0x20/0x38 (C) [ 29.254826] dump_stack_lvl+0x8c/0xd0 [ 29.254872] print_report+0x118/0x5d0 [ 29.255200] kasan_report+0xdc/0x128 [ 29.255316] __asan_report_load1_noabort+0x20/0x30 [ 29.255365] krealloc_uaf+0x4c8/0x520 [ 29.255409] kunit_try_run_case+0x170/0x3f0 [ 29.255458] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.255759] kthread+0x328/0x630 [ 29.255980] ret_from_fork+0x10/0x20 [ 29.256032] [ 29.256050] Allocated by task 196: [ 29.256117] kasan_save_stack+0x3c/0x68 [ 29.256162] kasan_save_track+0x20/0x40 [ 29.256199] kasan_save_alloc_info+0x40/0x58 [ 29.256235] __kasan_kmalloc+0xd4/0xd8 [ 29.256271] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.256309] krealloc_uaf+0xc8/0x520 [ 29.256344] kunit_try_run_case+0x170/0x3f0 [ 29.256670] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.256840] kthread+0x328/0x630 [ 29.256875] ret_from_fork+0x10/0x20 [ 29.257042] [ 29.257121] Freed by task 196: [ 29.257147] kasan_save_stack+0x3c/0x68 [ 29.257186] kasan_save_track+0x20/0x40 [ 29.257222] kasan_save_free_info+0x4c/0x78 [ 29.257259] __kasan_slab_free+0x6c/0x98 [ 29.257296] kfree+0x214/0x3c8 [ 29.257531] krealloc_uaf+0x12c/0x520 [ 29.257573] kunit_try_run_case+0x170/0x3f0 [ 29.257611] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.257686] kthread+0x328/0x630 [ 29.257718] ret_from_fork+0x10/0x20 [ 29.257838] [ 29.258170] The buggy address belongs to the object at fff00000c97e2a00 [ 29.258170] which belongs to the cache kmalloc-256 of size 256 [ 29.258803] The buggy address is located 0 bytes inside of [ 29.258803] freed 256-byte region [fff00000c97e2a00, fff00000c97e2b00) [ 29.258917] [ 29.259092] The buggy address belongs to the physical page: [ 29.259547] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1097e2 [ 29.260066] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 29.260277] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 29.260330] page_type: f5(slab) [ 29.260777] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 29.261161] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 29.261330] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 29.261379] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 29.261748] head: 0bfffe0000000001 ffffc1ffc325f881 00000000ffffffff 00000000ffffffff [ 29.262498] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 29.262550] page dumped because: kasan: bad access detected [ 29.262679] [ 29.262856] Memory state around the buggy address: [ 29.263168] fff00000c97e2900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.263214] fff00000c97e2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.263481] >fff00000c97e2a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.264118] ^ [ 29.264274] fff00000c97e2a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.264942] fff00000c97e2b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.266024] ================================================================== [ 29.247315] ================================================================== [ 29.247404] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 29.247456] Read of size 1 at addr fff00000c97e2a00 by task kunit_try_catch/196 [ 29.247503] [ 29.247534] CPU: 0 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 29.247658] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.247687] Hardware name: linux,dummy-virt (DT) [ 29.247717] Call trace: [ 29.247739] show_stack+0x20/0x38 (C) [ 29.247786] dump_stack_lvl+0x8c/0xd0 [ 29.247832] print_report+0x118/0x5d0 [ 29.247874] kasan_report+0xdc/0x128 [ 29.248452] __kasan_check_byte+0x54/0x70 [ 29.248521] krealloc_noprof+0x44/0x360 [ 29.248671] krealloc_uaf+0x180/0x520 [ 29.248799] kunit_try_run_case+0x170/0x3f0 [ 29.248850] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.248903] kthread+0x328/0x630 [ 29.248944] ret_from_fork+0x10/0x20 [ 29.249008] [ 29.249119] Allocated by task 196: [ 29.249151] kasan_save_stack+0x3c/0x68 [ 29.249193] kasan_save_track+0x20/0x40 [ 29.249230] kasan_save_alloc_info+0x40/0x58 [ 29.249438] __kasan_kmalloc+0xd4/0xd8 [ 29.249489] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.249581] krealloc_uaf+0xc8/0x520 [ 29.249660] kunit_try_run_case+0x170/0x3f0 [ 29.249753] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.249796] kthread+0x328/0x630 [ 29.249828] ret_from_fork+0x10/0x20 [ 29.249863] [ 29.249935] Freed by task 196: [ 29.250071] kasan_save_stack+0x3c/0x68 [ 29.250153] kasan_save_track+0x20/0x40 [ 29.250192] kasan_save_free_info+0x4c/0x78 [ 29.250267] __kasan_slab_free+0x6c/0x98 [ 29.250322] kfree+0x214/0x3c8 [ 29.250401] krealloc_uaf+0x12c/0x520 [ 29.250461] kunit_try_run_case+0x170/0x3f0 [ 29.250575] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.250619] kthread+0x328/0x630 [ 29.250651] ret_from_fork+0x10/0x20 [ 29.250772] [ 29.250912] The buggy address belongs to the object at fff00000c97e2a00 [ 29.250912] which belongs to the cache kmalloc-256 of size 256 [ 29.250996] The buggy address is located 0 bytes inside of [ 29.250996] freed 256-byte region [fff00000c97e2a00, fff00000c97e2b00) [ 29.251073] [ 29.251093] The buggy address belongs to the physical page: [ 29.251124] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1097e2 [ 29.251173] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 29.251217] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 29.251265] page_type: f5(slab) [ 29.251828] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 29.251985] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 29.252065] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 29.252113] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 29.252268] head: 0bfffe0000000001 ffffc1ffc325f881 00000000ffffffff 00000000ffffffff [ 29.252364] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 29.252405] page dumped because: kasan: bad access detected [ 29.252437] [ 29.252455] Memory state around the buggy address: [ 29.252547] fff00000c97e2900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.252589] fff00000c97e2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.252671] >fff00000c97e2a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.252707] ^ [ 29.252734] fff00000c97e2a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.252928] fff00000c97e2b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.253047] ==================================================================
[ 24.043680] ================================================================== [ 24.044140] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0 [ 24.044364] Read of size 1 at addr ffff888104e2ca00 by task kunit_try_catch/214 [ 24.044578] [ 24.044662] CPU: 0 UID: 0 PID: 214 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 24.044727] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 24.044741] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.044763] Call Trace: [ 24.044776] <TASK> [ 24.044794] dump_stack_lvl+0x73/0xb0 [ 24.044825] print_report+0xd1/0x610 [ 24.044847] ? __virt_addr_valid+0x1db/0x2d0 [ 24.044872] ? krealloc_uaf+0x1b8/0x5e0 [ 24.044892] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.044917] ? krealloc_uaf+0x1b8/0x5e0 [ 24.044937] kasan_report+0x141/0x180 [ 24.044958] ? krealloc_uaf+0x1b8/0x5e0 [ 24.044982] ? krealloc_uaf+0x1b8/0x5e0 [ 24.045056] __kasan_check_byte+0x3d/0x50 [ 24.045079] krealloc_noprof+0x3f/0x340 [ 24.045108] krealloc_uaf+0x1b8/0x5e0 [ 24.045128] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.045148] ? finish_task_switch.isra.0+0x153/0x700 [ 24.045171] ? __switch_to+0x47/0xf80 [ 24.045197] ? __schedule+0x10cc/0x2b60 [ 24.045220] ? __pfx_read_tsc+0x10/0x10 [ 24.045241] ? ktime_get_ts64+0x86/0x230 [ 24.045267] kunit_try_run_case+0x1a5/0x480 [ 24.045291] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.045310] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.045333] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.045356] ? __kthread_parkme+0x82/0x180 [ 24.045376] ? preempt_count_sub+0x50/0x80 [ 24.045398] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.045419] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.045443] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.045467] kthread+0x337/0x6f0 [ 24.045486] ? trace_preempt_on+0x20/0xc0 [ 24.045510] ? __pfx_kthread+0x10/0x10 [ 24.045530] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.045552] ? calculate_sigpending+0x7b/0xa0 [ 24.045578] ? __pfx_kthread+0x10/0x10 [ 24.045599] ret_from_fork+0x116/0x1d0 [ 24.045637] ? __pfx_kthread+0x10/0x10 [ 24.045657] ret_from_fork_asm+0x1a/0x30 [ 24.045688] </TASK> [ 24.045709] [ 24.054483] Allocated by task 214: [ 24.054615] kasan_save_stack+0x45/0x70 [ 24.054769] kasan_save_track+0x18/0x40 [ 24.054920] kasan_save_alloc_info+0x3b/0x50 [ 24.055213] __kasan_kmalloc+0xb7/0xc0 [ 24.055400] __kmalloc_cache_noprof+0x189/0x420 [ 24.055645] krealloc_uaf+0xbb/0x5e0 [ 24.055978] kunit_try_run_case+0x1a5/0x480 [ 24.056187] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.056436] kthread+0x337/0x6f0 [ 24.056597] ret_from_fork+0x116/0x1d0 [ 24.056843] ret_from_fork_asm+0x1a/0x30 [ 24.057106] [ 24.057202] Freed by task 214: [ 24.057370] kasan_save_stack+0x45/0x70 [ 24.057524] kasan_save_track+0x18/0x40 [ 24.057651] kasan_save_free_info+0x3f/0x60 [ 24.058058] __kasan_slab_free+0x56/0x70 [ 24.058274] kfree+0x222/0x3f0 [ 24.058435] krealloc_uaf+0x13d/0x5e0 [ 24.058612] kunit_try_run_case+0x1a5/0x480 [ 24.059042] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.059236] kthread+0x337/0x6f0 [ 24.059429] ret_from_fork+0x116/0x1d0 [ 24.059612] ret_from_fork_asm+0x1a/0x30 [ 24.059858] [ 24.060016] The buggy address belongs to the object at ffff888104e2ca00 [ 24.060016] which belongs to the cache kmalloc-256 of size 256 [ 24.060649] The buggy address is located 0 bytes inside of [ 24.060649] freed 256-byte region [ffff888104e2ca00, ffff888104e2cb00) [ 24.061228] [ 24.061302] The buggy address belongs to the physical page: [ 24.061466] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104e2c [ 24.061721] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 24.062239] flags: 0x200000000000040(head|node=0|zone=2) [ 24.062486] page_type: f5(slab) [ 24.062599] raw: 0200000000000040 ffff888100041b40 dead000000000100 dead000000000122 [ 24.062826] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.063055] head: 0200000000000040 ffff888100041b40 dead000000000100 dead000000000122 [ 24.063634] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.064349] head: 0200000000000001 ffffea0004138b01 00000000ffffffff 00000000ffffffff [ 24.064742] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 24.065088] page dumped because: kasan: bad access detected [ 24.065373] [ 24.065462] Memory state around the buggy address: [ 24.065703] ffff888104e2c900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.066128] ffff888104e2c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.066447] >ffff888104e2ca00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.066768] ^ [ 24.067038] ffff888104e2ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.067352] ffff888104e2cb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.067663] ================================================================== [ 24.068389] ================================================================== [ 24.068718] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0 [ 24.069006] Read of size 1 at addr ffff888104e2ca00 by task kunit_try_catch/214 [ 24.069222] [ 24.069310] CPU: 0 UID: 0 PID: 214 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 24.069355] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 24.069368] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.069388] Call Trace: [ 24.069404] <TASK> [ 24.069421] dump_stack_lvl+0x73/0xb0 [ 24.069448] print_report+0xd1/0x610 [ 24.069469] ? __virt_addr_valid+0x1db/0x2d0 [ 24.069492] ? krealloc_uaf+0x53c/0x5e0 [ 24.069511] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.069536] ? krealloc_uaf+0x53c/0x5e0 [ 24.069556] kasan_report+0x141/0x180 [ 24.069576] ? krealloc_uaf+0x53c/0x5e0 [ 24.069600] __asan_report_load1_noabort+0x18/0x20 [ 24.069623] krealloc_uaf+0x53c/0x5e0 [ 24.069643] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.069663] ? finish_task_switch.isra.0+0x153/0x700 [ 24.069684] ? __switch_to+0x47/0xf80 [ 24.069721] ? __schedule+0x10cc/0x2b60 [ 24.069743] ? __pfx_read_tsc+0x10/0x10 [ 24.069787] ? ktime_get_ts64+0x86/0x230 [ 24.069833] kunit_try_run_case+0x1a5/0x480 [ 24.069855] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.069875] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.069897] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.069920] ? __kthread_parkme+0x82/0x180 [ 24.069940] ? preempt_count_sub+0x50/0x80 [ 24.069962] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.069983] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.070007] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.070031] kthread+0x337/0x6f0 [ 24.070051] ? trace_preempt_on+0x20/0xc0 [ 24.070073] ? __pfx_kthread+0x10/0x10 [ 24.070093] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.070114] ? calculate_sigpending+0x7b/0xa0 [ 24.070138] ? __pfx_kthread+0x10/0x10 [ 24.070159] ret_from_fork+0x116/0x1d0 [ 24.070177] ? __pfx_kthread+0x10/0x10 [ 24.070197] ret_from_fork_asm+0x1a/0x30 [ 24.070228] </TASK> [ 24.070239] [ 24.078099] Allocated by task 214: [ 24.078232] kasan_save_stack+0x45/0x70 [ 24.078451] kasan_save_track+0x18/0x40 [ 24.078637] kasan_save_alloc_info+0x3b/0x50 [ 24.078846] __kasan_kmalloc+0xb7/0xc0 [ 24.079108] __kmalloc_cache_noprof+0x189/0x420 [ 24.079301] krealloc_uaf+0xbb/0x5e0 [ 24.079423] kunit_try_run_case+0x1a5/0x480 [ 24.079688] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.080161] kthread+0x337/0x6f0 [ 24.080292] ret_from_fork+0x116/0x1d0 [ 24.080533] ret_from_fork_asm+0x1a/0x30 [ 24.080767] [ 24.080857] Freed by task 214: [ 24.081008] kasan_save_stack+0x45/0x70 [ 24.081164] kasan_save_track+0x18/0x40 [ 24.081391] kasan_save_free_info+0x3f/0x60 [ 24.081629] __kasan_slab_free+0x56/0x70 [ 24.081802] kfree+0x222/0x3f0 [ 24.082066] krealloc_uaf+0x13d/0x5e0 [ 24.082252] kunit_try_run_case+0x1a5/0x480 [ 24.082404] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.082573] kthread+0x337/0x6f0 [ 24.082683] ret_from_fork+0x116/0x1d0 [ 24.082817] ret_from_fork_asm+0x1a/0x30 [ 24.082945] [ 24.083008] The buggy address belongs to the object at ffff888104e2ca00 [ 24.083008] which belongs to the cache kmalloc-256 of size 256 [ 24.083445] The buggy address is located 0 bytes inside of [ 24.083445] freed 256-byte region [ffff888104e2ca00, ffff888104e2cb00) [ 24.083992] [ 24.084085] The buggy address belongs to the physical page: [ 24.084341] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104e2c [ 24.084606] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 24.085112] flags: 0x200000000000040(head|node=0|zone=2) [ 24.085436] page_type: f5(slab) [ 24.085586] raw: 0200000000000040 ffff888100041b40 dead000000000100 dead000000000122 [ 24.085875] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.086406] head: 0200000000000040 ffff888100041b40 dead000000000100 dead000000000122 [ 24.086747] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.087083] head: 0200000000000001 ffffea0004138b01 00000000ffffffff 00000000ffffffff [ 24.087392] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 24.087673] page dumped because: kasan: bad access detected [ 24.088079] [ 24.088174] Memory state around the buggy address: [ 24.088377] ffff888104e2c900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.088660] ffff888104e2c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.089163] >ffff888104e2ca00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.089437] ^ [ 24.089546] ffff888104e2ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.089758] ffff888104e2cb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.089958] ==================================================================