Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.301890] ==================================================================
[   30.301983] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   30.302120] Read of size 1 at addr fff00000c636023f by task kunit_try_catch/169
[   30.302322] 
[   30.302354] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   30.302442] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.302468] Hardware name: linux,dummy-virt (DT)
[   30.302517] Call trace:
[   30.302539]  show_stack+0x20/0x38 (C)
[   30.302586]  dump_stack_lvl+0x8c/0xd0
[   30.303018]  print_report+0x118/0x5d0
[   30.303369]  kasan_report+0xdc/0x128
[   30.303419]  __asan_report_load1_noabort+0x20/0x30
[   30.303736]  kmalloc_oob_left+0x2ec/0x320
[   30.304122]  kunit_try_run_case+0x170/0x3f0
[   30.304211]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.304289]  kthread+0x328/0x630
[   30.304379]  ret_from_fork+0x10/0x20
[   30.304536] 
[   30.304757] Allocated by task 108:
[   30.304941]  kasan_save_stack+0x3c/0x68
[   30.305011]  kasan_save_track+0x20/0x40
[   30.305077]  kasan_save_alloc_info+0x40/0x58
[   30.305114]  __kasan_kmalloc+0xd4/0xd8
[   30.305151]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   30.305400]  kvasprintf+0xe0/0x180
[   30.305471]  kasprintf+0xd0/0x110
[   30.305768]  miscdev_test_can_open+0xac/0x2c8
[   30.305921]  miscdev_test_conflict_reverse+0x330/0x620
[   30.305973]  kunit_try_run_case+0x170/0x3f0
[   30.306009]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.306052]  kthread+0x328/0x630
[   30.306263]  ret_from_fork+0x10/0x20
[   30.306298] 
[   30.306334] Freed by task 108:
[   30.306379]  kasan_save_stack+0x3c/0x68
[   30.306416]  kasan_save_track+0x20/0x40
[   30.306875]  kasan_save_free_info+0x4c/0x78
[   30.306923]  __kasan_slab_free+0x6c/0x98
[   30.306988]  kfree+0x214/0x3c8
[   30.307043]  miscdev_test_can_open+0x138/0x2c8
[   30.307148]  miscdev_test_conflict_reverse+0x330/0x620
[   30.307188]  kunit_try_run_case+0x170/0x3f0
[   30.307225]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.307267]  kthread+0x328/0x630
[   30.307299]  ret_from_fork+0x10/0x20
[   30.307347] 
[   30.307371] The buggy address belongs to the object at fff00000c6360220
[   30.307371]  which belongs to the cache kmalloc-16 of size 16
[   30.307476] The buggy address is located 15 bytes to the right of
[   30.307476]  allocated 16-byte region [fff00000c6360220, fff00000c6360230)
[   30.307852] 
[   30.308221] The buggy address belongs to the physical page:
[   30.308256] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106360
[   30.308309] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.308675] page_type: f5(slab)
[   30.308921] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   30.309030] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   30.309071] page dumped because: kasan: bad access detected
[   30.309102] 
[   30.309120] Memory state around the buggy address:
[   30.309170]  fff00000c6360100: fa fb fc fc 00 04 fc fc fa fb fc fc fa fb fc fc
[   30.309214]  fff00000c6360180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.309256] >fff00000c6360200: fa fb fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   30.309294]                                         ^
[   30.309327]  fff00000c6360280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.309369]  fff00000c6360300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.309407] ==================================================================

