Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.466586] ==================================================================
[   21.468142] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x15c/0x310
[   21.469288] Write of size 16 at addr fff00000c41c1969 by task kunit_try_catch/166
[   21.470122] 
[   21.470478] CPU: 0 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   21.470678] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.470751] Hardware name: linux,dummy-virt (DT)
[   21.470837] Call trace:
[   21.470905]  dump_backtrace+0x9c/0x128
[   21.471045]  show_stack+0x20/0x38
[   21.471151]  dump_stack_lvl+0x8c/0xd0
[   21.471268]  print_report+0x118/0x5f0
[   21.471420]  kasan_report+0xdc/0x128
[   21.471529]  kasan_check_range+0x100/0x1a8
[   21.471632]  __asan_memset+0x34/0x78
[   21.471730]  kmalloc_oob_memset_16+0x15c/0x310
[   21.471837]  kunit_try_run_case+0x170/0x3f0
[   21.471937]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.472066]  kthread+0x24c/0x2d0
[   21.472165]  ret_from_fork+0x10/0x20
[   21.472246] 
[   21.480803] Allocated by task 166:
[   21.481201]  kasan_save_stack+0x3c/0x68
[   21.481986]  kasan_save_track+0x20/0x40
[   21.482673]  kasan_save_alloc_info+0x40/0x58
[   21.483234]  __kasan_kmalloc+0xd4/0xd8
[   21.484022]  __kmalloc_cache_noprof+0x154/0x320
[   21.484561]  kmalloc_oob_memset_16+0xb0/0x310
[   21.485125]  kunit_try_run_case+0x170/0x3f0
[   21.485629]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.486251]  kthread+0x24c/0x2d0
[   21.486705]  ret_from_fork+0x10/0x20
[   21.487190] 
[   21.488363] The buggy address belongs to the object at fff00000c41c1900
[   21.488363]  which belongs to the cache kmalloc-128 of size 128
[   21.489371] The buggy address is located 105 bytes inside of
[   21.489371]  allocated 120-byte region [fff00000c41c1900, fff00000c41c1978)
[   21.490543] 
[   21.490859] The buggy address belongs to the physical page:
[   21.491443] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1041c1
[   21.492348] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.493474] page_type: f5(slab)
[   21.493920] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   21.494574] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   21.495298] page dumped because: kasan: bad access detected
[   21.496570] 
[   21.497085] Memory state around the buggy address:
[   21.497518]  fff00000c41c1800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
[   21.498417]  fff00000c41c1880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.499349] >fff00000c41c1900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.500301]                                                                 ^
[   21.501062]  fff00000c41c1980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.502021]  fff00000c41c1a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.502819] ==================================================================

[   17.822591] ==================================================================
[   17.823705] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x167/0x330
[   17.824381] Write of size 16 at addr ffff888102921c69 by task kunit_try_catch/183
[   17.825724] 
[   17.826421] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   17.826484] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.826508] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.826566] Call Trace:
[   17.826604]  <TASK>
[   17.826650]  dump_stack_lvl+0x73/0xb0
[   17.826923]  print_report+0xd1/0x640
[   17.826962]  ? __virt_addr_valid+0x1db/0x2d0
[   17.827000]  ? kmalloc_oob_memset_16+0x167/0x330
[   17.827033]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.827066]  ? kmalloc_oob_memset_16+0x167/0x330
[   17.827100]  kasan_report+0x140/0x180
[   17.827134]  ? kmalloc_oob_memset_16+0x167/0x330
[   17.827177]  kasan_check_range+0x10c/0x1c0
[   17.827207]  __asan_memset+0x27/0x50
[   17.827281]  kmalloc_oob_memset_16+0x167/0x330
[   17.827320]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   17.827355]  ? __schedule+0xc49/0x27a0
[   17.827384]  ? __pfx_read_tsc+0x10/0x10
[   17.827413]  ? ktime_get_ts64+0x84/0x230
[   17.827450]  kunit_try_run_case+0x1a6/0x480
[   17.827481]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.827509]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   17.827537]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.827572]  ? __kthread_parkme+0x82/0x160
[   17.827599]  ? preempt_count_sub+0x50/0x80
[   17.827630]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.827657]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.827694]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.827729]  kthread+0x257/0x310
[   17.827755]  ? __pfx_kthread+0x10/0x10
[   17.827781]  ret_from_fork+0x41/0x80
[   17.827818]  ? __pfx_kthread+0x10/0x10
[   17.827873]  ret_from_fork_asm+0x1a/0x30
[   17.827916]  </TASK>
[   17.827930] 
[   17.843560] Allocated by task 183:
[   17.844077]  kasan_save_stack+0x45/0x70
[   17.844602]  kasan_save_track+0x18/0x40
[   17.845182]  kasan_save_alloc_info+0x3b/0x50
[   17.845624]  __kasan_kmalloc+0xb7/0xc0
[   17.846149]  __kmalloc_cache_noprof+0x168/0x350
[   17.846700]  kmalloc_oob_memset_16+0xad/0x330
[   17.847283]  kunit_try_run_case+0x1a6/0x480
[   17.847697]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.848352]  kthread+0x257/0x310
[   17.848670]  ret_from_fork+0x41/0x80
[   17.849256]  ret_from_fork_asm+0x1a/0x30
[   17.849712] 
[   17.850049] The buggy address belongs to the object at ffff888102921c00
[   17.850049]  which belongs to the cache kmalloc-128 of size 128
[   17.850925] The buggy address is located 105 bytes inside of
[   17.850925]  allocated 120-byte region [ffff888102921c00, ffff888102921c78)
[   17.851889] 
[   17.852070] The buggy address belongs to the physical page:
[   17.852572] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102921
[   17.853403] flags: 0x200000000000000(node=0|zone=2)
[   17.853984] page_type: f5(slab)
[   17.854302] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.854998] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   17.855655] page dumped because: kasan: bad access detected
[   17.856187] 
[   17.856457] Memory state around the buggy address:
[   17.856980]  ffff888102921b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.857548]  ffff888102921b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.858139] >ffff888102921c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.858795]                                                                 ^
[   17.859447]  ffff888102921c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.860064]  ffff888102921d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.860653] ==================================================================