Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.336491] ==================================================================
[   19.336675] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   19.336768] Write of size 8 at addr fff00000c5708071 by task kunit_try_catch/176
[   19.336941] 
[   19.337123] CPU: 1 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.337228] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.337253] Hardware name: linux,dummy-virt (DT)
[   19.337282] Call trace:
[   19.337338]  show_stack+0x20/0x38 (C)
[   19.337391]  dump_stack_lvl+0x8c/0xd0
[   19.337435]  print_report+0x118/0x608
[   19.337615]  kasan_report+0xdc/0x128
[   19.337800]  kasan_check_range+0x100/0x1a8
[   19.337915]  __asan_memset+0x34/0x78
[   19.337961]  kmalloc_oob_memset_8+0x150/0x2f8
[   19.338005]  kunit_try_run_case+0x170/0x3f0
[   19.338260]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.338332]  kthread+0x328/0x630
[   19.338383]  ret_from_fork+0x10/0x20
[   19.338429] 
[   19.338447] Allocated by task 176:
[   19.338767]  kasan_save_stack+0x3c/0x68
[   19.338886]  kasan_save_track+0x20/0x40
[   19.338942]  kasan_save_alloc_info+0x40/0x58
[   19.339047]  __kasan_kmalloc+0xd4/0xd8
[   19.339223]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.339268]  kmalloc_oob_memset_8+0xb0/0x2f8
[   19.339304]  kunit_try_run_case+0x170/0x3f0
[   19.339340]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.339680]  kthread+0x328/0x630
[   19.339908]  ret_from_fork+0x10/0x20
[   19.340113] 
[   19.340182] The buggy address belongs to the object at fff00000c5708000
[   19.340182]  which belongs to the cache kmalloc-128 of size 128
[   19.340336] The buggy address is located 113 bytes inside of
[   19.340336]  allocated 120-byte region [fff00000c5708000, fff00000c5708078)
[   19.340543] 
[   19.340754] The buggy address belongs to the physical page:
[   19.340810] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105708
[   19.341081] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.341233] page_type: f5(slab)
[   19.341343] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.342072] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.342135] page dumped because: kasan: bad access detected
[   19.342235] 
[   19.342338] Memory state around the buggy address:
[   19.342404]  fff00000c5707f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.342570]  fff00000c5707f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.342808] >fff00000c5708000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.342907]                                                                 ^
[   19.342960]  fff00000c5708080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.343051]  fff00000c5708100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.343352] ==================================================================

[   13.050303] ==================================================================
[   13.050977] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   13.051458] Write of size 8 at addr ffff888102602971 by task kunit_try_catch/193
[   13.051920] 
[   13.052196] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.052241] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.052253] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.052272] Call Trace:
[   13.052284]  <TASK>
[   13.052299]  dump_stack_lvl+0x73/0xb0
[   13.052328]  print_report+0xd1/0x650
[   13.052349]  ? __virt_addr_valid+0x1db/0x2d0
[   13.052370]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.052391]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.052414]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.052435]  kasan_report+0x141/0x180
[   13.052456]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.052481]  kasan_check_range+0x10c/0x1c0
[   13.052502]  __asan_memset+0x27/0x50
[   13.052521]  kmalloc_oob_memset_8+0x166/0x330
[   13.052542]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   13.052566]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   13.052591]  kunit_try_run_case+0x1a5/0x480
[   13.052613]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.052633]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.052655]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.052676]  ? __kthread_parkme+0x82/0x180
[   13.052696]  ? preempt_count_sub+0x50/0x80
[   13.052718]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.052740]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.052762]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.052784]  kthread+0x337/0x6f0
[   13.052802]  ? trace_preempt_on+0x20/0xc0
[   13.052823]  ? __pfx_kthread+0x10/0x10
[   13.052842]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.052861]  ? calculate_sigpending+0x7b/0xa0
[   13.052884]  ? __pfx_kthread+0x10/0x10
[   13.052904]  ret_from_fork+0x116/0x1d0
[   13.052921]  ? __pfx_kthread+0x10/0x10
[   13.052941]  ret_from_fork_asm+0x1a/0x30
[   13.052970]  </TASK>
[   13.052980] 
[   13.062344] Allocated by task 193:
[   13.062586]  kasan_save_stack+0x45/0x70
[   13.062925]  kasan_save_track+0x18/0x40
[   13.063105]  kasan_save_alloc_info+0x3b/0x50
[   13.063504]  __kasan_kmalloc+0xb7/0xc0
[   13.063725]  __kmalloc_cache_noprof+0x189/0x420
[   13.064056]  kmalloc_oob_memset_8+0xac/0x330
[   13.064387]  kunit_try_run_case+0x1a5/0x480
[   13.064602]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.064949]  kthread+0x337/0x6f0
[   13.065253]  ret_from_fork+0x116/0x1d0
[   13.065414]  ret_from_fork_asm+0x1a/0x30
[   13.065614] 
[   13.065714] The buggy address belongs to the object at ffff888102602900
[   13.065714]  which belongs to the cache kmalloc-128 of size 128
[   13.066458] The buggy address is located 113 bytes inside of
[   13.066458]  allocated 120-byte region [ffff888102602900, ffff888102602978)
[   13.067104] 
[   13.067272] The buggy address belongs to the physical page:
[   13.067608] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102602
[   13.067988] flags: 0x200000000000000(node=0|zone=2)
[   13.068350] page_type: f5(slab)
[   13.068475] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.068943] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.069407] page dumped because: kasan: bad access detected
[   13.069696] 
[   13.069868] Memory state around the buggy address:
[   13.070099]  ffff888102602800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.070658]  ffff888102602880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.071016] >ffff888102602900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.071353]                                                                 ^
[   13.071701]  ffff888102602980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.072256]  ffff888102602a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.072518] ==================================================================