Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.443593] ==================================================================
[   21.443791] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   21.443949] Write of size 16 at addr fff00000c66b1020 by task kunit_try_catch/166
[   21.444074] 
[   21.444163] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   21.444375] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.444519] Hardware name: linux,dummy-virt (DT)
[   21.444594] Call trace:
[   21.444649]  show_stack+0x20/0x38 (C)
[   21.444829]  dump_stack_lvl+0x8c/0xd0
[   21.444971]  print_report+0x118/0x608
[   21.445083]  kasan_report+0xdc/0x128
[   21.445387]  __asan_report_store16_noabort+0x20/0x30
[   21.445763]  kmalloc_oob_16+0x3a0/0x3f8
[   21.445897]  kunit_try_run_case+0x170/0x3f0
[   21.446191]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.446341]  kthread+0x328/0x630
[   21.446480]  ret_from_fork+0x10/0x20
[   21.446590] 
[   21.446633] Allocated by task 166:
[   21.446704]  kasan_save_stack+0x3c/0x68
[   21.446840]  kasan_save_track+0x20/0x40
[   21.446924]  kasan_save_alloc_info+0x40/0x58
[   21.447276]  __kasan_kmalloc+0xd4/0xd8
[   21.447379]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.447518]  kmalloc_oob_16+0xb4/0x3f8
[   21.447596]  kunit_try_run_case+0x170/0x3f0
[   21.447744]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.447864]  kthread+0x328/0x630
[   21.447944]  ret_from_fork+0x10/0x20
[   21.448026] 
[   21.448072] The buggy address belongs to the object at fff00000c66b1020
[   21.448072]  which belongs to the cache kmalloc-16 of size 16
[   21.448304] The buggy address is located 0 bytes inside of
[   21.448304]  allocated 13-byte region [fff00000c66b1020, fff00000c66b102d)
[   21.448684] 
[   21.448837] The buggy address belongs to the physical page:
[   21.448924] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066b1
[   21.449054] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.449184] page_type: f5(slab)
[   21.449284] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   21.449418] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   21.449519] page dumped because: kasan: bad access detected
[   21.449600] 
[   21.449654] Memory state around the buggy address:
[   21.449731]  fff00000c66b0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.449907]  fff00000c66b0f80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
[   21.450202] >fff00000c66b1000: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   21.450367]                                   ^
[   21.450452]  fff00000c66b1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.450600]  fff00000c66b1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.450695] ==================================================================


[   10.868775] ==================================================================
[   10.869298] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   10.869666] Write of size 16 at addr ffff888101c55f60 by task kunit_try_catch/183
[   10.869977] 
[   10.870070] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.870117] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.870129] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.870492] Call Trace:
[   10.870505]  <TASK>
[   10.870521]  dump_stack_lvl+0x73/0xb0
[   10.870555]  print_report+0xd1/0x650
[   10.870578]  ? __virt_addr_valid+0x1db/0x2d0
[   10.870602]  ? kmalloc_oob_16+0x452/0x4a0
[   10.870634]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.870656]  ? kmalloc_oob_16+0x452/0x4a0
[   10.870677]  kasan_report+0x141/0x180
[   10.870700]  ? kmalloc_oob_16+0x452/0x4a0
[   10.870725]  __asan_report_store16_noabort+0x1b/0x30
[   10.870747]  kmalloc_oob_16+0x452/0x4a0
[   10.870787]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   10.870819]  ? __schedule+0x10cc/0x2b60
[   10.870843]  ? __pfx_read_tsc+0x10/0x10
[   10.870882]  ? ktime_get_ts64+0x86/0x230
[   10.870906]  kunit_try_run_case+0x1a5/0x480
[   10.870929]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.870948]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.870973]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.871006]  ? __kthread_parkme+0x82/0x180
[   10.871092]  ? preempt_count_sub+0x50/0x80
[   10.871115]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.871136]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.871160]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.871183]  kthread+0x337/0x6f0
[   10.871203]  ? trace_preempt_on+0x20/0xc0
[   10.871225]  ? __pfx_kthread+0x10/0x10
[   10.871245]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.871268]  ? calculate_sigpending+0x7b/0xa0
[   10.871291]  ? __pfx_kthread+0x10/0x10
[   10.871313]  ret_from_fork+0x116/0x1d0
[   10.871331]  ? __pfx_kthread+0x10/0x10
[   10.871351]  ret_from_fork_asm+0x1a/0x30
[   10.871381]  </TASK>
[   10.871392] 
[   10.880719] Allocated by task 183:
[   10.881154]  kasan_save_stack+0x45/0x70
[   10.881472]  kasan_save_track+0x18/0x40
[   10.881854]  kasan_save_alloc_info+0x3b/0x50
[   10.882132]  __kasan_kmalloc+0xb7/0xc0
[   10.882309]  __kmalloc_cache_noprof+0x189/0x420
[   10.882514]  kmalloc_oob_16+0xa8/0x4a0
[   10.882706]  kunit_try_run_case+0x1a5/0x480
[   10.883180]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.883489]  kthread+0x337/0x6f0
[   10.883902]  ret_from_fork+0x116/0x1d0
[   10.884315]  ret_from_fork_asm+0x1a/0x30
[   10.884635] 
[   10.884885] The buggy address belongs to the object at ffff888101c55f60
[   10.884885]  which belongs to the cache kmalloc-16 of size 16
[   10.885800] The buggy address is located 0 bytes inside of
[   10.885800]  allocated 13-byte region [ffff888101c55f60, ffff888101c55f6d)
[   10.886698] 
[   10.886947] The buggy address belongs to the physical page:
[   10.887455] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c55
[   10.887950] flags: 0x200000000000000(node=0|zone=2)
[   10.888402] page_type: f5(slab)
[   10.888868] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   10.889316] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   10.889766] page dumped because: kasan: bad access detected
[   10.890031] 
[   10.890116] Memory state around the buggy address:
[   10.890311]  ffff888101c55e00: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   10.890885]  ffff888101c55e80: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc
[   10.891325] >ffff888101c55f00: 00 06 fc fc 00 05 fc fc fa fb fc fc 00 05 fc fc
[   10.891863]                                                           ^
[   10.892583]  ffff888101c55f80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.893251]  ffff888101c56000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.893543] ==================================================================