Hay
Date
Nov. 22, 2024, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.362683] ==================================================================
[   32.364186] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x278/0x2b8
[   32.365679] Write of size 1 at addr fff00000c699600a by task kunit_try_catch/135
[   32.367217] 
[   32.368068] CPU: 0 UID: 0 PID: 135 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   32.370384] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.371274] Hardware name: linux,dummy-virt (DT)
[   32.371915] Call trace:
[   32.372303]  show_stack+0x20/0x38 (C)
[   32.373325]  dump_stack_lvl+0x8c/0xd0
[   32.373985]  print_report+0x118/0x5e0
[   32.374555]  kasan_report+0xc8/0x118
[   32.375103]  __asan_report_store1_noabort+0x20/0x30
[   32.375921]  kmalloc_large_oob_right+0x278/0x2b8
[   32.376578]  kunit_try_run_case+0x14c/0x3d0
[   32.377653]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.378534]  kthread+0x24c/0x2d0
[   32.379188]  ret_from_fork+0x10/0x20
[   32.379851] 
[   32.380239] The buggy address belongs to the physical page:
[   32.381045] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106994
[   32.382152] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   32.383400] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   32.384199] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   32.385650] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   32.386788] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   32.388853] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   32.389977] head: 0bfffe0000000002 ffffc1ffc31a6501 ffffffffffffffff 0000000000000000
[   32.391103] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   32.391996] page dumped because: kasan: bad access detected
[   32.393299] 
[   32.393693] Memory state around the buggy address:
[   32.394071]  fff00000c6995f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.394570]  fff00000c6995f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.395668] >fff00000c6996000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   32.396805]                       ^
[   32.397321]  fff00000c6996080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   32.398563]  fff00000c6996100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   32.399818] ==================================================================

[   24.021494] ==================================================================
[   24.022372] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x2eb/0x340
[   24.023256] Write of size 1 at addr ffff8881023b200a by task kunit_try_catch/154
[   24.024897] 
[   24.025499] CPU: 1 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   24.026622] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.027045] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.027843] Call Trace:
[   24.028130]  <TASK>
[   24.028566]  dump_stack_lvl+0x73/0xb0
[   24.029134]  print_report+0xd1/0x640
[   24.030115]  ? __virt_addr_valid+0x1db/0x2d0
[   24.030789]  ? kasan_addr_to_slab+0x11/0xa0
[   24.031262]  kasan_report+0x102/0x140
[   24.031620]  ? kmalloc_large_oob_right+0x2eb/0x340
[   24.032062]  ? kmalloc_large_oob_right+0x2eb/0x340
[   24.033377]  __asan_report_store1_noabort+0x1b/0x30
[   24.034138]  kmalloc_large_oob_right+0x2eb/0x340
[   24.034588]  ? __pfx_kmalloc_large_oob_right+0x10/0x10
[   24.035019]  ? __schedule+0xc3e/0x2790
[   24.035697]  ? __pfx_read_tsc+0x10/0x10
[   24.036165]  ? ktime_get_ts64+0x84/0x230
[   24.036688]  kunit_try_run_case+0x1b3/0x490
[   24.037042]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.037860]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   24.038403]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.039240]  ? __kthread_parkme+0x82/0x160
[   24.039661]  ? preempt_count_sub+0x50/0x80
[   24.040331]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.040712]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.041688]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.042170]  kthread+0x257/0x310
[   24.042757]  ? __pfx_kthread+0x10/0x10
[   24.043159]  ret_from_fork+0x41/0x80
[   24.043968]  ? __pfx_kthread+0x10/0x10
[   24.044296]  ret_from_fork_asm+0x1a/0x30
[   24.044910]  </TASK>
[   24.045323] 
[   24.045560] The buggy address belongs to the physical page:
[   24.046185] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023b0
[   24.046581] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   24.047226] flags: 0x200000000000040(head|node=0|zone=2)
[   24.048088] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   24.048857] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.049635] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   24.050083] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.052089] head: 0200000000000002 ffffea000408ec01 ffffffffffffffff 0000000000000000
[   24.053304] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   24.054195] page dumped because: kasan: bad access detected
[   24.054696] 
[   24.055079] Memory state around the buggy address:
[   24.055534]  ffff8881023b1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.056333]  ffff8881023b1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.056858] >ffff8881023b2000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   24.057757]                       ^
[   24.058216]  ffff8881023b2080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   24.058873]  ffff8881023b2100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   24.059392] ==================================================================