Hay
Date
May 12, 2025, 6:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.941033] ==================================================================
[   17.942105] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.943035] Write of size 1 at addr fff00000c64e9f00 by task kunit_try_catch/133
[   17.943719] 
[   17.944042] CPU: 1 UID: 0 PID: 133 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   17.944405] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.944500] Hardware name: linux,dummy-virt (DT)
[   17.944566] Call trace:
[   17.944619]  show_stack+0x20/0x38 (C)
[   17.944727]  dump_stack_lvl+0x8c/0xd0
[   17.944843]  print_report+0x118/0x608
[   17.944947]  kasan_report+0xdc/0x128
[   17.945046]  __asan_report_store1_noabort+0x20/0x30
[   17.945155]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.945255]  kunit_try_run_case+0x170/0x3f0
[   17.945356]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.945497]  kthread+0x318/0x620
[   17.945592]  ret_from_fork+0x10/0x20
[   17.945716] 
[   17.950936] Allocated by task 133:
[   17.951379]  kasan_save_stack+0x3c/0x68
[   17.951952]  kasan_save_track+0x20/0x40
[   17.952351]  kasan_save_alloc_info+0x40/0x58
[   17.952806]  __kasan_kmalloc+0xd4/0xd8
[   17.953208]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.953673]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.954096]  kunit_try_run_case+0x170/0x3f0
[   17.954629]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.955147]  kthread+0x318/0x620
[   17.955539]  ret_from_fork+0x10/0x20
[   17.955969] 
[   17.956146] The buggy address belongs to the object at fff00000c64e8000
[   17.956146]  which belongs to the cache kmalloc-8k of size 8192
[   17.957027] The buggy address is located 0 bytes to the right of
[   17.957027]  allocated 7936-byte region [fff00000c64e8000, fff00000c64e9f00)
[   17.957835] 
[   17.958565] The buggy address belongs to the physical page:
[   17.959013] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064e8
[   17.959672] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.960431] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.961104] page_type: f5(slab)
[   17.961439] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.962250] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.962920] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.963544] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.964360] head: 0bfffe0000000003 ffffc1ffc3193a01 ffffffffffffffff 0000000000000000
[   17.965076] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   17.965779] page dumped because: kasan: bad access detected
[   17.966419] 
[   17.966687] Memory state around the buggy address:
[   17.967455]  fff00000c64e9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.968034]  fff00000c64e9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.968791] >fff00000c64e9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.969476]                    ^
[   17.970030]  fff00000c64e9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.970625]  fff00000c64ea000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.971365] ==================================================================

[   11.830745] ==================================================================
[   11.832181] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x318/0x370
[   11.832886] Write of size 1 at addr ffff888102c21f00 by task kunit_try_catch/152
[   11.833335] 
[   11.833524] CPU: 1 UID: 0 PID: 152 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   11.833571] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.833597] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.833646] Call Trace:
[   11.833661]  <TASK>
[   11.833683]  dump_stack_lvl+0x73/0xb0
[   11.833712]  print_report+0xd1/0x650
[   11.833735]  ? __virt_addr_valid+0x1db/0x2d0
[   11.833763]  ? kmalloc_big_oob_right+0x318/0x370
[   11.833797]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.833821]  ? kmalloc_big_oob_right+0x318/0x370
[   11.833853]  kasan_report+0x140/0x180
[   11.833876]  ? kmalloc_big_oob_right+0x318/0x370
[   11.833901]  __asan_report_store1_noabort+0x1b/0x30
[   11.833924]  kmalloc_big_oob_right+0x318/0x370
[   11.833945]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   11.833966]  ? __schedule+0xce8/0x2840
[   11.834010]  ? __pfx_read_tsc+0x10/0x10
[   11.834067]  ? ktime_get_ts64+0x86/0x230
[   11.834095]  kunit_try_run_case+0x1a6/0x480
[   11.834119]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.834139]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   11.834160]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.834183]  ? __kthread_parkme+0x82/0x160
[   11.834205]  ? preempt_count_sub+0x50/0x80
[   11.834229]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.834251]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.834276]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.834302]  kthread+0x324/0x6e0
[   11.834323]  ? trace_preempt_on+0x20/0xc0
[   11.834346]  ? __pfx_kthread+0x10/0x10
[   11.834368]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.834390]  ? calculate_sigpending+0x7b/0xa0
[   11.834411]  ? __pfx_kthread+0x10/0x10
[   11.834433]  ret_from_fork+0x41/0x80
[   11.834451]  ? __pfx_kthread+0x10/0x10
[   11.834473]  ret_from_fork_asm+0x1a/0x30
[   11.834503]  </TASK>
[   11.834514] 
[   11.845813] Allocated by task 152:
[   11.846174]  kasan_save_stack+0x45/0x70
[   11.846605]  kasan_save_track+0x18/0x40
[   11.846873]  kasan_save_alloc_info+0x3b/0x50
[   11.847287]  __kasan_kmalloc+0xb7/0xc0
[   11.847640]  __kmalloc_cache_noprof+0x18a/0x420
[   11.847873]  kmalloc_big_oob_right+0xaa/0x370
[   11.848033]  kunit_try_run_case+0x1a6/0x480
[   11.848230]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.848412]  kthread+0x324/0x6e0
[   11.848536]  ret_from_fork+0x41/0x80
[   11.848665]  ret_from_fork_asm+0x1a/0x30
[   11.848810] 
[   11.848902] The buggy address belongs to the object at ffff888102c20000
[   11.848902]  which belongs to the cache kmalloc-8k of size 8192
[   11.849531] The buggy address is located 0 bytes to the right of
[   11.849531]  allocated 7936-byte region [ffff888102c20000, ffff888102c21f00)
[   11.849971] 
[   11.850077] The buggy address belongs to the physical page:
[   11.850626] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c20
[   11.851429] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.852187] flags: 0x200000000000040(head|node=0|zone=2)
[   11.852610] page_type: f5(slab)
[   11.852742] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.852984] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.853787] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.854699] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.855478] head: 0200000000000003 ffffea00040b0801 ffffffffffffffff 0000000000000000
[   11.855917] head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
[   11.856556] page dumped because: kasan: bad access detected
[   11.857120] 
[   11.857297] Memory state around the buggy address:
[   11.857589]  ffff888102c21e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.857812]  ffff888102c21e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.858132] >ffff888102c21f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.858849]                    ^
[   11.859167]  ffff888102c21f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.859875]  ffff888102c22000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.860656] ==================================================================