Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.342266] ================================================================== [ 15.342373] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 15.342426] Read of size 1 at addr fff00000c0b93a00 by task kunit_try_catch/164 [ 15.342647] [ 15.342696] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 15.343163] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.343457] Hardware name: linux,dummy-virt (DT) [ 15.343652] Call trace: [ 15.343720] show_stack+0x20/0x38 (C) [ 15.343907] dump_stack_lvl+0x8c/0xd0 [ 15.343960] print_report+0x118/0x5d0 [ 15.344344] kasan_report+0xdc/0x128 [ 15.344406] __asan_report_load1_noabort+0x20/0x30 [ 15.345040] krealloc_uaf+0x4c8/0x520 [ 15.345131] kunit_try_run_case+0x170/0x3f0 [ 15.345321] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.345669] kthread+0x328/0x630 [ 15.345872] ret_from_fork+0x10/0x20 [ 15.346154] [ 15.346382] Allocated by task 164: [ 15.346463] kasan_save_stack+0x3c/0x68 [ 15.346555] kasan_save_track+0x20/0x40 [ 15.346716] kasan_save_alloc_info+0x40/0x58 [ 15.346879] __kasan_kmalloc+0xd4/0xd8 [ 15.346940] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.346979] krealloc_uaf+0xc8/0x520 [ 15.347201] kunit_try_run_case+0x170/0x3f0 [ 15.347371] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.347463] kthread+0x328/0x630 [ 15.347583] ret_from_fork+0x10/0x20 [ 15.347745] [ 15.347872] Freed by task 164: [ 15.347971] kasan_save_stack+0x3c/0x68 [ 15.348242] kasan_save_track+0x20/0x40 [ 15.348365] kasan_save_free_info+0x4c/0x78 [ 15.348648] __kasan_slab_free+0x6c/0x98 [ 15.348796] kfree+0x214/0x3c8 [ 15.349122] krealloc_uaf+0x12c/0x520 [ 15.349668] kunit_try_run_case+0x170/0x3f0 [ 15.349785] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.349942] kthread+0x328/0x630 [ 15.350088] ret_from_fork+0x10/0x20 [ 15.350236] [ 15.350286] The buggy address belongs to the object at fff00000c0b93a00 [ 15.350286] which belongs to the cache kmalloc-256 of size 256 [ 15.350702] The buggy address is located 0 bytes inside of [ 15.350702] freed 256-byte region [fff00000c0b93a00, fff00000c0b93b00) [ 15.350923] [ 15.350982] The buggy address belongs to the physical page: [ 15.351066] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100b92 [ 15.351138] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 15.351193] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 15.351434] page_type: f5(slab) [ 15.351701] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 15.351776] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.351915] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 15.352015] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.352168] head: 0bfffe0000000001 ffffc1ffc302e481 00000000ffffffff 00000000ffffffff [ 15.352296] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 15.352349] page dumped because: kasan: bad access detected [ 15.352696] [ 15.352758] Memory state around the buggy address: [ 15.352960] fff00000c0b93900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.353146] fff00000c0b93980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.353209] >fff00000c0b93a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.353254] ^ [ 15.353318] fff00000c0b93a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.353389] fff00000c0b93b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.353436] ================================================================== [ 15.330559] ================================================================== [ 15.330632] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 15.330683] Read of size 1 at addr fff00000c0b93a00 by task kunit_try_catch/164 [ 15.331134] [ 15.331206] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 15.331476] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.331671] Hardware name: linux,dummy-virt (DT) [ 15.331775] Call trace: [ 15.331912] show_stack+0x20/0x38 (C) [ 15.332081] dump_stack_lvl+0x8c/0xd0 [ 15.332173] print_report+0x118/0x5d0 [ 15.332383] kasan_report+0xdc/0x128 [ 15.332658] __kasan_check_byte+0x54/0x70 [ 15.332737] krealloc_noprof+0x44/0x360 [ 15.332934] krealloc_uaf+0x180/0x520 [ 15.333004] kunit_try_run_case+0x170/0x3f0 [ 15.333256] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.333413] kthread+0x328/0x630 [ 15.333736] ret_from_fork+0x10/0x20 [ 15.334036] [ 15.334093] Allocated by task 164: [ 15.334246] kasan_save_stack+0x3c/0x68 [ 15.334380] kasan_save_track+0x20/0x40 [ 15.334422] kasan_save_alloc_info+0x40/0x58 [ 15.335020] __kasan_kmalloc+0xd4/0xd8 [ 15.335353] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.335405] krealloc_uaf+0xc8/0x520 [ 15.335858] kunit_try_run_case+0x170/0x3f0 [ 15.336273] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.336474] kthread+0x328/0x630 [ 15.336760] ret_from_fork+0x10/0x20 [ 15.336882] [ 15.337059] Freed by task 164: [ 15.337170] kasan_save_stack+0x3c/0x68 [ 15.337376] kasan_save_track+0x20/0x40 [ 15.337522] kasan_save_free_info+0x4c/0x78 [ 15.337914] __kasan_slab_free+0x6c/0x98 [ 15.337987] kfree+0x214/0x3c8 [ 15.338106] krealloc_uaf+0x12c/0x520 [ 15.338177] kunit_try_run_case+0x170/0x3f0 [ 15.338346] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.338483] kthread+0x328/0x630 [ 15.338661] ret_from_fork+0x10/0x20 [ 15.338752] [ 15.338773] The buggy address belongs to the object at fff00000c0b93a00 [ 15.338773] which belongs to the cache kmalloc-256 of size 256 [ 15.339112] The buggy address is located 0 bytes inside of [ 15.339112] freed 256-byte region [fff00000c0b93a00, fff00000c0b93b00) [ 15.339394] [ 15.339418] The buggy address belongs to the physical page: [ 15.339617] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100b92 [ 15.339735] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 15.339908] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 15.339965] page_type: f5(slab) [ 15.340037] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 15.340089] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.340141] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 15.340221] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.340273] head: 0bfffe0000000001 ffffc1ffc302e481 00000000ffffffff 00000000ffffffff [ 15.340322] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 15.340369] page dumped because: kasan: bad access detected [ 15.340400] [ 15.340418] Memory state around the buggy address: [ 15.340457] fff00000c0b93900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.340500] fff00000c0b93980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.340552] >fff00000c0b93a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.340590] ^ [ 15.340617] fff00000c0b93a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.340659] fff00000c0b93b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.340697] ==================================================================
[ 12.568257] ================================================================== [ 12.568903] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0 [ 12.569374] Read of size 1 at addr ffff888100355c00 by task kunit_try_catch/181 [ 12.569665] [ 12.569775] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 12.569831] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.569843] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.569864] Call Trace: [ 12.569877] <TASK> [ 12.569891] dump_stack_lvl+0x73/0xb0 [ 12.569921] print_report+0xd1/0x610 [ 12.569943] ? __virt_addr_valid+0x1db/0x2d0 [ 12.569966] ? krealloc_uaf+0x1b8/0x5e0 [ 12.569986] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.570008] ? krealloc_uaf+0x1b8/0x5e0 [ 12.570029] kasan_report+0x141/0x180 [ 12.570050] ? krealloc_uaf+0x1b8/0x5e0 [ 12.570074] ? krealloc_uaf+0x1b8/0x5e0 [ 12.570095] __kasan_check_byte+0x3d/0x50 [ 12.570116] krealloc_noprof+0x3f/0x340 [ 12.570139] krealloc_uaf+0x1b8/0x5e0 [ 12.570160] ? __pfx_krealloc_uaf+0x10/0x10 [ 12.570180] ? finish_task_switch.isra.0+0x153/0x700 [ 12.570202] ? __switch_to+0x47/0xf50 [ 12.570228] ? __schedule+0x10c6/0x2b60 [ 12.570250] ? __pfx_read_tsc+0x10/0x10 [ 12.570270] ? ktime_get_ts64+0x86/0x230 [ 12.570295] kunit_try_run_case+0x1a5/0x480 [ 12.570332] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.570354] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.570377] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.570400] ? __kthread_parkme+0x82/0x180 [ 12.570419] ? preempt_count_sub+0x50/0x80 [ 12.570441] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.570464] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.570486] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.570509] kthread+0x337/0x6f0 [ 12.570527] ? trace_preempt_on+0x20/0xc0 [ 12.570550] ? __pfx_kthread+0x10/0x10 [ 12.570570] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.570591] ? calculate_sigpending+0x7b/0xa0 [ 12.570614] ? __pfx_kthread+0x10/0x10 [ 12.570634] ret_from_fork+0x116/0x1d0 [ 12.570653] ? __pfx_kthread+0x10/0x10 [ 12.570673] ret_from_fork_asm+0x1a/0x30 [ 12.570703] </TASK> [ 12.570713] [ 12.577912] Allocated by task 181: [ 12.578072] kasan_save_stack+0x45/0x70 [ 12.578288] kasan_save_track+0x18/0x40 [ 12.578460] kasan_save_alloc_info+0x3b/0x50 [ 12.578671] __kasan_kmalloc+0xb7/0xc0 [ 12.578840] __kmalloc_cache_noprof+0x189/0x420 [ 12.579070] krealloc_uaf+0xbb/0x5e0 [ 12.579241] kunit_try_run_case+0x1a5/0x480 [ 12.579391] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.579569] kthread+0x337/0x6f0 [ 12.579739] ret_from_fork+0x116/0x1d0 [ 12.579941] ret_from_fork_asm+0x1a/0x30 [ 12.580192] [ 12.580311] Freed by task 181: [ 12.580484] kasan_save_stack+0x45/0x70 [ 12.580687] kasan_save_track+0x18/0x40 [ 12.580898] kasan_save_free_info+0x3f/0x60 [ 12.581061] __kasan_slab_free+0x56/0x70 [ 12.581270] kfree+0x222/0x3f0 [ 12.581417] krealloc_uaf+0x13d/0x5e0 [ 12.581584] kunit_try_run_case+0x1a5/0x480 [ 12.581773] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.582007] kthread+0x337/0x6f0 [ 12.582195] ret_from_fork+0x116/0x1d0 [ 12.582351] ret_from_fork_asm+0x1a/0x30 [ 12.582531] [ 12.582631] The buggy address belongs to the object at ffff888100355c00 [ 12.582631] which belongs to the cache kmalloc-256 of size 256 [ 12.583217] The buggy address is located 0 bytes inside of [ 12.583217] freed 256-byte region [ffff888100355c00, ffff888100355d00) [ 12.583654] [ 12.583753] The buggy address belongs to the physical page: [ 12.584003] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100354 [ 12.584316] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 12.584626] flags: 0x200000000000040(head|node=0|zone=2) [ 12.584837] page_type: f5(slab) [ 12.585018] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.585364] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.585665] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.585983] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.586278] head: 0200000000000001 ffffea000400d501 00000000ffffffff 00000000ffffffff [ 12.586515] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 12.586746] page dumped because: kasan: bad access detected [ 12.586991] [ 12.587092] Memory state around the buggy address: [ 12.587326] ffff888100355b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.587655] ffff888100355b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.587885] >ffff888100355c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.588102] ^ [ 12.588220] ffff888100355c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.588856] ffff888100355d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.589283] ================================================================== [ 12.590078] ================================================================== [ 12.590379] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0 [ 12.591182] Read of size 1 at addr ffff888100355c00 by task kunit_try_catch/181 [ 12.591426] [ 12.591513] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 12.591556] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.591568] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.591588] Call Trace: [ 12.591599] <TASK> [ 12.591612] dump_stack_lvl+0x73/0xb0 [ 12.591641] print_report+0xd1/0x610 [ 12.591662] ? __virt_addr_valid+0x1db/0x2d0 [ 12.591683] ? krealloc_uaf+0x53c/0x5e0 [ 12.591703] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.591724] ? krealloc_uaf+0x53c/0x5e0 [ 12.591745] kasan_report+0x141/0x180 [ 12.591766] ? krealloc_uaf+0x53c/0x5e0 [ 12.591791] __asan_report_load1_noabort+0x18/0x20 [ 12.591830] krealloc_uaf+0x53c/0x5e0 [ 12.591851] ? __pfx_krealloc_uaf+0x10/0x10 [ 12.591871] ? finish_task_switch.isra.0+0x153/0x700 [ 12.591893] ? __switch_to+0x47/0xf50 [ 12.591917] ? __schedule+0x10c6/0x2b60 [ 12.591938] ? __pfx_read_tsc+0x10/0x10 [ 12.591958] ? ktime_get_ts64+0x86/0x230 [ 12.591980] kunit_try_run_case+0x1a5/0x480 [ 12.592003] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.592025] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.592057] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.592080] ? __kthread_parkme+0x82/0x180 [ 12.592099] ? preempt_count_sub+0x50/0x80 [ 12.592121] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.592144] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.592166] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.592189] kthread+0x337/0x6f0 [ 12.592208] ? trace_preempt_on+0x20/0xc0 [ 12.592230] ? __pfx_kthread+0x10/0x10 [ 12.592250] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.592271] ? calculate_sigpending+0x7b/0xa0 [ 12.592293] ? __pfx_kthread+0x10/0x10 [ 12.592314] ret_from_fork+0x116/0x1d0 [ 12.592331] ? __pfx_kthread+0x10/0x10 [ 12.592351] ret_from_fork_asm+0x1a/0x30 [ 12.592380] </TASK> [ 12.592391] [ 12.604255] Allocated by task 181: [ 12.604438] kasan_save_stack+0x45/0x70 [ 12.604632] kasan_save_track+0x18/0x40 [ 12.604808] kasan_save_alloc_info+0x3b/0x50 [ 12.604974] __kasan_kmalloc+0xb7/0xc0 [ 12.605168] __kmalloc_cache_noprof+0x189/0x420 [ 12.605364] krealloc_uaf+0xbb/0x5e0 [ 12.605568] kunit_try_run_case+0x1a5/0x480 [ 12.605758] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.605954] kthread+0x337/0x6f0 [ 12.606097] ret_from_fork+0x116/0x1d0 [ 12.606285] ret_from_fork_asm+0x1a/0x30 [ 12.606497] [ 12.606594] Freed by task 181: [ 12.606742] kasan_save_stack+0x45/0x70 [ 12.606892] kasan_save_track+0x18/0x40 [ 12.607073] kasan_save_free_info+0x3f/0x60 [ 12.607298] __kasan_slab_free+0x56/0x70 [ 12.607499] kfree+0x222/0x3f0 [ 12.607636] krealloc_uaf+0x13d/0x5e0 [ 12.607827] kunit_try_run_case+0x1a5/0x480 [ 12.608017] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.608282] kthread+0x337/0x6f0 [ 12.608415] ret_from_fork+0x116/0x1d0 [ 12.608551] ret_from_fork_asm+0x1a/0x30 [ 12.608692] [ 12.608765] The buggy address belongs to the object at ffff888100355c00 [ 12.608765] which belongs to the cache kmalloc-256 of size 256 [ 12.609399] The buggy address is located 0 bytes inside of [ 12.609399] freed 256-byte region [ffff888100355c00, ffff888100355d00) [ 12.609837] [ 12.609910] The buggy address belongs to the physical page: [ 12.610242] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100354 [ 12.610607] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 12.610929] flags: 0x200000000000040(head|node=0|zone=2) [ 12.611175] page_type: f5(slab) [ 12.611311] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.611616] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.611958] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.612265] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.612603] head: 0200000000000001 ffffea000400d501 00000000ffffffff 00000000ffffffff [ 12.612918] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 12.613255] page dumped because: kasan: bad access detected [ 12.613504] [ 12.613598] Memory state around the buggy address: [ 12.613765] ffff888100355b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.614030] ffff888100355b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.614341] >ffff888100355c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.614556] ^ [ 12.614730] ffff888100355c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.615060] ffff888100355d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.615382] ==================================================================