Hay
Date
Dec. 9, 2024, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   23.273190] ==================================================================
[   23.274161] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x278/0x2b8
[   23.274881] Write of size 1 at addr fff00000c645600a by task kunit_try_catch/134
[   23.276043] 
[   23.276384] CPU: 1 UID: 0 PID: 134 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc2-next-20241209 #1
[   23.277170] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.277813] Hardware name: linux,dummy-virt (DT)
[   23.278310] Call trace:
[   23.278803]  show_stack+0x20/0x38 (C)
[   23.279325]  dump_stack_lvl+0x8c/0xd0
[   23.279897]  print_report+0x118/0x5e0
[   23.280429]  kasan_report+0xc8/0x118
[   23.281030]  __asan_report_store1_noabort+0x20/0x30
[   23.281652]  kmalloc_large_oob_right+0x278/0x2b8
[   23.282411]  kunit_try_run_case+0x14c/0x3d0
[   23.283358]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.284035]  kthread+0x24c/0x2d0
[   23.284570]  ret_from_fork+0x10/0x20
[   23.285133] 
[   23.285490] The buggy address belongs to the physical page:
[   23.286193] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106454
[   23.287177] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   23.288061] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   23.288912] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   23.289766] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.290566] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   23.291589] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.292344] head: 0bfffe0000000002 ffffc1ffc3191501 ffffffffffffffff 0000000000000000
[   23.293154] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   23.294003] page dumped because: kasan: bad access detected
[   23.294634] 
[   23.294943] Memory state around the buggy address:
[   23.295896]  fff00000c6455f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.296687]  fff00000c6455f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.297468] >fff00000c6456000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.298243]                       ^
[   23.298676]  fff00000c6456080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.299689]  fff00000c6456100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.300541] ==================================================================

[   22.882098] ==================================================================
[   22.883352] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x2eb/0x340
[   22.884618] Write of size 1 at addr ffff8881022e600a by task kunit_try_catch/153
[   22.885386] 
[   22.885694] CPU: 0 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc2-next-20241209 #1
[   22.887528] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.888113] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.889377] Call Trace:
[   22.889609]  <TASK>
[   22.890392]  dump_stack_lvl+0x73/0xb0
[   22.891217]  print_report+0xd1/0x640
[   22.891575]  ? __virt_addr_valid+0x1db/0x2d0
[   22.891917]  ? kasan_addr_to_slab+0x11/0xa0
[   22.892482]  kasan_report+0x102/0x140
[   22.893136]  ? kmalloc_large_oob_right+0x2eb/0x340
[   22.893745]  ? kmalloc_large_oob_right+0x2eb/0x340
[   22.894321]  __asan_report_store1_noabort+0x1b/0x30
[   22.895768]  kmalloc_large_oob_right+0x2eb/0x340
[   22.896478]  ? __pfx_kmalloc_large_oob_right+0x10/0x10
[   22.897001]  ? __schedule+0xc70/0x27e0
[   22.897555]  ? __pfx_read_tsc+0x10/0x10
[   22.898721]  ? ktime_get_ts64+0x86/0x230
[   22.899651]  kunit_try_run_case+0x1b3/0x490
[   22.900405]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.900627]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   22.900926]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.901843]  ? __kthread_parkme+0x82/0x160
[   22.903130]  ? preempt_count_sub+0x50/0x80
[   22.904054]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.904645]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.905332]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.906207]  kthread+0x257/0x310
[   22.906882]  ? __pfx_kthread+0x10/0x10
[   22.907970]  ret_from_fork+0x41/0x80
[   22.908346]  ? __pfx_kthread+0x10/0x10
[   22.908896]  ret_from_fork_asm+0x1a/0x30
[   22.909372]  </TASK>
[   22.909632] 
[   22.909871] The buggy address belongs to the physical page:
[   22.910425] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1022e4
[   22.910945] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   22.913119] flags: 0x200000000000040(head|node=0|zone=2)
[   22.913983] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   22.914955] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   22.915858] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   22.916813] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   22.918277] head: 0200000000000002 ffffea000408b901 ffffffffffffffff 0000000000000000
[   22.919374] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   22.920449] page dumped because: kasan: bad access detected
[   22.921496] 
[   22.922001] Memory state around the buggy address:
[   22.922668]  ffff8881022e5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.924058]  ffff8881022e5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.924604] >ffff8881022e6000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   22.926430]                       ^
[   22.926700]  ffff8881022e6080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   22.928221]  ffff8881022e6100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   22.929135] ==================================================================