Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.207028] ==================================================================
[   15.207084] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   15.207571] Write of size 2 at addr fff00000c6417877 by task kunit_try_catch/172
[   15.207679] 
[   15.207718] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.207836] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.207961] Hardware name: linux,dummy-virt (DT)
[   15.207992] Call trace:
[   15.208014]  show_stack+0x20/0x38 (C)
[   15.208063]  dump_stack_lvl+0x8c/0xd0
[   15.208109]  print_report+0x118/0x5d0
[   15.208153]  kasan_report+0xdc/0x128
[   15.208198]  kasan_check_range+0x100/0x1a8
[   15.208244]  __asan_memset+0x34/0x78
[   15.208285]  kmalloc_oob_memset_2+0x150/0x2f8
[   15.208330]  kunit_try_run_case+0x170/0x3f0
[   15.208501]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.208576]  kthread+0x328/0x630
[   15.208618]  ret_from_fork+0x10/0x20
[   15.208663] 
[   15.208681] Allocated by task 172:
[   15.208752]  kasan_save_stack+0x3c/0x68
[   15.208828]  kasan_save_track+0x20/0x40
[   15.208879]  kasan_save_alloc_info+0x40/0x58
[   15.208939]  __kasan_kmalloc+0xd4/0xd8
[   15.209068]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.209169]  kmalloc_oob_memset_2+0xb0/0x2f8
[   15.209245]  kunit_try_run_case+0x170/0x3f0
[   15.209281]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.209332]  kthread+0x328/0x630
[   15.209364]  ret_from_fork+0x10/0x20
[   15.209399] 
[   15.209417] The buggy address belongs to the object at fff00000c6417800
[   15.209417]  which belongs to the cache kmalloc-128 of size 128
[   15.209727] The buggy address is located 119 bytes inside of
[   15.209727]  allocated 120-byte region [fff00000c6417800, fff00000c6417878)
[   15.209828] 
[   15.209847] The buggy address belongs to the physical page:
[   15.209876] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106417
[   15.209927] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.209973] page_type: f5(slab)
[   15.210008] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.210057] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.210096] page dumped because: kasan: bad access detected
[   15.210136] 
[   15.210154] Memory state around the buggy address:
[   15.210184]  fff00000c6417700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.210373]  fff00000c6417780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.210438] >fff00000c6417800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.210475]                                                                 ^
[   15.210600]  fff00000c6417880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.210654]  fff00000c6417900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.210699] ==================================================================

[   12.102669] ==================================================================
[   12.103130] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   12.103720] Write of size 2 at addr ffff8881027d6977 by task kunit_try_catch/189
[   12.104238] 
[   12.104430] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.104580] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.104592] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.104613] Call Trace:
[   12.104624]  <TASK>
[   12.104638]  dump_stack_lvl+0x73/0xb0
[   12.104668]  print_report+0xd1/0x610
[   12.104689]  ? __virt_addr_valid+0x1db/0x2d0
[   12.104710]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.104731]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.104751]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.104772]  kasan_report+0x141/0x180
[   12.104792]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.104817]  kasan_check_range+0x10c/0x1c0
[   12.104839]  __asan_memset+0x27/0x50
[   12.104858]  kmalloc_oob_memset_2+0x166/0x330
[   12.104880]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   12.104901]  ? __schedule+0x10cc/0x2b60
[   12.104922]  ? __pfx_read_tsc+0x10/0x10
[   12.104943]  ? ktime_get_ts64+0x86/0x230
[   12.104966]  kunit_try_run_case+0x1a5/0x480
[   12.105016]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.105038]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.105060]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.105081]  ? __kthread_parkme+0x82/0x180
[   12.105102]  ? preempt_count_sub+0x50/0x80
[   12.105124]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.105147]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.105169]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.105191]  kthread+0x337/0x6f0
[   12.105209]  ? trace_preempt_on+0x20/0xc0
[   12.105231]  ? __pfx_kthread+0x10/0x10
[   12.105250]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.105270]  ? calculate_sigpending+0x7b/0xa0
[   12.105292]  ? __pfx_kthread+0x10/0x10
[   12.105313]  ret_from_fork+0x116/0x1d0
[   12.105330]  ? __pfx_kthread+0x10/0x10
[   12.105349]  ret_from_fork_asm+0x1a/0x30
[   12.105379]  </TASK>
[   12.105388] 
[   12.115424] Allocated by task 189:
[   12.115810]  kasan_save_stack+0x45/0x70
[   12.115995]  kasan_save_track+0x18/0x40
[   12.116186]  kasan_save_alloc_info+0x3b/0x50
[   12.116666]  __kasan_kmalloc+0xb7/0xc0
[   12.116854]  __kmalloc_cache_noprof+0x189/0x420
[   12.117045]  kmalloc_oob_memset_2+0xac/0x330
[   12.117258]  kunit_try_run_case+0x1a5/0x480
[   12.117470]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.117989]  kthread+0x337/0x6f0
[   12.118165]  ret_from_fork+0x116/0x1d0
[   12.118344]  ret_from_fork_asm+0x1a/0x30
[   12.118679] 
[   12.118780] The buggy address belongs to the object at ffff8881027d6900
[   12.118780]  which belongs to the cache kmalloc-128 of size 128
[   12.119273] The buggy address is located 119 bytes inside of
[   12.119273]  allocated 120-byte region [ffff8881027d6900, ffff8881027d6978)
[   12.120136] 
[   12.120245] The buggy address belongs to the physical page:
[   12.120514] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027d6
[   12.120989] flags: 0x200000000000000(node=0|zone=2)
[   12.121241] page_type: f5(slab)
[   12.121372] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.122158] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.122584] page dumped because: kasan: bad access detected
[   12.122771] 
[   12.122865] Memory state around the buggy address:
[   12.123108]  ffff8881027d6800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.123387]  ffff8881027d6880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.124160] >ffff8881027d6900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.124533]                                                                 ^
[   12.125076]  ffff8881027d6980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.125555]  ffff8881027d6a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.126103] ==================================================================