Hay
Date
July 8, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.033862] ==================================================================
[   19.033943] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   19.033994] Read of size 1 at addr fff00000c641d000 by task kunit_try_catch/140
[   19.034061] 
[   19.034092] CPU: 1 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.034356] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.034390] Hardware name: linux,dummy-virt (DT)
[   19.034670] Call trace:
[   19.034741]  show_stack+0x20/0x38 (C)
[   19.034832]  dump_stack_lvl+0x8c/0xd0
[   19.034883]  print_report+0x118/0x608
[   19.034934]  kasan_report+0xdc/0x128
[   19.034986]  __asan_report_load1_noabort+0x20/0x30
[   19.035112]  kmalloc_node_oob_right+0x2f4/0x330
[   19.035174]  kunit_try_run_case+0x170/0x3f0
[   19.035443]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.035557]  kthread+0x328/0x630
[   19.035602]  ret_from_fork+0x10/0x20
[   19.035703] 
[   19.035721] Allocated by task 140:
[   19.035749]  kasan_save_stack+0x3c/0x68
[   19.035804]  kasan_save_track+0x20/0x40
[   19.035841]  kasan_save_alloc_info+0x40/0x58
[   19.036181]  __kasan_kmalloc+0xd4/0xd8
[   19.036287]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   19.036412]  kmalloc_node_oob_right+0xbc/0x330
[   19.036652]  kunit_try_run_case+0x170/0x3f0
[   19.037004]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.037105]  kthread+0x328/0x630
[   19.037212]  ret_from_fork+0x10/0x20
[   19.037304] 
[   19.037475] The buggy address belongs to the object at fff00000c641c000
[   19.037475]  which belongs to the cache kmalloc-4k of size 4096
[   19.037678] The buggy address is located 0 bytes to the right of
[   19.037678]  allocated 4096-byte region [fff00000c641c000, fff00000c641d000)
[   19.037819] 
[   19.038234] The buggy address belongs to the physical page:
[   19.038342] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106418
[   19.038622] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.038686] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.038772] page_type: f5(slab)
[   19.038810] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.038876] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   19.038953] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.039002] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   19.039060] head: 0bfffe0000000003 ffffc1ffc3190601 00000000ffffffff 00000000ffffffff
[   19.039116] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   19.039596] page dumped because: kasan: bad access detected
[   19.039656] 
[   19.039784] Memory state around the buggy address:
[   19.039820]  fff00000c641cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.039882]  fff00000c641cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.040226] >fff00000c641d000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.040292]                    ^
[   19.040639]  fff00000c641d080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.040820]  fff00000c641d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.041026] ==================================================================

[   11.865410] ==================================================================
[   11.866070] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   11.866476] Read of size 1 at addr ffff888102bfb000 by task kunit_try_catch/158
[   11.866800] 
[   11.866930] CPU: 1 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   11.866975] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.866986] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.867007] Call Trace:
[   11.867020]  <TASK>
[   11.867036]  dump_stack_lvl+0x73/0xb0
[   11.867066]  print_report+0xd1/0x650
[   11.867088]  ? __virt_addr_valid+0x1db/0x2d0
[   11.867111]  ? kmalloc_node_oob_right+0x369/0x3c0
[   11.867134]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.867157]  ? kmalloc_node_oob_right+0x369/0x3c0
[   11.867180]  kasan_report+0x141/0x180
[   11.867202]  ? kmalloc_node_oob_right+0x369/0x3c0
[   11.867230]  __asan_report_load1_noabort+0x18/0x20
[   11.867255]  kmalloc_node_oob_right+0x369/0x3c0
[   11.867279]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   11.867303]  ? __schedule+0x10cc/0x2b60
[   11.867325]  ? __pfx_read_tsc+0x10/0x10
[   11.867345]  ? ktime_get_ts64+0x86/0x230
[   11.867371]  kunit_try_run_case+0x1a5/0x480
[   11.867397]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.867420]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.867444]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.867467]  ? __kthread_parkme+0x82/0x180
[   11.867487]  ? preempt_count_sub+0x50/0x80
[   11.867525]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.867550]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.867575]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.867611]  kthread+0x337/0x6f0
[   11.867630]  ? trace_preempt_on+0x20/0xc0
[   11.867653]  ? __pfx_kthread+0x10/0x10
[   11.867673]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.867694]  ? calculate_sigpending+0x7b/0xa0
[   11.867717]  ? __pfx_kthread+0x10/0x10
[   11.867738]  ret_from_fork+0x116/0x1d0
[   11.867756]  ? __pfx_kthread+0x10/0x10
[   11.867775]  ret_from_fork_asm+0x1a/0x30
[   11.867806]  </TASK>
[   11.867817] 
[   11.875022] Allocated by task 158:
[   11.875209]  kasan_save_stack+0x45/0x70
[   11.875409]  kasan_save_track+0x18/0x40
[   11.875724]  kasan_save_alloc_info+0x3b/0x50
[   11.875964]  __kasan_kmalloc+0xb7/0xc0
[   11.876126]  __kmalloc_cache_node_noprof+0x188/0x420
[   11.876351]  kmalloc_node_oob_right+0xab/0x3c0
[   11.876571]  kunit_try_run_case+0x1a5/0x480
[   11.876765]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.876987]  kthread+0x337/0x6f0
[   11.877105]  ret_from_fork+0x116/0x1d0
[   11.877280]  ret_from_fork_asm+0x1a/0x30
[   11.877484] 
[   11.877575] The buggy address belongs to the object at ffff888102bfa000
[   11.877575]  which belongs to the cache kmalloc-4k of size 4096
[   11.878176] The buggy address is located 0 bytes to the right of
[   11.878176]  allocated 4096-byte region [ffff888102bfa000, ffff888102bfb000)
[   11.878539] 
[   11.878617] The buggy address belongs to the physical page:
[   11.878889] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bf8
[   11.879612] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.880034] flags: 0x200000000000040(head|node=0|zone=2)
[   11.880390] page_type: f5(slab)
[   11.880627] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   11.880949] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   11.881226] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   11.881464] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   11.881935] head: 0200000000000003 ffffea00040afe01 00000000ffffffff 00000000ffffffff
[   11.882453] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   11.882810] page dumped because: kasan: bad access detected
[   11.883070] 
[   11.883166] Memory state around the buggy address:
[   11.883356]  ffff888102bfaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.883711]  ffff888102bfaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.884104] >ffff888102bfb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.884373]                    ^
[   11.884529]  ffff888102bfb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.884776]  ffff888102bfb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.885317] ==================================================================