Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.056288] ==================================================================
[   20.056971] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x15c/0x310
[   20.057718] Write of size 16 at addr fff00000c6492769 by task kunit_try_catch/165
[   20.058370] 
[   20.058641] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   20.058839] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.058907] Hardware name: linux,dummy-virt (DT)
[   20.058977] Call trace:
[   20.059026]  dump_backtrace+0x9c/0x128
[   20.059190]  show_stack+0x20/0x38
[   20.059297]  dump_stack_lvl+0x8c/0xd0
[   20.059406]  print_report+0x118/0x5f0
[   20.059484]  kasan_report+0xdc/0x128
[   20.059550]  kasan_check_range+0x100/0x1a8
[   20.059628]  __asan_memset+0x34/0x78
[   20.059696]  kmalloc_oob_memset_16+0x15c/0x310
[   20.059786]  kunit_try_run_case+0x170/0x3f0
[   20.059866]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.059954]  kthread+0x24c/0x2d0
[   20.060038]  ret_from_fork+0x10/0x20
[   20.060148] 
[   20.065409] Allocated by task 165:
[   20.065787]  kasan_save_stack+0x3c/0x68
[   20.066136]  kasan_save_track+0x20/0x40
[   20.066687]  kasan_save_alloc_info+0x40/0x58
[   20.067339]  __kasan_kmalloc+0xd4/0xd8
[   20.067864]  __kmalloc_cache_noprof+0x154/0x320
[   20.068425]  kmalloc_oob_memset_16+0xb0/0x310
[   20.068852]  kunit_try_run_case+0x170/0x3f0
[   20.069388]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.069874]  kthread+0x24c/0x2d0
[   20.070346]  ret_from_fork+0x10/0x20
[   20.070751] 
[   20.071071] The buggy address belongs to the object at fff00000c6492700
[   20.071071]  which belongs to the cache kmalloc-128 of size 128
[   20.072124] The buggy address is located 105 bytes inside of
[   20.072124]  allocated 120-byte region [fff00000c6492700, fff00000c6492778)
[   20.073118] 
[   20.073469] The buggy address belongs to the physical page:
[   20.074030] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106492
[   20.074738] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.075831] page_type: f5(slab)
[   20.076232] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.076982] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   20.077629] page dumped because: kasan: bad access detected
[   20.078125] 
[   20.078301] Memory state around the buggy address:
[   20.078853]  fff00000c6492600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.079700]  fff00000c6492680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.080487] >fff00000c6492700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.081080]                                                                 ^
[   20.081710]  fff00000c6492780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.082444]  fff00000c6492800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.083049] ==================================================================

[   12.230510] ==================================================================
[   12.230972] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x167/0x330
[   12.231911] Write of size 16 at addr ffff88810297ab69 by task kunit_try_catch/183
[   12.232413] 
[   12.232548] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   12.232622] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.232643] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.232692] Call Trace:
[   12.232716]  <TASK>
[   12.232753]  dump_stack_lvl+0x73/0xb0
[   12.232818]  print_report+0xd1/0x640
[   12.232862]  ? __virt_addr_valid+0x1db/0x2d0
[   12.232904]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.232938]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.232971]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.233011]  kasan_report+0x140/0x180
[   12.233109]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.233173]  kasan_check_range+0x10c/0x1c0
[   12.233210]  __asan_memset+0x27/0x50
[   12.233247]  kmalloc_oob_memset_16+0x167/0x330
[   12.233284]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   12.233470]  ? __schedule+0xc49/0x27a0
[   12.233495]  ? __pfx_read_tsc+0x10/0x10
[   12.233514]  ? ktime_get_ts64+0x84/0x230
[   12.233540]  kunit_try_run_case+0x1a6/0x480
[   12.233563]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.233580]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.233599]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.233620]  ? __kthread_parkme+0x82/0x160
[   12.233639]  ? preempt_count_sub+0x50/0x80
[   12.233682]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.233703]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.233725]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.233747]  kthread+0x257/0x310
[   12.233764]  ? __pfx_kthread+0x10/0x10
[   12.233781]  ret_from_fork+0x41/0x80
[   12.233798]  ? __pfx_kthread+0x10/0x10
[   12.233815]  ret_from_fork_asm+0x1a/0x30
[   12.233844]  </TASK>
[   12.233857] 
[   12.244345] Allocated by task 183:
[   12.244635]  kasan_save_stack+0x45/0x70
[   12.244969]  kasan_save_track+0x18/0x40
[   12.245467]  kasan_save_alloc_info+0x3b/0x50
[   12.245827]  __kasan_kmalloc+0xb7/0xc0
[   12.246236]  __kmalloc_cache_noprof+0x168/0x350
[   12.246448]  kmalloc_oob_memset_16+0xad/0x330
[   12.246642]  kunit_try_run_case+0x1a6/0x480
[   12.247091]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.247326]  kthread+0x257/0x310
[   12.247712]  ret_from_fork+0x41/0x80
[   12.247941]  ret_from_fork_asm+0x1a/0x30
[   12.248241] 
[   12.248370] The buggy address belongs to the object at ffff88810297ab00
[   12.248370]  which belongs to the cache kmalloc-128 of size 128
[   12.249284] The buggy address is located 105 bytes inside of
[   12.249284]  allocated 120-byte region [ffff88810297ab00, ffff88810297ab78)
[   12.249744] 
[   12.249917] The buggy address belongs to the physical page:
[   12.250580] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10297a
[   12.250880] flags: 0x200000000000000(node=0|zone=2)
[   12.251258] page_type: f5(slab)
[   12.251513] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.251797] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   12.252437] page dumped because: kasan: bad access detected
[   12.252814] 
[   12.252914] Memory state around the buggy address:
[   12.253267]  ffff88810297aa00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.253737]  ffff88810297aa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.254393] >ffff88810297ab00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.254740]                                                                 ^
[   12.255243]  ffff88810297ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.255666]  ffff88810297ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.255967] ==================================================================