Hay
Date
May 26, 2025, 9:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.621670] ==================================================================
[   17.621803] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   17.621925] Write of size 16 at addr fff00000c78c2169 by task kunit_try_catch/178
[   17.622035] 
[   17.622114] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT 
[   17.622302] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.623080] Hardware name: linux,dummy-virt (DT)
[   17.623215] Call trace:
[   17.623266]  show_stack+0x20/0x38 (C)
[   17.623402]  dump_stack_lvl+0x8c/0xd0
[   17.623513]  print_report+0x118/0x608
[   17.623599]  kasan_report+0xdc/0x128
[   17.623678]  kasan_check_range+0x100/0x1a8
[   17.623768]  __asan_memset+0x34/0x78
[   17.623939]  kmalloc_oob_memset_16+0x150/0x2f8
[   17.624178]  kunit_try_run_case+0x170/0x3f0
[   17.624374]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.624967]  kthread+0x328/0x630
[   17.625371]  ret_from_fork+0x10/0x20
[   17.625597] 
[   17.625666] Allocated by task 178:
[   17.625831]  kasan_save_stack+0x3c/0x68
[   17.625963]  kasan_save_track+0x20/0x40
[   17.626159]  kasan_save_alloc_info+0x40/0x58
[   17.626242]  __kasan_kmalloc+0xd4/0xd8
[   17.626484]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.626716]  kmalloc_oob_memset_16+0xb0/0x2f8
[   17.626964]  kunit_try_run_case+0x170/0x3f0
[   17.627084]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.627174]  kthread+0x328/0x630
[   17.627394]  ret_from_fork+0x10/0x20
[   17.627484] 
[   17.627728] The buggy address belongs to the object at fff00000c78c2100
[   17.627728]  which belongs to the cache kmalloc-128 of size 128
[   17.627861] The buggy address is located 105 bytes inside of
[   17.627861]  allocated 120-byte region [fff00000c78c2100, fff00000c78c2178)
[   17.627981] 
[   17.628022] The buggy address belongs to the physical page:
[   17.628081] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078c2
[   17.628233] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.628376] page_type: f5(slab)
[   17.628630] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.628977] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.629070] page dumped because: kasan: bad access detected
[   17.629197] 
[   17.629370] Memory state around the buggy address:
[   17.629436]  fff00000c78c2000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.629524]  fff00000c78c2080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.629781] >fff00000c78c2100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.630003]                                                                 ^
[   17.630216]  fff00000c78c2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.630347]  fff00000c78c2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.630421] ==================================================================


[   11.155589] ==================================================================
[   11.155988] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   11.156230] Write of size 16 at addr ffff888102826169 by task kunit_try_catch/196
[   11.157160] 
[   11.157415] CPU: 0 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) 
[   11.157464] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.157476] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.157498] Call Trace:
[   11.157512]  <TASK>
[   11.157528]  dump_stack_lvl+0x73/0xb0
[   11.157558]  print_report+0xd1/0x650
[   11.157581]  ? __virt_addr_valid+0x1db/0x2d0
[   11.157604]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.157625]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.157730]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.157759]  kasan_report+0x141/0x180
[   11.157782]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.157808]  kasan_check_range+0x10c/0x1c0
[   11.157831]  __asan_memset+0x27/0x50
[   11.157851]  kmalloc_oob_memset_16+0x166/0x330
[   11.157873]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   11.157895]  ? __schedule+0x10cc/0x2b60
[   11.157920]  ? __pfx_read_tsc+0x10/0x10
[   11.157941]  ? ktime_get_ts64+0x86/0x230
[   11.157965]  kunit_try_run_case+0x1a5/0x480
[   11.158114]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.158143]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.158170]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.158195]  ? __kthread_parkme+0x82/0x180
[   11.158215]  ? preempt_count_sub+0x50/0x80
[   11.158239]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.158259]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.158283]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.158307]  kthread+0x337/0x6f0
[   11.158326]  ? trace_preempt_on+0x20/0xc0
[   11.158348]  ? __pfx_kthread+0x10/0x10
[   11.158368]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.158404]  ? calculate_sigpending+0x7b/0xa0
[   11.158428]  ? __pfx_kthread+0x10/0x10
[   11.158448]  ret_from_fork+0x116/0x1d0
[   11.158466]  ? __pfx_kthread+0x10/0x10
[   11.158486]  ret_from_fork_asm+0x1a/0x30
[   11.158516]  </TASK>
[   11.158527] 
[   11.168908] Allocated by task 196:
[   11.169102]  kasan_save_stack+0x45/0x70
[   11.169332]  kasan_save_track+0x18/0x40
[   11.169546]  kasan_save_alloc_info+0x3b/0x50
[   11.169785]  __kasan_kmalloc+0xb7/0xc0
[   11.170016]  __kmalloc_cache_noprof+0x189/0x420
[   11.170220]  kmalloc_oob_memset_16+0xac/0x330
[   11.170451]  kunit_try_run_case+0x1a5/0x480
[   11.170660]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.170898]  kthread+0x337/0x6f0
[   11.171041]  ret_from_fork+0x116/0x1d0
[   11.171237]  ret_from_fork_asm+0x1a/0x30
[   11.171486] 
[   11.171628] The buggy address belongs to the object at ffff888102826100
[   11.171628]  which belongs to the cache kmalloc-128 of size 128
[   11.172197] The buggy address is located 105 bytes inside of
[   11.172197]  allocated 120-byte region [ffff888102826100, ffff888102826178)
[   11.172573] 
[   11.172672] The buggy address belongs to the physical page:
[   11.172981] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102826
[   11.173639] flags: 0x200000000000000(node=0|zone=2)
[   11.173873] page_type: f5(slab)
[   11.174048] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.174353] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.174780] page dumped because: kasan: bad access detected
[   11.174955] 
[   11.175024] Memory state around the buggy address:
[   11.175343]  ffff888102826000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.175751]  ffff888102826080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.176119] >ffff888102826100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.176875]                                                                 ^
[   11.177764]  ffff888102826180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.178457]  ffff888102826200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.179319] ==================================================================