[   22.584665] ==================================================================
[   22.585287] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   22.585613] Read of size 1 at addr ffff88810168397f by task kunit_try_catch/187
[   22.585878] 
[   22.586003] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   22.586053] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.586065] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.586087] Call Trace:
[   22.586100]  <TASK>
[   22.586116]  dump_stack_lvl+0x73/0xb0
[   22.586147]  print_report+0xd1/0x610
[   22.586169]  ? __virt_addr_valid+0x1db/0x2d0
[   22.586192]  ? kmalloc_oob_left+0x361/0x3c0
[   22.586212]  ? kasan_complete_mode_report_info+0x64/0x200
[   22.586238]  ? kmalloc_oob_left+0x361/0x3c0
[   22.586269]  kasan_report+0x141/0x180
[   22.586290]  ? kmalloc_oob_left+0x361/0x3c0
[   22.586315]  __asan_report_load1_noabort+0x18/0x20
[   22.586338]  kmalloc_oob_left+0x361/0x3c0
[   22.586359]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   22.586380]  ? __schedule+0x10c6/0x2b60
[   22.586403]  ? __pfx_read_tsc+0x10/0x10
[   22.586424]  ? ktime_get_ts64+0x86/0x230
[   22.586449]  kunit_try_run_case+0x1a5/0x480
[   22.586473]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.586494]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.586516]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.586539]  ? __kthread_parkme+0x82/0x180
[   22.586558]  ? preempt_count_sub+0x50/0x80
[   22.586581]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.586604]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.586629]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.587013]  kthread+0x337/0x6f0
[   22.587033]  ? trace_preempt_on+0x20/0xc0
[   22.587057]  ? __pfx_kthread+0x10/0x10
[   22.587077]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.587098]  ? calculate_sigpending+0x7b/0xa0
[   22.587121]  ? __pfx_kthread+0x10/0x10
[   22.587141]  ret_from_fork+0x116/0x1d0
[   22.587160]  ? __pfx_kthread+0x10/0x10
[   22.587180]  ret_from_fork_asm+0x1a/0x30
[   22.587210]  </TASK>
[   22.587222] 
[   22.601897] Allocated by task 21:
[   22.602428]  kasan_save_stack+0x45/0x70
[   22.603120]  kasan_save_track+0x18/0x40
[   22.603783]  kasan_save_alloc_info+0x3b/0x50
[   22.604483]  __kasan_kmalloc+0xb7/0xc0
[   22.605285]  __kmalloc_cache_node_noprof+0x188/0x420
[   22.605884]  build_sched_domains+0x38c/0x5d80
[   22.606491]  partition_sched_domains+0x471/0x9c0
[   22.607091]  rebuild_sched_domains_locked+0x97d/0xd50
[   22.607694]  cpuset_update_active_cpus+0x80f/0x1a90
[   22.608500]  sched_cpu_activate+0x2bf/0x330
[   22.608980]  cpuhp_invoke_callback+0x2a1/0xf00
[   22.609397]  cpuhp_thread_fun+0x2ce/0x5c0
[   22.609555]  smpboot_thread_fn+0x2bc/0x730
[   22.610350]  kthread+0x337/0x6f0
[   22.610684]  ret_from_fork+0x116/0x1d0
[   22.611030]  ret_from_fork_asm+0x1a/0x30
[   22.611180] 
[   22.611290] Freed by task 21:
[   22.611414]  kasan_save_stack+0x45/0x70
[   22.611553]  kasan_save_track+0x18/0x40
[   22.611680]  kasan_save_free_info+0x3f/0x60
[   22.611818]  __kasan_slab_free+0x56/0x70
[   22.612504]  kfree+0x222/0x3f0
[   22.612794]  build_sched_domains+0x2072/0x5d80
[   22.613340]  partition_sched_domains+0x471/0x9c0
[   22.613835]  rebuild_sched_domains_locked+0x97d/0xd50
[   22.614353]  cpuset_update_active_cpus+0x80f/0x1a90
[   22.614914]  sched_cpu_activate+0x2bf/0x330
[   22.615372]  cpuhp_invoke_callback+0x2a1/0xf00
[   22.615810]  cpuhp_thread_fun+0x2ce/0x5c0
[   22.616407]  smpboot_thread_fn+0x2bc/0x730
[   22.616926]  kthread+0x337/0x6f0
[   22.617295]  ret_from_fork+0x116/0x1d0
[   22.617548]  ret_from_fork_asm+0x1a/0x30
[   22.618038] 
[   22.618115] The buggy address belongs to the object at ffff888101683960
[   22.618115]  which belongs to the cache kmalloc-16 of size 16
[   22.618478] The buggy address is located 15 bytes to the right of
[   22.618478]  allocated 16-byte region [ffff888101683960, ffff888101683970)
[   22.619563] 
[   22.619774] The buggy address belongs to the physical page:
[   22.620430] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101683
[   22.621452] flags: 0x200000000000000(node=0|zone=2)
[   22.621987] page_type: f5(slab)
[   22.622375] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   22.622769] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   22.623521] page dumped because: kasan: bad access detected
[   22.624130] 
[   22.624338] Memory state around the buggy address:
[   22.624630]  ffff888101683800: fa fb fc fc fa fb fc fc fa fb fc fc 00 06 fc fc
[   22.625257]  ffff888101683880: 00 06 fc fc 00 06 fc fc 00 00 fc fc fa fb fc fc
[   22.625681] >ffff888101683900: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   22.626442]                                                                 ^
[   22.627004]  ffff888101683980: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.627220]  ffff888101683a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.627438] ==================================================================