Hay
Date
June 24, 2025, 12:47 p.m.

Environment
qemu-arm64
qemu-x86_64

[   23.335955] ==================================================================
[   23.336289] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   23.336519] Read of size 1 at addr fff00000c77dc000 by task kunit_try_catch/150
[   23.336658] 
[   23.336740] CPU: 0 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   23.337171] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.337240] Hardware name: linux,dummy-virt (DT)
[   23.337368] Call trace:
[   23.337715]  show_stack+0x20/0x38 (C)
[   23.337845]  dump_stack_lvl+0x8c/0xd0
[   23.337966]  print_report+0x118/0x608
[   23.338094]  kasan_report+0xdc/0x128
[   23.338365]  __asan_report_load1_noabort+0x20/0x30
[   23.338702]  kmalloc_large_uaf+0x2cc/0x2f8
[   23.338824]  kunit_try_run_case+0x170/0x3f0
[   23.338948]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.339149]  kthread+0x328/0x630
[   23.339268]  ret_from_fork+0x10/0x20
[   23.339465] 
[   23.339610] The buggy address belongs to the physical page:
[   23.339693] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077dc
[   23.339884] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.340043] raw: 0bfffe0000000000 ffffc1ffc31df808 fff00000da47ee00 0000000000000000
[   23.340203] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   23.340313] page dumped because: kasan: bad access detected
[   23.340850] 
[   23.340916] Memory state around the buggy address:
[   23.341207]  fff00000c77dbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.341322]  fff00000c77dbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.341520] >fff00000c77dc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.341949]                    ^
[   23.342030]  fff00000c77dc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.342136]  fff00000c77dc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.342230] ==================================================================

[   11.108150] ==================================================================
[   11.108860] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.109150] Read of size 1 at addr ffff888102858000 by task kunit_try_catch/168
[   11.109671] 
[   11.109877] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   11.109984] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.110010] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.110053] Call Trace:
[   11.110082]  <TASK>
[   11.110123]  dump_stack_lvl+0x73/0xb0
[   11.110186]  print_report+0xd1/0x650
[   11.110227]  ? __virt_addr_valid+0x1db/0x2d0
[   11.110275]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.110318]  ? kasan_addr_to_slab+0x11/0xa0
[   11.110480]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.110520]  kasan_report+0x141/0x180
[   11.110586]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.110648]  __asan_report_load1_noabort+0x18/0x20
[   11.110693]  kmalloc_large_uaf+0x2f1/0x340
[   11.110737]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.110784]  ? __schedule+0x10cc/0x2b60
[   11.110834]  ? __pfx_read_tsc+0x10/0x10
[   11.110876]  ? ktime_get_ts64+0x86/0x230
[   11.110932]  kunit_try_run_case+0x1a5/0x480
[   11.110975]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.111009]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.111048]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.111089]  ? __kthread_parkme+0x82/0x180
[   11.111128]  ? preempt_count_sub+0x50/0x80
[   11.111170]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.111211]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.111256]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.111325]  kthread+0x337/0x6f0
[   11.111371]  ? trace_preempt_on+0x20/0xc0
[   11.111519]  ? __pfx_kthread+0x10/0x10
[   11.111589]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.111635]  ? calculate_sigpending+0x7b/0xa0
[   11.111669]  ? __pfx_kthread+0x10/0x10
[   11.111693]  ret_from_fork+0x41/0x80
[   11.111720]  ? __pfx_kthread+0x10/0x10
[   11.111743]  ret_from_fork_asm+0x1a/0x30
[   11.111782]  </TASK>
[   11.111796] 
[   11.122455] The buggy address belongs to the physical page:
[   11.122929] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102858
[   11.123232] flags: 0x200000000000000(node=0|zone=2)
[   11.123642] raw: 0200000000000000 ffffea00040a1708 ffff88815b139a80 0000000000000000
[   11.124164] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.124872] page dumped because: kasan: bad access detected
[   11.125237] 
[   11.125749] Memory state around the buggy address:
[   11.126068]  ffff888102857f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.126460]  ffff888102857f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.127012] >ffff888102858000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.127611]                    ^
[   11.127920]  ffff888102858080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.128243]  ffff888102858100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.128666] ==================================================================