Hay
Date
July 23, 2025, 3:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.046623] ==================================================================
[   30.046743] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   30.046812] Read of size 1 at addr fff00000c8603e1f by task kunit_try_catch/171
[   30.046861] 
[   30.046925] CPU: 0 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   30.047013] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.047039] Hardware name: linux,dummy-virt (DT)
[   30.047070] Call trace:
[   30.047094]  show_stack+0x20/0x38 (C)
[   30.047145]  dump_stack_lvl+0x8c/0xd0
[   30.047192]  print_report+0x118/0x5e8
[   30.047235]  kasan_report+0xdc/0x128
[   30.047286]  __asan_report_load1_noabort+0x20/0x30
[   30.047335]  kmalloc_oob_left+0x2ec/0x320
[   30.047380]  kunit_try_run_case+0x170/0x3f0
[   30.047427]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.047477]  kthread+0x328/0x630
[   30.047526]  ret_from_fork+0x10/0x20
[   30.047574] 
[   30.047598] Allocated by task 111:
[   30.047627]  kasan_save_stack+0x3c/0x68
[   30.047666]  kasan_save_track+0x20/0x40
[   30.047704]  kasan_save_alloc_info+0x40/0x58
[   30.047741]  __kasan_kmalloc+0xd4/0xd8
[   30.047773]  __kmalloc_noprof+0x198/0x4c8
[   30.047813]  kunit_kmalloc_array+0x34/0x88
[   30.047857]  test_readerwriter+0x3b0/0x948
[   30.047908]  kunit_try_run_case+0x170/0x3f0
[   30.047943]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.047984]  kthread+0x328/0x630
[   30.048415]  ret_from_fork+0x10/0x20
[   30.048494] 
[   30.048515] The buggy address belongs to the object at fff00000c8603e00
[   30.048515]  which belongs to the cache kmalloc-16 of size 16
[   30.048706] The buggy address is located 15 bytes to the right of
[   30.048706]  allocated 16-byte region [fff00000c8603e00, fff00000c8603e10)
[   30.048808] 
[   30.048858] The buggy address belongs to the physical page:
[   30.048951] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c8603e00 pfn:0x108603
[   30.049031] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.049183] page_type: f5(slab)
[   30.049243] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   30.049291] raw: fff00000c8603e00 000000008080007f 00000000f5000000 0000000000000000
[   30.049331] page dumped because: kasan: bad access detected
[   30.049360] 
[   30.049444] Memory state around the buggy address:
[   30.049570]  fff00000c8603d00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.049618]  fff00000c8603d80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.049660] >fff00000c8603e00: fa fb fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   30.049720]                             ^
[   30.049779]  fff00000c8603e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.049891]  fff00000c8603f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.049983] ==================================================================

