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

Environment
qemu-arm64
qemu-x86_64

[   16.491027] ==================================================================
[   16.491547] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.491664] Read of size 1 at addr fff00000c6654000 by task kunit_try_catch/148
[   16.491714] 
[   16.491747] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.492030] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.492076] Hardware name: linux,dummy-virt (DT)
[   16.492106] Call trace:
[   16.492133]  show_stack+0x20/0x38 (C)
[   16.492437]  dump_stack_lvl+0x8c/0xd0
[   16.492584]  print_report+0x118/0x5d0
[   16.492862]  kasan_report+0xdc/0x128
[   16.492911]  __asan_report_load1_noabort+0x20/0x30
[   16.493329]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.493376]  kunit_try_run_case+0x170/0x3f0
[   16.493421]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.493472]  kthread+0x328/0x630
[   16.493518]  ret_from_fork+0x10/0x20
[   16.494195] 
[   16.494238] The buggy address belongs to the physical page:
[   16.494270] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106654
[   16.494339] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.494667] raw: 0bfffe0000000000 ffffc1ffc3199608 fff00000da478c40 0000000000000000
[   16.494728] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.494997] page dumped because: kasan: bad access detected
[   16.495032] 
[   16.495050] Memory state around the buggy address:
[   16.495548]  fff00000c6653f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.495668]  fff00000c6653f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.495787] >fff00000c6654000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.495825]                    ^
[   16.495853]  fff00000c6654080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.496283]  fff00000c6654100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.496334] ==================================================================

[   12.440097] ==================================================================
[   12.440898] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   12.441720] Read of size 1 at addr ffff88810272c000 by task kunit_try_catch/165
[   12.442431] 
[   12.442569] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.442614] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.442625] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.442646] Call Trace:
[   12.442657]  <TASK>
[   12.442673]  dump_stack_lvl+0x73/0xb0
[   12.442713]  print_report+0xd1/0x610
[   12.442739]  ? __virt_addr_valid+0x1db/0x2d0
[   12.442764]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.442784]  ? kasan_addr_to_slab+0x11/0xa0
[   12.442804]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.442825]  kasan_report+0x141/0x180
[   12.442847]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.442872]  __asan_report_load1_noabort+0x18/0x20
[   12.442896]  kmalloc_large_uaf+0x2f1/0x340
[   12.442917]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   12.442939]  ? __schedule+0x10cc/0x2b60
[   12.442960]  ? __pfx_read_tsc+0x10/0x10
[   12.443062]  ? ktime_get_ts64+0x86/0x230
[   12.443087]  kunit_try_run_case+0x1a5/0x480
[   12.443113]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.443136]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.443159]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.443183]  ? __kthread_parkme+0x82/0x180
[   12.443204]  ? preempt_count_sub+0x50/0x80
[   12.443228]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.443252]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.443287]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.443312]  kthread+0x337/0x6f0
[   12.443331]  ? trace_preempt_on+0x20/0xc0
[   12.443354]  ? __pfx_kthread+0x10/0x10
[   12.443375]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.443396]  ? calculate_sigpending+0x7b/0xa0
[   12.443421]  ? __pfx_kthread+0x10/0x10
[   12.443442]  ret_from_fork+0x116/0x1d0
[   12.443459]  ? __pfx_kthread+0x10/0x10
[   12.443480]  ret_from_fork_asm+0x1a/0x30
[   12.443510]  </TASK>
[   12.443520] 
[   12.452911] The buggy address belongs to the physical page:
[   12.453220] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10272c
[   12.453474] flags: 0x200000000000000(node=0|zone=2)
[   12.453706] raw: 0200000000000000 ffff88815b039f80 ffff88815b039f80 0000000000000000
[   12.454052] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   12.454405] page dumped because: kasan: bad access detected
[   12.454627] 
[   12.454694] Memory state around the buggy address:
[   12.454854]  ffff88810272bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.455150]  ffff88810272bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.455540] >ffff88810272c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.455800]                    ^
[   12.455918]  ffff88810272c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.456478]  ffff88810272c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.456941] ==================================================================