Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.854547] ==================================================================
[   21.855634] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   21.856273] Read of size 1 at addr fff00000c64a4000 by task kunit_try_catch/137
[   21.857087] 
[   21.858001] CPU: 1 UID: 0 PID: 137 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   21.858221] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.858297] Hardware name: linux,dummy-virt (DT)
[   21.858516] Call trace:
[   21.858569]  show_stack+0x20/0x38 (C)
[   21.858636]  dump_stack_lvl+0x8c/0xd0
[   21.858697]  print_report+0x118/0x608
[   21.858754]  kasan_report+0xdc/0x128
[   21.858809]  __asan_report_load1_noabort+0x20/0x30
[   21.858864]  kmalloc_large_uaf+0x2cc/0x2f8
[   21.858952]  kunit_try_run_case+0x170/0x3f0
[   21.859013]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.859076]  kthread+0x318/0x620
[   21.859129]  ret_from_fork+0x10/0x20
[   21.859186] 
[   21.865953] The buggy address belongs to the physical page:
[   21.866516] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064a4
[   21.867249] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.868185] raw: 0bfffe0000000000 ffffc1ffc3192a08 fff00000da4d3040 0000000000000000
[   21.869293] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   21.870073] page dumped because: kasan: bad access detected
[   21.870742] 
[   21.871136] Memory state around the buggy address:
[   21.871696]  fff00000c64a3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.872515]  fff00000c64a3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.873587] >fff00000c64a4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.874461]                    ^
[   21.874786]  fff00000c64a4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.875426]  fff00000c64a4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.876644] ==================================================================

[   16.731985] ==================================================================
[   16.733397] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f3/0x340
[   16.733858] Read of size 1 at addr ffff8881022ec000 by task kunit_try_catch/156
[   16.734619] 
[   16.734801] CPU: 1 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   16.734923] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.734952] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.734994] Call Trace:
[   16.735027]  <TASK>
[   16.735060]  dump_stack_lvl+0x73/0xb0
[   16.735136]  print_report+0xd1/0x650
[   16.735190]  ? __virt_addr_valid+0x1db/0x2d0
[   16.735243]  ? kmalloc_large_uaf+0x2f3/0x340
[   16.735294]  ? kasan_addr_to_slab+0x11/0xa0
[   16.735357]  ? kmalloc_large_uaf+0x2f3/0x340
[   16.735404]  kasan_report+0x140/0x180
[   16.735451]  ? kmalloc_large_uaf+0x2f3/0x340
[   16.735511]  __asan_report_load1_noabort+0x18/0x20
[   16.735569]  kmalloc_large_uaf+0x2f3/0x340
[   16.735618]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   16.735670]  ? __schedule+0xce8/0x2840
[   16.735734]  ? __pfx_read_tsc+0x10/0x10
[   16.735780]  ? ktime_get_ts64+0x86/0x230
[   16.735837]  kunit_try_run_case+0x1a6/0x480
[   16.735913]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.735967]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   16.736028]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.736088]  ? __kthread_parkme+0x82/0x160
[   16.736145]  ? preempt_count_sub+0x50/0x80
[   16.736201]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.736250]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.736305]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.736362]  kthread+0x324/0x6e0
[   16.736412]  ? trace_preempt_on+0x20/0xc0
[   16.736467]  ? __pfx_kthread+0x10/0x10
[   16.736515]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.736571]  ? calculate_sigpending+0x7b/0xa0
[   16.736618]  ? __pfx_kthread+0x10/0x10
[   16.736665]  ret_from_fork+0x41/0x80
[   16.736701]  ? __pfx_kthread+0x10/0x10
[   16.736731]  ret_from_fork_asm+0x1a/0x30
[   16.736771]  </TASK>
[   16.736787] 
[   16.752656] The buggy address belongs to the physical page:
[   16.753205] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1022ec
[   16.754099] flags: 0x200000000000000(node=0|zone=2)
[   16.754747] raw: 0200000000000000 ffff88815b13ef40 ffff88815b13ef40 0000000000000000
[   16.755320] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.755991] page dumped because: kasan: bad access detected
[   16.756355] 
[   16.756562] Memory state around the buggy address:
[   16.757025]  ffff8881022ebf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.757861]  ffff8881022ebf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.758355] >ffff8881022ec000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.759200]                    ^
[   16.759927]  ffff8881022ec080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.760498]  ffff8881022ec100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.760855] ==================================================================