[   24.422748] ==================================================================
[   24.423293] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   24.423607] Read of size 1 at addr ffff88810463165f by task kunit_try_catch/187
[   24.423945] 
[   24.424050] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   24.424106] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.424119] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.424412] Call Trace:
[   24.424428]  <TASK>
[   24.424450]  dump_stack_lvl+0x73/0xb0
[   24.424485]  print_report+0xd1/0x640
[   24.424509]  ? __virt_addr_valid+0x1db/0x2d0
[   24.424535]  ? kmalloc_oob_left+0x361/0x3c0
[   24.424555]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.424599]  ? kmalloc_oob_left+0x361/0x3c0
[   24.424620]  kasan_report+0x141/0x180
[   24.424642]  ? kmalloc_oob_left+0x361/0x3c0
[   24.424667]  __asan_report_load1_noabort+0x18/0x20
[   24.424691]  kmalloc_oob_left+0x361/0x3c0
[   24.424713]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   24.424735]  ? __schedule+0x10da/0x2b60
[   24.424760]  ? __pfx_read_tsc+0x10/0x10
[   24.424782]  ? ktime_get_ts64+0x86/0x230
[   24.424809]  kunit_try_run_case+0x1a5/0x480
[   24.424835]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.424857]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.424884]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.424910]  ? __kthread_parkme+0x82/0x180
[   24.424931]  ? preempt_count_sub+0x50/0x80
[   24.424970]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.424995]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.425018]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.425041]  kthread+0x337/0x6f0
[   24.425061]  ? trace_preempt_on+0x20/0xc0
[   24.425086]  ? __pfx_kthread+0x10/0x10
[   24.425107]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.425130]  ? calculate_sigpending+0x7b/0xa0
[   24.425164]  ? __pfx_kthread+0x10/0x10
[   24.425185]  ret_from_fork+0x116/0x1d0
[   24.425205]  ? __pfx_kthread+0x10/0x10
[   24.425226]  ret_from_fork_asm+0x1a/0x30
[   24.425257]  </TASK>
[   24.425268] 
[   24.432239] Allocated by task 21:
[   24.432377]  kasan_save_stack+0x45/0x70
[   24.432524]  kasan_save_track+0x18/0x40
[   24.432656]  kasan_save_alloc_info+0x3b/0x50
[   24.432996]  __kasan_kmalloc+0xb7/0xc0
[   24.433371]  __kmalloc_cache_node_noprof+0x188/0x420
[   24.433554]  build_sched_domains+0x38c/0x5d80
[   24.433804]  partition_sched_domains+0x471/0x9c0
[   24.433966]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.434289]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.434596]  sched_cpu_activate+0x2bf/0x330
[   24.434770]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.434991]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.435165]  smpboot_thread_fn+0x2bc/0x730
[   24.435338]  kthread+0x337/0x6f0
[   24.435542]  ret_from_fork+0x116/0x1d0
[   24.435709]  ret_from_fork_asm+0x1a/0x30
[   24.435901] 
[   24.436060] Freed by task 21:
[   24.436208]  kasan_save_stack+0x45/0x70
[   24.436376]  kasan_save_track+0x18/0x40
[   24.436502]  kasan_save_free_info+0x3f/0x60
[   24.436683]  __kasan_slab_free+0x56/0x70
[   24.437071]  kfree+0x222/0x3f0
[   24.437245]  build_sched_domains+0x2072/0x5d80
[   24.437388]  partition_sched_domains+0x471/0x9c0
[   24.437535]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.437692]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.437972]  sched_cpu_activate+0x2bf/0x330
[   24.438282]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.438496]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.438691]  smpboot_thread_fn+0x2bc/0x730
[   24.438891]  kthread+0x337/0x6f0
[   24.439056]  ret_from_fork+0x116/0x1d0
[   24.439304]  ret_from_fork_asm+0x1a/0x30
[   24.439729] 
[   24.439826] The buggy address belongs to the object at ffff888104631640
[   24.439826]  which belongs to the cache kmalloc-16 of size 16
[   24.440290] The buggy address is located 15 bytes to the right of
[   24.440290]  allocated 16-byte region [ffff888104631640, ffff888104631650)
[   24.440644] 
[   24.440714] The buggy address belongs to the physical page:
[   24.440888] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104631
[   24.441119] flags: 0x200000000000000(node=0|zone=2)
[   24.441363] page_type: f5(slab)
[   24.441530] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   24.441860] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   24.442308] page dumped because: kasan: bad access detected
[   24.442480] 
[   24.442543] Memory state around the buggy address:
[   24.442758]  ffff888104631500: 00 00 fc fc fa fb fc fc fa fb fc fc 00 06 fc fc
[   24.443101]  ffff888104631580: 00 06 fc fc 00 06 fc fc fa fb fc fc fa fb fc fc
[   24.443315] >ffff888104631600: fa fb fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   24.443517]                                                     ^
[   24.443701]  ffff888104631680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.443906]  ffff888104631700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.444828] ==================================================================