Hay
Date
May 12, 2025, 6:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.735932] ==================================================================
[   18.736647] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   18.737669] Write of size 4 at addr fff00000c5a05275 by task kunit_try_catch/163
[   18.738176] 
[   18.738828] CPU: 0 UID: 0 PID: 163 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   18.739041] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.739133] Hardware name: linux,dummy-virt (DT)
[   18.739215] Call trace:
[   18.739275]  show_stack+0x20/0x38 (C)
[   18.739372]  dump_stack_lvl+0x8c/0xd0
[   18.739428]  print_report+0x118/0x608
[   18.739480]  kasan_report+0xdc/0x128
[   18.739530]  kasan_check_range+0x100/0x1a8
[   18.739582]  __asan_memset+0x34/0x78
[   18.739630]  kmalloc_oob_memset_4+0x150/0x300
[   18.739680]  kunit_try_run_case+0x170/0x3f0
[   18.739733]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.739809]  kthread+0x318/0x620
[   18.739859]  ret_from_fork+0x10/0x20
[   18.739915] 
[   18.744553] Allocated by task 163:
[   18.745031]  kasan_save_stack+0x3c/0x68
[   18.745553]  kasan_save_track+0x20/0x40
[   18.746025]  kasan_save_alloc_info+0x40/0x58
[   18.746450]  __kasan_kmalloc+0xd4/0xd8
[   18.746977]  __kmalloc_cache_noprof+0x15c/0x3c0
[   18.747405]  kmalloc_oob_memset_4+0xb0/0x300
[   18.747957]  kunit_try_run_case+0x170/0x3f0
[   18.748410]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.749007]  kthread+0x318/0x620
[   18.749366]  ret_from_fork+0x10/0x20
[   18.749712] 
[   18.749961] The buggy address belongs to the object at fff00000c5a05200
[   18.749961]  which belongs to the cache kmalloc-128 of size 128
[   18.751337] The buggy address is located 117 bytes inside of
[   18.751337]  allocated 120-byte region [fff00000c5a05200, fff00000c5a05278)
[   18.752255] 
[   18.752572] The buggy address belongs to the physical page:
[   18.753128] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a05
[   18.753786] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.754405] page_type: f5(slab)
[   18.754771] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.755449] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.756069] page dumped because: kasan: bad access detected
[   18.756530] 
[   18.756794] Memory state around the buggy address:
[   18.757286]  fff00000c5a05100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.757889]  fff00000c5a05180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.758498] >fff00000c5a05200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.759088]                                                                 ^
[   18.759661]  fff00000c5a05280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.760249]  fff00000c5a05300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.760812] ==================================================================

[   12.515711] ==================================================================
[   12.516223] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x167/0x330
[   12.517170] Write of size 4 at addr ffff888101b0eb75 by task kunit_try_catch/182
[   12.518175] 
[   12.518277] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   12.518326] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.518383] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.518405] Call Trace:
[   12.518420]  <TASK>
[   12.518467]  dump_stack_lvl+0x73/0xb0
[   12.518498]  print_report+0xd1/0x650
[   12.518675]  ? __virt_addr_valid+0x1db/0x2d0
[   12.518705]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.518727]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.518753]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.518775]  kasan_report+0x140/0x180
[   12.518797]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.518822]  kasan_check_range+0x10c/0x1c0
[   12.518857]  __asan_memset+0x27/0x50
[   12.518882]  kmalloc_oob_memset_4+0x167/0x330
[   12.518904]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.518926]  ? __schedule+0xce8/0x2840
[   12.518950]  ? __pfx_read_tsc+0x10/0x10
[   12.518972]  ? ktime_get_ts64+0x86/0x230
[   12.519272]  kunit_try_run_case+0x1a6/0x480
[   12.519312]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.519335]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.519356]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.519381]  ? __kthread_parkme+0x82/0x160
[   12.519404]  ? preempt_count_sub+0x50/0x80
[   12.519429]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.519451]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.519476]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.519501]  kthread+0x324/0x6e0
[   12.519522]  ? trace_preempt_on+0x20/0xc0
[   12.519546]  ? __pfx_kthread+0x10/0x10
[   12.519567]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.519589]  ? calculate_sigpending+0x7b/0xa0
[   12.519611]  ? __pfx_kthread+0x10/0x10
[   12.519633]  ret_from_fork+0x41/0x80
[   12.519652]  ? __pfx_kthread+0x10/0x10
[   12.519673]  ret_from_fork_asm+0x1a/0x30
[   12.519704]  </TASK>
[   12.519716] 
[   12.530775] Allocated by task 182:
[   12.530996]  kasan_save_stack+0x45/0x70
[   12.531833]  kasan_save_track+0x18/0x40
[   12.532032]  kasan_save_alloc_info+0x3b/0x50
[   12.532209]  __kasan_kmalloc+0xb7/0xc0
[   12.532405]  __kmalloc_cache_noprof+0x18a/0x420
[   12.532621]  kmalloc_oob_memset_4+0xad/0x330
[   12.532821]  kunit_try_run_case+0x1a6/0x480
[   12.533035]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.533723]  kthread+0x324/0x6e0
[   12.533901]  ret_from_fork+0x41/0x80
[   12.534303]  ret_from_fork_asm+0x1a/0x30
[   12.534500] 
[   12.534749] The buggy address belongs to the object at ffff888101b0eb00
[   12.534749]  which belongs to the cache kmalloc-128 of size 128
[   12.535608] The buggy address is located 117 bytes inside of
[   12.535608]  allocated 120-byte region [ffff888101b0eb00, ffff888101b0eb78)
[   12.536516] 
[   12.536619] The buggy address belongs to the physical page:
[   12.536854] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101b0e
[   12.537504] flags: 0x200000000000000(node=0|zone=2)
[   12.537693] page_type: f5(slab)
[   12.537973] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.538410] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.538738] page dumped because: kasan: bad access detected
[   12.538988] 
[   12.539067] Memory state around the buggy address:
[   12.539888]  ffff888101b0ea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.540330]  ffff888101b0ea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.540597] >ffff888101b0eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.540931]                                                                 ^
[   12.541591]  ffff888101b0eb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.542012]  ffff888101b0ec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.542464] ==================================================================