Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.038353] ==================================================================
[   15.038451] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   15.038669] Read of size 1 at addr fff00000c60f0000 by task kunit_try_catch/148
[   15.038729] 
[   15.038758] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.038849] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.038875] Hardware name: linux,dummy-virt (DT)
[   15.038904] Call trace:
[   15.038926]  show_stack+0x20/0x38 (C)
[   15.039029]  dump_stack_lvl+0x8c/0xd0
[   15.039127]  print_report+0x118/0x5d0
[   15.039286]  kasan_report+0xdc/0x128
[   15.039425]  __asan_report_load1_noabort+0x20/0x30
[   15.039475]  kmalloc_large_uaf+0x2cc/0x2f8
[   15.039519]  kunit_try_run_case+0x170/0x3f0
[   15.039602]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.039671]  kthread+0x328/0x630
[   15.039830]  ret_from_fork+0x10/0x20
[   15.039894] 
[   15.039974] The buggy address belongs to the physical page:
[   15.040025] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060f0
[   15.040076] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.040184] raw: 0bfffe0000000000 ffffc1ffc3183d08 fff00000da478c40 0000000000000000
[   15.040245] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   15.040347] page dumped because: kasan: bad access detected
[   15.040377] 
[   15.040395] Memory state around the buggy address:
[   15.040426]  fff00000c60eff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.040466]  fff00000c60eff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.040507] >fff00000c60f0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.040543]                    ^
[   15.040586]  fff00000c60f0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.040774]  fff00000c60f0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.040850] ==================================================================

[   11.523298] ==================================================================
[   11.524909] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.526263] Read of size 1 at addr ffff888102944000 by task kunit_try_catch/165
[   11.527357] 
[   11.527771] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.527858] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.527870] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.527890] Call Trace:
[   11.527902]  <TASK>
[   11.527917]  dump_stack_lvl+0x73/0xb0
[   11.527947]  print_report+0xd1/0x610
[   11.527968]  ? __virt_addr_valid+0x1db/0x2d0
[   11.527989]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.528018]  ? kasan_addr_to_slab+0x11/0xa0
[   11.528038]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.528058]  kasan_report+0x141/0x180
[   11.528078]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.528102]  __asan_report_load1_noabort+0x18/0x20
[   11.528125]  kmalloc_large_uaf+0x2f1/0x340
[   11.528144]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.528165]  ? __schedule+0x207f/0x2b60
[   11.528186]  ? __pfx_read_tsc+0x10/0x10
[   11.528208]  ? ktime_get_ts64+0x86/0x230
[   11.528233]  kunit_try_run_case+0x1a5/0x480
[   11.528257]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.528279]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.528302]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.528324]  ? __kthread_parkme+0x82/0x180
[   11.528344]  ? preempt_count_sub+0x50/0x80
[   11.528365]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.528388]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.528409]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.528455]  kthread+0x337/0x6f0
[   11.528473]  ? trace_preempt_on+0x20/0xc0
[   11.528495]  ? __pfx_kthread+0x10/0x10
[   11.528515]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.528534]  ? calculate_sigpending+0x7b/0xa0
[   11.528558]  ? __pfx_kthread+0x10/0x10
[   11.528578]  ret_from_fork+0x116/0x1d0
[   11.528595]  ? __pfx_kthread+0x10/0x10
[   11.528614]  ret_from_fork_asm+0x1a/0x30
[   11.528643]  </TASK>
[   11.528653] 
[   11.541538] The buggy address belongs to the physical page:
[   11.542122] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102944
[   11.542738] flags: 0x200000000000000(node=0|zone=2)
[   11.542921] raw: 0200000000000000 ffffea00040a5208 ffff88815b039f80 0000000000000000
[   11.543166] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.543409] page dumped because: kasan: bad access detected
[   11.543615] 
[   11.543710] Memory state around the buggy address:
[   11.543932]  ffff888102943f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.544216]  ffff888102943f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.544620] >ffff888102944000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.544974]                    ^
[   11.545130]  ffff888102944080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.545477]  ffff888102944100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.545924] ==================================================================