Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.196596] ==================================================================
[   19.197272] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2d8/0x300
[   19.198063] Read of size 1 at addr fff00000c6b40000 by task kunit_try_catch/135
[   19.198725] 
[   19.199550] CPU: 1 UID: 0 PID: 135 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   19.199934] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.199969] Hardware name: linux,dummy-virt (DT)
[   19.200009] Call trace:
[   19.200035]  dump_backtrace+0x9c/0x128
[   19.200100]  show_stack+0x20/0x38
[   19.200140]  dump_stack_lvl+0x8c/0xd0
[   19.200185]  print_report+0x118/0x5f0
[   19.200227]  kasan_report+0xdc/0x128
[   19.200298]  __asan_report_load1_noabort+0x20/0x30
[   19.200345]  kmalloc_large_uaf+0x2d8/0x300
[   19.200391]  kunit_try_run_case+0x170/0x3f0
[   19.200435]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.200483]  kthread+0x24c/0x2d0
[   19.200525]  ret_from_fork+0x10/0x20
[   19.200572] 
[   19.205377] The buggy address belongs to the physical page:
[   19.205856] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106b40
[   19.206691] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.207987] raw: 0bfffe0000000000 fff00000da521200 fff00000da521200 0000000000000000
[   19.208620] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   19.209235] page dumped because: kasan: bad access detected
[   19.209747] 
[   19.210422] Memory state around the buggy address:
[   19.210774]  fff00000c6b3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.211662]  fff00000c6b3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.212457] >fff00000c6b40000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.213006]                    ^
[   19.213508]  fff00000c6b40080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.214264]  fff00000c6b40100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.214977] ==================================================================

[   11.499360] ==================================================================
[   11.499796] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f3/0x340
[   11.500545] Read of size 1 at addr ffff888102514000 by task kunit_try_catch/153
[   11.500794] 
[   11.501131] CPU: 1 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   11.501220] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.501243] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.501282] Call Trace:
[   11.501308]  <TASK>
[   11.501339]  dump_stack_lvl+0x73/0xb0
[   11.501390]  print_report+0xd1/0x640
[   11.501765]  ? __virt_addr_valid+0x1db/0x2d0
[   11.501811]  ? kmalloc_large_uaf+0x2f3/0x340
[   11.501848]  ? kasan_addr_to_slab+0x11/0xa0
[   11.501873]  ? kmalloc_large_uaf+0x2f3/0x340
[   11.501907]  kasan_report+0x140/0x180
[   11.501931]  ? kmalloc_large_uaf+0x2f3/0x340
[   11.501957]  __asan_report_load1_noabort+0x18/0x20
[   11.501977]  kmalloc_large_uaf+0x2f3/0x340
[   11.501998]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.502019]  ? __schedule+0xc49/0x27a0
[   11.502041]  ? __pfx_read_tsc+0x10/0x10
[   11.502085]  ? ktime_get_ts64+0x84/0x230
[   11.502155]  kunit_try_run_case+0x1a6/0x480
[   11.502190]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.502222]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   11.502247]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.502270]  ? __kthread_parkme+0x82/0x160
[   11.502290]  ? preempt_count_sub+0x50/0x80
[   11.502312]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.502331]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.502356]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.502380]  kthread+0x257/0x310
[   11.502397]  ? __pfx_kthread+0x10/0x10
[   11.502416]  ret_from_fork+0x41/0x80
[   11.502434]  ? __pfx_kthread+0x10/0x10
[   11.502452]  ret_from_fork_asm+0x1a/0x30
[   11.502481]  </TASK>
[   11.502494] 
[   11.511193] The buggy address belongs to the physical page:
[   11.511452] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102514
[   11.511993] flags: 0x200000000000000(node=0|zone=2)
[   11.512752] raw: 0200000000000000 ffffea0004094608 ffff88815b13f000 0000000000000000
[   11.513418] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.513727] page dumped because: kasan: bad access detected
[   11.514320] 
[   11.514515] Memory state around the buggy address:
[   11.514768]  ffff888102513f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.515034]  ffff888102513f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.515689] >ffff888102514000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.516527]                    ^
[   11.516820]  ffff888102514080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.517423]  ffff888102514100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.517867] ==================================================================