Hay
Date
June 18, 2025, 6:43 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.417506] ==================================================================
[   20.417739] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   20.418026] Write of size 8 at addr fff00000c6423971 by task kunit_try_catch/186
[   20.418317] 
[   20.418411] CPU: 0 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT 
[   20.418648] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.418724] Hardware name: linux,dummy-virt (DT)
[   20.418778] Call trace:
[   20.418818]  show_stack+0x20/0x38 (C)
[   20.418924]  dump_stack_lvl+0x8c/0xd0
[   20.419113]  print_report+0x118/0x608
[   20.419321]  kasan_report+0xdc/0x128
[   20.419520]  kasan_check_range+0x100/0x1a8
[   20.419778]  __asan_memset+0x34/0x78
[   20.420063]  kmalloc_oob_memset_8+0x150/0x2f8
[   20.420237]  kunit_try_run_case+0x170/0x3f0
[   20.420595]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.420851]  kthread+0x328/0x630
[   20.421114]  ret_from_fork+0x10/0x20
[   20.421226] 
[   20.421276] Allocated by task 186:
[   20.421621]  kasan_save_stack+0x3c/0x68
[   20.421720]  kasan_save_track+0x20/0x40
[   20.421951]  kasan_save_alloc_info+0x40/0x58
[   20.422118]  __kasan_kmalloc+0xd4/0xd8
[   20.422194]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.422275]  kmalloc_oob_memset_8+0xb0/0x2f8
[   20.422358]  kunit_try_run_case+0x170/0x3f0
[   20.422552]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.422771]  kthread+0x328/0x630
[   20.422947]  ret_from_fork+0x10/0x20
[   20.423055] 
[   20.423277] The buggy address belongs to the object at fff00000c6423900
[   20.423277]  which belongs to the cache kmalloc-128 of size 128
[   20.423412] The buggy address is located 113 bytes inside of
[   20.423412]  allocated 120-byte region [fff00000c6423900, fff00000c6423978)
[   20.423536] 
[   20.423579] The buggy address belongs to the physical page:
[   20.423764] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106423
[   20.424002] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.424254] page_type: f5(slab)
[   20.424402] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.424767] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.424861] page dumped because: kasan: bad access detected
[   20.424931] 
[   20.424972] Memory state around the buggy address:
[   20.425054]  fff00000c6423800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.425152]  fff00000c6423880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.425288] >fff00000c6423900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.425362]                                                                 ^
[   20.425569]  fff00000c6423980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.425891]  fff00000c6423a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.425974] ==================================================================

[   11.261698] ==================================================================
[   11.262351] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   11.262660] Write of size 8 at addr ffff888102c54871 by task kunit_try_catch/202
[   11.262951] 
[   11.263050] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) 
[   11.263097] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.263108] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.263127] Call Trace:
[   11.263139]  <TASK>
[   11.263154]  dump_stack_lvl+0x73/0xb0
[   11.263181]  print_report+0xd1/0x650
[   11.263201]  ? __virt_addr_valid+0x1db/0x2d0
[   11.263258]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.263279]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.263303]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.263323]  kasan_report+0x141/0x180
[   11.263364]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.263402]  kasan_check_range+0x10c/0x1c0
[   11.263437]  __asan_memset+0x27/0x50
[   11.263459]  kmalloc_oob_memset_8+0x166/0x330
[   11.263492]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   11.263513]  ? __schedule+0x10cc/0x2b60
[   11.263533]  ? __pfx_read_tsc+0x10/0x10
[   11.263554]  ? ktime_get_ts64+0x86/0x230
[   11.263578]  kunit_try_run_case+0x1a5/0x480
[   11.263600]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.263620]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.263642]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.263663]  ? __kthread_parkme+0x82/0x180
[   11.263682]  ? preempt_count_sub+0x50/0x80
[   11.263704]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.263726]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.263747]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.263768]  kthread+0x337/0x6f0
[   11.263787]  ? trace_preempt_on+0x20/0xc0
[   11.263809]  ? __pfx_kthread+0x10/0x10
[   11.263828]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.263847]  ? calculate_sigpending+0x7b/0xa0
[   11.263869]  ? __pfx_kthread+0x10/0x10
[   11.263889]  ret_from_fork+0x116/0x1d0
[   11.263906]  ? __pfx_kthread+0x10/0x10
[   11.263925]  ret_from_fork_asm+0x1a/0x30
[   11.263953]  </TASK>
[   11.263963] 
[   11.271810] Allocated by task 202:
[   11.272012]  kasan_save_stack+0x45/0x70
[   11.272264]  kasan_save_track+0x18/0x40
[   11.272540]  kasan_save_alloc_info+0x3b/0x50
[   11.272764]  __kasan_kmalloc+0xb7/0xc0
[   11.272953]  __kmalloc_cache_noprof+0x189/0x420
[   11.273162]  kmalloc_oob_memset_8+0xac/0x330
[   11.273373]  kunit_try_run_case+0x1a5/0x480
[   11.273734]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.274035]  kthread+0x337/0x6f0
[   11.274224]  ret_from_fork+0x116/0x1d0
[   11.274521]  ret_from_fork_asm+0x1a/0x30
[   11.274742] 
[   11.274819] The buggy address belongs to the object at ffff888102c54800
[   11.274819]  which belongs to the cache kmalloc-128 of size 128
[   11.275286] The buggy address is located 113 bytes inside of
[   11.275286]  allocated 120-byte region [ffff888102c54800, ffff888102c54878)
[   11.275785] 
[   11.275849] The buggy address belongs to the physical page:
[   11.276015] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c54
[   11.276360] flags: 0x200000000000000(node=0|zone=2)
[   11.276587] page_type: f5(slab)
[   11.276752] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.277078] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.277653] page dumped because: kasan: bad access detected
[   11.277912] 
[   11.277999] Memory state around the buggy address:
[   11.278245]  ffff888102c54700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.278603]  ffff888102c54780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.278954] >ffff888102c54800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.279164]                                                                 ^
[   11.279399]  ffff888102c54880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.279687]  ffff888102c54900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.280022] ==================================================================