Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.650992] ==================================================================
[   17.651370] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   17.651688] Read of size 1 at addr fff00000c5d30000 by task kunit_try_catch/150
[   17.651915] 
[   17.651952] CPU: 1 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   17.652093] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.652118] Hardware name: linux,dummy-virt (DT)
[   17.652154] Call trace:
[   17.652214]  show_stack+0x20/0x38 (C)
[   17.652262]  dump_stack_lvl+0x8c/0xd0
[   17.652308]  print_report+0x118/0x608
[   17.652360]  kasan_report+0xdc/0x128
[   17.652403]  __asan_report_load1_noabort+0x20/0x30
[   17.652450]  kmalloc_large_uaf+0x2cc/0x2f8
[   17.653275]  kunit_try_run_case+0x170/0x3f0
[   17.653676]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.653749]  kthread+0x328/0x630
[   17.653796]  ret_from_fork+0x10/0x20
[   17.653843] 
[   17.653977] The buggy address belongs to the physical page:
[   17.654014] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105d30
[   17.654231] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.654317] raw: 0bfffe0000000000 fff00000da4a1e00 fff00000da4a1e00 0000000000000000
[   17.654376] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   17.654534] page dumped because: kasan: bad access detected
[   17.654758] 
[   17.654780] Memory state around the buggy address:
[   17.654855]  fff00000c5d2ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.654897]  fff00000c5d2ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.654950] >fff00000c5d30000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.654985]                    ^
[   17.655012]  fff00000c5d30080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.655103]  fff00000c5d30100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.655222] ==================================================================

[   10.699351] ==================================================================
[   10.700259] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   10.700622] Read of size 1 at addr ffff888102d64000 by task kunit_try_catch/168
[   10.700983] 
[   10.701121] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   10.701167] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.701191] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.701221] Call Trace:
[   10.701234]  <TASK>
[   10.701250]  dump_stack_lvl+0x73/0xb0
[   10.701277]  print_report+0xd1/0x650
[   10.701315]  ? __virt_addr_valid+0x1db/0x2d0
[   10.701337]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.701359]  ? kasan_addr_to_slab+0x11/0xa0
[   10.701380]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.701402]  kasan_report+0x141/0x180
[   10.701425]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.701461]  __asan_report_load1_noabort+0x18/0x20
[   10.701482]  kmalloc_large_uaf+0x2f1/0x340
[   10.701504]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   10.701537]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   10.701559]  ? trace_hardirqs_on+0x37/0xe0
[   10.701583]  ? __pfx_read_tsc+0x10/0x10
[   10.701603]  ? ktime_get_ts64+0x86/0x230
[   10.701630]  kunit_try_run_case+0x1a5/0x480
[   10.701651]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.701680]  ? queued_spin_lock_slowpath+0x116/0xb40
[   10.701705]  ? __kthread_parkme+0x82/0x180
[   10.701728]  ? preempt_count_sub+0x50/0x80
[   10.701763]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.701784]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.701807]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.701830]  kthread+0x337/0x6f0
[   10.701863]  ? trace_preempt_on+0x20/0xc0
[   10.701895]  ? __pfx_kthread+0x10/0x10
[   10.701914]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.701936]  ? calculate_sigpending+0x7b/0xa0
[   10.701958]  ? __pfx_kthread+0x10/0x10
[   10.701977]  ret_from_fork+0x41/0x80
[   10.701997]  ? __pfx_kthread+0x10/0x10
[   10.702015]  ret_from_fork_asm+0x1a/0x30
[   10.702045]  </TASK>
[   10.702056] 
[   10.710127] The buggy address belongs to the physical page:
[   10.710368] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d64
[   10.710792] flags: 0x200000000000000(node=0|zone=2)
[   10.710984] raw: 0200000000000000 ffffea00040b5a08 ffff88815b139a80 0000000000000000
[   10.711389] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   10.711685] page dumped because: kasan: bad access detected
[   10.712093] 
[   10.712218] Memory state around the buggy address:
[   10.712486]  ffff888102d63f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.712827]  ffff888102d63f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.713116] >ffff888102d64000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.713371]                    ^
[   10.713587]  ffff888102d64080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.714164]  ffff888102d64100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.714385] ==================================================================