Hay
Date
June 25, 2025, 8:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   26.679905] ==================================================================
[   26.681051] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   26.681144] Write of size 8 at addr fff00000c7895071 by task kunit_try_catch/188
[   26.681578] 
[   26.681676] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT 
[   26.682000] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.682287] Hardware name: linux,dummy-virt (DT)
[   26.682571] Call trace:
[   26.682655]  show_stack+0x20/0x38 (C)
[   26.682795]  dump_stack_lvl+0x8c/0xd0
[   26.682919]  print_report+0x118/0x608
[   26.683229]  kasan_report+0xdc/0x128
[   26.683545]  kasan_check_range+0x100/0x1a8
[   26.683964]  __asan_memset+0x34/0x78
[   26.684151]  kmalloc_oob_memset_8+0x150/0x2f8
[   26.684349]  kunit_try_run_case+0x170/0x3f0
[   26.684615]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.684819]  kthread+0x328/0x630
[   26.684861]  ret_from_fork+0x10/0x20
[   26.684911] 
[   26.684929] Allocated by task 188:
[   26.685479]  kasan_save_stack+0x3c/0x68
[   26.685606]  kasan_save_track+0x20/0x40
[   26.685715]  kasan_save_alloc_info+0x40/0x58
[   26.685832]  __kasan_kmalloc+0xd4/0xd8
[   26.685896]  __kmalloc_cache_noprof+0x16c/0x3c0
[   26.686066]  kmalloc_oob_memset_8+0xb0/0x2f8
[   26.686506]  kunit_try_run_case+0x170/0x3f0
[   26.686618]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.686729]  kthread+0x328/0x630
[   26.686948]  ret_from_fork+0x10/0x20
[   26.687166] 
[   26.687349] The buggy address belongs to the object at fff00000c7895000
[   26.687349]  which belongs to the cache kmalloc-128 of size 128
[   26.687604] The buggy address is located 113 bytes inside of
[   26.687604]  allocated 120-byte region [fff00000c7895000, fff00000c7895078)
[   26.687737] 
[   26.687931] The buggy address belongs to the physical page:
[   26.688115] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107895
[   26.688168] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.688217] page_type: f5(slab)
[   26.688559] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   26.688915] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   26.689075] page dumped because: kasan: bad access detected
[   26.689143] 
[   26.689162] Memory state around the buggy address:
[   26.689563]  fff00000c7894f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.689632]  fff00000c7894f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.689921] >fff00000c7895000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   26.689973]                                                                 ^
[   26.690113]  fff00000c7895080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.690155]  fff00000c7895100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.690490] ==================================================================

[   21.986696] ==================================================================
[   21.987248] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   21.987617] Write of size 8 at addr ffff8881039c3671 by task kunit_try_catch/205
[   21.987874] 
[   21.987994] CPU: 1 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT(voluntary) 
[   21.988040] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.988052] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.988073] Call Trace:
[   21.988086]  <TASK>
[   21.988101]  dump_stack_lvl+0x73/0xb0
[   21.988126]  print_report+0xd1/0x650
[   21.988153]  ? __virt_addr_valid+0x1db/0x2d0
[   21.988175]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.988194]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.988218]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.988237]  kasan_report+0x141/0x180
[   21.988257]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.988281]  kasan_check_range+0x10c/0x1c0
[   21.988303]  __asan_memset+0x27/0x50
[   21.988324]  kmalloc_oob_memset_8+0x166/0x330
[   21.988349]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   21.988370]  ? __schedule+0x10cc/0x2b60
[   21.988393]  ? __pfx_read_tsc+0x10/0x10
[   21.988412]  ? ktime_get_ts64+0x86/0x230
[   21.988435]  kunit_try_run_case+0x1a5/0x480
[   21.988458]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.988479]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.988500]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.988524]  ? __kthread_parkme+0x82/0x180
[   21.988543]  ? preempt_count_sub+0x50/0x80
[   21.988564]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.988586]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.988607]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.988628]  kthread+0x337/0x6f0
[   21.988646]  ? trace_preempt_on+0x20/0xc0
[   21.988666]  ? __pfx_kthread+0x10/0x10
[   21.988685]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.988706]  ? calculate_sigpending+0x7b/0xa0
[   21.988728]  ? __pfx_kthread+0x10/0x10
[   21.988747]  ret_from_fork+0x116/0x1d0
[   21.988764]  ? __pfx_kthread+0x10/0x10
[   21.988782]  ret_from_fork_asm+0x1a/0x30
[   21.988811]  </TASK>
[   21.988821] 
[   21.998249] Allocated by task 205:
[   21.998646]  kasan_save_stack+0x45/0x70
[   21.998951]  kasan_save_track+0x18/0x40
[   21.999126]  kasan_save_alloc_info+0x3b/0x50
[   21.999426]  __kasan_kmalloc+0xb7/0xc0
[   22.000014]  __kmalloc_cache_noprof+0x189/0x420
[   22.000248]  kmalloc_oob_memset_8+0xac/0x330
[   22.000533]  kunit_try_run_case+0x1a5/0x480
[   22.000692]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.000930]  kthread+0x337/0x6f0
[   22.001340]  ret_from_fork+0x116/0x1d0
[   22.001590]  ret_from_fork_asm+0x1a/0x30
[   22.001769] 
[   22.001901] The buggy address belongs to the object at ffff8881039c3600
[   22.001901]  which belongs to the cache kmalloc-128 of size 128
[   22.002374] The buggy address is located 113 bytes inside of
[   22.002374]  allocated 120-byte region [ffff8881039c3600, ffff8881039c3678)
[   22.002851] 
[   22.003121] The buggy address belongs to the physical page:
[   22.003353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039c3
[   22.003680] flags: 0x200000000000000(node=0|zone=2)
[   22.003947] page_type: f5(slab)
[   22.004087] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   22.004383] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.005190] page dumped because: kasan: bad access detected
[   22.005458] 
[   22.005531] Memory state around the buggy address:
[   22.005987]  ffff8881039c3500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.006405]  ffff8881039c3580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.006771] >ffff8881039c3600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.007304]                                                                 ^
[   22.007598]  ffff8881039c3680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.008325]  ffff8881039c3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.008615] ==================================================================