Hay
Date
July 9, 2025, 12:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.305841] ==================================================================
[   19.305987] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x2f4/0x330
[   19.306125] Read of size 1 at addr fff00000c63fb000 by task kunit_try_catch/141
[   19.306245] 
[   19.306307] CPU: 1 UID: 0 PID: 141 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.306387] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.306459] Hardware name: linux,dummy-virt (DT)
[   19.306489] Call trace:
[   19.306519]  show_stack+0x20/0x38 (C)
[   19.306587]  dump_stack_lvl+0x8c/0xd0
[   19.306673]  print_report+0x118/0x608
[   19.306738]  kasan_report+0xdc/0x128
[   19.306804]  __asan_report_load1_noabort+0x20/0x30
[   19.306861]  kmalloc_node_oob_right+0x2f4/0x330
[   19.306916]  kunit_try_run_case+0x170/0x3f0
[   19.306965]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.307121]  kthread+0x328/0x630
[   19.307253]  ret_from_fork+0x10/0x20
[   19.307361] 
[   19.307379] Allocated by task 141:
[   19.307450]  kasan_save_stack+0x3c/0x68
[   19.307518]  kasan_save_track+0x20/0x40
[   19.307574]  kasan_save_alloc_info+0x40/0x58
[   19.307614]  __kasan_kmalloc+0xd4/0xd8
[   19.307651]  __kmalloc_cache_node_noprof+0x178/0x3d0
[   19.307710]  kmalloc_node_oob_right+0xbc/0x330
[   19.307753]  kunit_try_run_case+0x170/0x3f0
[   19.307790]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.307832]  kthread+0x328/0x630
[   19.307864]  ret_from_fork+0x10/0x20
[   19.307899] 
[   19.307917] The buggy address belongs to the object at fff00000c63fa000
[   19.307917]  which belongs to the cache kmalloc-4k of size 4096
[   19.308029] The buggy address is located 0 bytes to the right of
[   19.308029]  allocated 4096-byte region [fff00000c63fa000, fff00000c63fb000)
[   19.308220] 
[   19.308239] The buggy address belongs to the physical page:
[   19.308332] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063f8
[   19.308628] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.308682] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.308757] page_type: f5(slab)
[   19.308794] raw: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.308844] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   19.308900] head: 0bfffe0000000040 fff00000c0002140 dead000000000122 0000000000000000
[   19.308948] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   19.308997] head: 0bfffe0000000003 ffffc1ffc318fe01 00000000ffffffff 00000000ffffffff
[   19.309256] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   19.309331] page dumped because: kasan: bad access detected
[   19.309363] 
[   19.309382] Memory state around the buggy address:
[   19.309424]  fff00000c63faf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.309493]  fff00000c63faf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.309560] >fff00000c63fb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309733]                    ^
[   19.309761]  fff00000c63fb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309802]  fff00000c63fb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309839] ==================================================================

[   12.012273] ==================================================================
[   12.012737] BUG: KASAN: slab-out-of-bounds in kmalloc_node_oob_right+0x369/0x3c0
[   12.013114] Read of size 1 at addr ffff888102b6d000 by task kunit_try_catch/157
[   12.013507] 
[   12.013641] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.013689] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.013700] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.013720] Call Trace:
[   12.013733]  <TASK>
[   12.013751]  dump_stack_lvl+0x73/0xb0
[   12.013782]  print_report+0xd1/0x650
[   12.013805]  ? __virt_addr_valid+0x1db/0x2d0
[   12.013828]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.013851]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.013874]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.013898]  kasan_report+0x141/0x180
[   12.013919]  ? kmalloc_node_oob_right+0x369/0x3c0
[   12.014020]  __asan_report_load1_noabort+0x18/0x20
[   12.014047]  kmalloc_node_oob_right+0x369/0x3c0
[   12.014071]  ? __pfx_kmalloc_node_oob_right+0x10/0x10
[   12.014095]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   12.014122]  ? trace_hardirqs_on+0x37/0xe0
[   12.014145]  ? __pfx_read_tsc+0x10/0x10
[   12.014167]  ? ktime_get_ts64+0x86/0x230
[   12.014190]  kunit_try_run_case+0x1a5/0x480
[   12.014215]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.014239]  ? queued_spin_lock_slowpath+0x116/0xb40
[   12.014276]  ? __kthread_parkme+0x82/0x180
[   12.014297]  ? preempt_count_sub+0x50/0x80
[   12.014321]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.014344]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.014368]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.014393]  kthread+0x337/0x6f0
[   12.014411]  ? trace_preempt_on+0x20/0xc0
[   12.014432]  ? __pfx_kthread+0x10/0x10
[   12.014452]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.014473]  ? calculate_sigpending+0x7b/0xa0
[   12.014497]  ? __pfx_kthread+0x10/0x10
[   12.014518]  ret_from_fork+0x116/0x1d0
[   12.014535]  ? __pfx_kthread+0x10/0x10
[   12.014555]  ret_from_fork_asm+0x1a/0x30
[   12.014585]  </TASK>
[   12.014596] 
[   12.022037] Allocated by task 157:
[   12.022229]  kasan_save_stack+0x45/0x70
[   12.022446]  kasan_save_track+0x18/0x40
[   12.022634]  kasan_save_alloc_info+0x3b/0x50
[   12.022850]  __kasan_kmalloc+0xb7/0xc0
[   12.023063]  __kmalloc_cache_node_noprof+0x188/0x420
[   12.023456]  kmalloc_node_oob_right+0xab/0x3c0
[   12.023627]  kunit_try_run_case+0x1a5/0x480
[   12.023808]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.024071]  kthread+0x337/0x6f0
[   12.024237]  ret_from_fork+0x116/0x1d0
[   12.024476]  ret_from_fork_asm+0x1a/0x30
[   12.024621] 
[   12.024691] The buggy address belongs to the object at ffff888102b6c000
[   12.024691]  which belongs to the cache kmalloc-4k of size 4096
[   12.025331] The buggy address is located 0 bytes to the right of
[   12.025331]  allocated 4096-byte region [ffff888102b6c000, ffff888102b6d000)
[   12.025785] 
[   12.025857] The buggy address belongs to the physical page:
[   12.026105] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b68
[   12.027044] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.027694] flags: 0x200000000000040(head|node=0|zone=2)
[   12.027989] page_type: f5(slab)
[   12.028119] raw: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.028671] raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.029053] head: 0200000000000040 ffff888100042140 dead000000000122 0000000000000000
[   12.029542] head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
[   12.029890] head: 0200000000000003 ffffea00040ada01 00000000ffffffff 00000000ffffffff
[   12.030273] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.030624] page dumped because: kasan: bad access detected
[   12.030851] 
[   12.030944] Memory state around the buggy address:
[   12.031147]  ffff888102b6cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.031593]  ffff888102b6cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.031844] >ffff888102b6d000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.032373]                    ^
[   12.032520]  ffff888102b6d080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.032796]  ffff888102b6d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.033145] ==================================================================