Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.092858] ==================================================================
[   30.092991] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   30.093045] Read of size 1 at addr fff00000c9ae4000 by task kunit_try_catch/179
[   30.093092] 
[   30.093171] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.093286] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   30.093502] Hardware name: linux,dummy-virt (DT)
[   30.093535] Call trace:
[   30.093602]  show_stack+0x20/0x38 (C)
[   30.093727]  dump_stack_lvl+0x8c/0xd0
[   30.093856]  print_report+0x118/0x5e8
[   30.093954]  kasan_report+0xdc/0x128
[   30.094099]  __asan_report_load1_noabort+0x20/0x30
[   30.094211]  kmalloc_large_uaf+0x2cc/0x2f8
[   30.094320]  kunit_try_run_case+0x170/0x3f0
[   30.094431]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.094500]  kthread+0x328/0x630
[   30.094541]  ret_from_fork+0x10/0x20
[   30.094955] 
[   30.095032] The buggy address belongs to the physical page:
[   30.095131] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109ae4
[   30.095270] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.095455] raw: 0bfffe0000000000 ffffc1ffc326ba08 fff00000da472d00 0000000000000000
[   30.095568] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   30.095647] page dumped because: kasan: bad access detected
[   30.095727] 
[   30.095745] Memory state around the buggy address:
[   30.095775]  fff00000c9ae3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.096169]  fff00000c9ae3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.096268] >fff00000c9ae4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.096369]                    ^
[   30.096397]  fff00000c9ae4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.096437]  fff00000c9ae4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.096882] ==================================================================

[   24.658371] ==================================================================
[   24.659049] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   24.659583] Read of size 1 at addr ffff888104ab8000 by task kunit_try_catch/196
[   24.660685] 
[   24.660819] CPU: 1 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   24.660885] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.660898] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.660919] Call Trace:
[   24.660931]  <TASK>
[   24.660946]  dump_stack_lvl+0x73/0xb0
[   24.660977]  print_report+0xd1/0x640
[   24.661001]  ? __virt_addr_valid+0x1db/0x2d0
[   24.661023]  ? kmalloc_large_uaf+0x2f1/0x340
[   24.661043]  ? kasan_addr_to_slab+0x11/0xa0
[   24.661064]  ? kmalloc_large_uaf+0x2f1/0x340
[   24.661085]  kasan_report+0x141/0x180
[   24.661108]  ? kmalloc_large_uaf+0x2f1/0x340
[   24.661133]  __asan_report_load1_noabort+0x18/0x20
[   24.661158]  kmalloc_large_uaf+0x2f1/0x340
[   24.661316]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   24.661341]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   24.661371]  ? __pfx_read_tsc+0x10/0x10
[   24.661393]  ? ktime_get_ts64+0x86/0x230
[   24.661418]  kunit_try_run_case+0x1a5/0x480
[   24.661530]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.661554]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   24.661578]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.661604]  ? __kthread_parkme+0x82/0x180
[   24.661624]  ? preempt_count_sub+0x50/0x80
[   24.661646]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.661670]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.661696]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.661719]  kthread+0x337/0x6f0
[   24.661739]  ? trace_preempt_on+0x20/0xc0
[   24.661762]  ? __pfx_kthread+0x10/0x10
[   24.661782]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.661805]  ? calculate_sigpending+0x7b/0xa0
[   24.661840]  ? __pfx_kthread+0x10/0x10
[   24.661862]  ret_from_fork+0x116/0x1d0
[   24.661882]  ? __pfx_kthread+0x10/0x10
[   24.661902]  ret_from_fork_asm+0x1a/0x30
[   24.661933]  </TASK>
[   24.661944] 
[   24.671178] The buggy address belongs to the physical page:
[   24.671367] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104ab8
[   24.671727] flags: 0x200000000000000(node=0|zone=2)
[   24.672094] raw: 0200000000000000 ffffea000412af08 ffff88815b139fc0 0000000000000000
[   24.672720] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   24.672965] page dumped because: kasan: bad access detected
[   24.673532] 
[   24.673640] Memory state around the buggy address:
[   24.673893]  ffff888104ab7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.674238]  ffff888104ab7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.674578] >ffff888104ab8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.674859]                    ^
[   24.675024]  ffff888104ab8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.675333]  ffff888104ab8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.675680] ==================================================================