Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.350217] ==================================================================
[   19.350423] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   19.350482] Write of size 16 at addr fff00000c5708169 by task kunit_try_catch/178
[   19.350658] 
[   19.350858] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.351035] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.351082] Hardware name: linux,dummy-virt (DT)
[   19.351146] Call trace:
[   19.351522]  show_stack+0x20/0x38 (C)
[   19.351618]  dump_stack_lvl+0x8c/0xd0
[   19.351689]  print_report+0x118/0x608
[   19.351881]  kasan_report+0xdc/0x128
[   19.352063]  kasan_check_range+0x100/0x1a8
[   19.352209]  __asan_memset+0x34/0x78
[   19.352252]  kmalloc_oob_memset_16+0x150/0x2f8
[   19.352314]  kunit_try_run_case+0x170/0x3f0
[   19.352365]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.352414]  kthread+0x328/0x630
[   19.352730]  ret_from_fork+0x10/0x20
[   19.352926] 
[   19.353024] Allocated by task 178:
[   19.353205]  kasan_save_stack+0x3c/0x68
[   19.353291]  kasan_save_track+0x20/0x40
[   19.353328]  kasan_save_alloc_info+0x40/0x58
[   19.353654]  __kasan_kmalloc+0xd4/0xd8
[   19.353847]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.354019]  kmalloc_oob_memset_16+0xb0/0x2f8
[   19.354140]  kunit_try_run_case+0x170/0x3f0
[   19.354316]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.354471]  kthread+0x328/0x630
[   19.354602]  ret_from_fork+0x10/0x20
[   19.354767] 
[   19.354819] The buggy address belongs to the object at fff00000c5708100
[   19.354819]  which belongs to the cache kmalloc-128 of size 128
[   19.355345] The buggy address is located 105 bytes inside of
[   19.355345]  allocated 120-byte region [fff00000c5708100, fff00000c5708178)
[   19.355576] 
[   19.355698] The buggy address belongs to the physical page:
[   19.355776] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105708
[   19.355918] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.355964] page_type: f5(slab)
[   19.356128] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.356360] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.356488] page dumped because: kasan: bad access detected
[   19.356565] 
[   19.356693] Memory state around the buggy address:
[   19.356858]  fff00000c5708000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.356952]  fff00000c5708080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.357214] >fff00000c5708100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.357531]                                                                 ^
[   19.357682]  fff00000c5708180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.357788]  fff00000c5708200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.357864] ==================================================================

[   13.075316] ==================================================================
[   13.075849] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   13.076201] Write of size 16 at addr ffff888102af6369 by task kunit_try_catch/195
[   13.076627] 
[   13.076909] CPU: 0 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.077002] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.077015] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.077035] Call Trace:
[   13.077078]  <TASK>
[   13.077093]  dump_stack_lvl+0x73/0xb0
[   13.077122]  print_report+0xd1/0x650
[   13.077155]  ? __virt_addr_valid+0x1db/0x2d0
[   13.077177]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.077197]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.077221]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.077242]  kasan_report+0x141/0x180
[   13.077263]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.077288]  kasan_check_range+0x10c/0x1c0
[   13.077310]  __asan_memset+0x27/0x50
[   13.077329]  kmalloc_oob_memset_16+0x166/0x330
[   13.077350]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   13.077373]  ? __schedule+0x10cc/0x2b60
[   13.077394]  ? __pfx_read_tsc+0x10/0x10
[   13.077414]  ? ktime_get_ts64+0x86/0x230
[   13.077437]  kunit_try_run_case+0x1a5/0x480
[   13.077460]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.077481]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.077503]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.077525]  ? __kthread_parkme+0x82/0x180
[   13.077544]  ? preempt_count_sub+0x50/0x80
[   13.077573]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.077595]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.077616]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.077638]  kthread+0x337/0x6f0
[   13.077656]  ? trace_preempt_on+0x20/0xc0
[   13.077677]  ? __pfx_kthread+0x10/0x10
[   13.077697]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.077716]  ? calculate_sigpending+0x7b/0xa0
[   13.077738]  ? __pfx_kthread+0x10/0x10
[   13.077759]  ret_from_fork+0x116/0x1d0
[   13.077776]  ? __pfx_kthread+0x10/0x10
[   13.077795]  ret_from_fork_asm+0x1a/0x30
[   13.077825]  </TASK>
[   13.077836] 
[   13.089603] Allocated by task 195:
[   13.089738]  kasan_save_stack+0x45/0x70
[   13.089880]  kasan_save_track+0x18/0x40
[   13.090009]  kasan_save_alloc_info+0x3b/0x50
[   13.090692]  __kasan_kmalloc+0xb7/0xc0
[   13.091104]  __kmalloc_cache_noprof+0x189/0x420
[   13.091604]  kmalloc_oob_memset_16+0xac/0x330
[   13.092150]  kunit_try_run_case+0x1a5/0x480
[   13.092658]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.093204]  kthread+0x337/0x6f0
[   13.093334]  ret_from_fork+0x116/0x1d0
[   13.093466]  ret_from_fork_asm+0x1a/0x30
[   13.093905] 
[   13.094275] The buggy address belongs to the object at ffff888102af6300
[   13.094275]  which belongs to the cache kmalloc-128 of size 128
[   13.095567] The buggy address is located 105 bytes inside of
[   13.095567]  allocated 120-byte region [ffff888102af6300, ffff888102af6378)
[   13.095934] 
[   13.096008] The buggy address belongs to the physical page:
[   13.096311] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102af6
[   13.097200] flags: 0x200000000000000(node=0|zone=2)
[   13.097714] page_type: f5(slab)
[   13.098077] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.099147] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.099953] page dumped because: kasan: bad access detected
[   13.100213] 
[   13.100462] Memory state around the buggy address:
[   13.100991]  ffff888102af6200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.101687]  ffff888102af6280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.102346] >ffff888102af6300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.102888]                                                                 ^
[   13.103525]  ffff888102af6380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.103951]  ffff888102af6400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.104384] ==================================================================