Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.246536] ==================================================================
[   31.246615] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   31.246667] Read of size 1 at addr fff00000c907e03f by task kunit_try_catch/169
[   31.246714] 
[   31.246867] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   31.246985] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.247025] Hardware name: linux,dummy-virt (DT)
[   31.247174] Call trace:
[   31.247249]  show_stack+0x20/0x38 (C)
[   31.247316]  dump_stack_lvl+0x8c/0xd0
[   31.247362]  print_report+0x118/0x5e8
[   31.247404]  kasan_report+0xdc/0x128
[   31.247477]  __asan_report_load1_noabort+0x20/0x30
[   31.247525]  kmalloc_oob_left+0x2ec/0x320
[   31.247569]  kunit_try_run_case+0x170/0x3f0
[   31.247625]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.247783]  kthread+0x328/0x630
[   31.247850]  ret_from_fork+0x10/0x20
[   31.247898] 
[   31.247916] Allocated by task 110:
[   31.248004]  kasan_save_stack+0x3c/0x68
[   31.248105]  kasan_save_track+0x20/0x40
[   31.248198]  kasan_save_alloc_info+0x40/0x58
[   31.248256]  __kasan_kmalloc+0xd4/0xd8
[   31.248336]  __kmalloc_noprof+0x198/0x4c8
[   31.248457]  kunit_kmalloc_array+0x34/0x88
[   31.248528]  test_readerwriter+0x3b0/0x948
[   31.248568]  kunit_try_run_case+0x170/0x3f0
[   31.248609]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.248670]  kthread+0x328/0x630
[   31.248701]  ret_from_fork+0x10/0x20
[   31.248735] 
[   31.248753] The buggy address belongs to the object at fff00000c907e020
[   31.248753]  which belongs to the cache kmalloc-16 of size 16
[   31.248806] The buggy address is located 15 bytes to the right of
[   31.248806]  allocated 16-byte region [fff00000c907e020, fff00000c907e030)
[   31.248866] 
[   31.248884] The buggy address belongs to the physical page:
[   31.248913] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c907e020 pfn:0x10907e
[   31.248968] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.249016] page_type: f5(slab)
[   31.249053] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   31.249133] raw: fff00000c907e020 000000008080007f 00000000f5000000 0000000000000000
[   31.249172] page dumped because: kasan: bad access detected
[   31.249228] 
[   31.249269] Memory state around the buggy address:
[   31.249362]  fff00000c907df00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
[   31.249489]  fff00000c907df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.249563] >fff00000c907e000: fa fb fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   31.249657]                                         ^
[   31.249746]  fff00000c907e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.249798]  fff00000c907e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.249833] ==================================================================


[   24.100759] ==================================================================
[   24.101600] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   24.101857] Read of size 1 at addr ffff888102abfb3f by task kunit_try_catch/186
[   24.102146] 
[   24.102276] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   24.102329] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.102341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.102363] Call Trace:
[   24.102376]  <TASK>
[   24.102396]  dump_stack_lvl+0x73/0xb0
[   24.102438]  print_report+0xd1/0x640
[   24.102460]  ? __virt_addr_valid+0x1db/0x2d0
[   24.102485]  ? kmalloc_oob_left+0x361/0x3c0
[   24.102504]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.102529]  ? kmalloc_oob_left+0x361/0x3c0
[   24.102549]  kasan_report+0x141/0x180
[   24.102570]  ? kmalloc_oob_left+0x361/0x3c0
[   24.102595]  __asan_report_load1_noabort+0x18/0x20
[   24.102625]  kmalloc_oob_left+0x361/0x3c0
[   24.102646]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   24.102666]  ? __schedule+0x10da/0x2b60
[   24.102690]  ? __pfx_read_tsc+0x10/0x10
[   24.102711]  ? ktime_get_ts64+0x86/0x230
[   24.102736]  kunit_try_run_case+0x1a5/0x480
[   24.102760]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.102781]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.102828]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.102851]  ? __kthread_parkme+0x82/0x180
[   24.102872]  ? preempt_count_sub+0x50/0x80
[   24.102895]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.102936]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.102959]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.102982]  kthread+0x337/0x6f0
[   24.103001]  ? trace_preempt_on+0x20/0xc0
[   24.103024]  ? __pfx_kthread+0x10/0x10
[   24.103043]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.103064]  ? calculate_sigpending+0x7b/0xa0
[   24.103088]  ? __pfx_kthread+0x10/0x10
[   24.103108]  ret_from_fork+0x116/0x1d0
[   24.103126]  ? __pfx_kthread+0x10/0x10
[   24.103145]  ret_from_fork_asm+0x1a/0x30
[   24.103187]  </TASK>
[   24.103198] 
[   24.118469] Allocated by task 21:
[   24.118618]  kasan_save_stack+0x45/0x70
[   24.118766]  kasan_save_track+0x18/0x40
[   24.119537]  kasan_save_alloc_info+0x3b/0x50
[   24.120111]  __kasan_kmalloc+0xb7/0xc0
[   24.121277]  __kmalloc_cache_node_noprof+0x188/0x420
[   24.122222]  build_sched_domains+0x38c/0x5d80
[   24.122837]  partition_sched_domains+0x471/0x9c0
[   24.123113]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.123340]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.123556]  sched_cpu_activate+0x2bf/0x330
[   24.123703]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.123860]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.123994]  smpboot_thread_fn+0x2bc/0x730
[   24.124134]  kthread+0x337/0x6f0
[   24.124259]  ret_from_fork+0x116/0x1d0
[   24.124439]  ret_from_fork_asm+0x1a/0x30
[   24.124633] 
[   24.124758] Freed by task 21:
[   24.124900]  kasan_save_stack+0x45/0x70
[   24.125091]  kasan_save_track+0x18/0x40
[   24.125473]  kasan_save_free_info+0x3f/0x60
[   24.125926]  __kasan_slab_free+0x56/0x70
[   24.126276]  kfree+0x222/0x3f0
[   24.127019]  build_sched_domains+0x2072/0x5d80
[   24.127436]  partition_sched_domains+0x471/0x9c0
[   24.128039]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.128449]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.128960]  sched_cpu_activate+0x2bf/0x330
[   24.129357]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.129766]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.130211]  smpboot_thread_fn+0x2bc/0x730
[   24.130593]  kthread+0x337/0x6f0
[   24.130964]  ret_from_fork+0x116/0x1d0
[   24.131324]  ret_from_fork_asm+0x1a/0x30
[   24.131709] 
[   24.131960] The buggy address belongs to the object at ffff888102abfb20
[   24.131960]  which belongs to the cache kmalloc-16 of size 16
[   24.133195] The buggy address is located 15 bytes to the right of
[   24.133195]  allocated 16-byte region [ffff888102abfb20, ffff888102abfb30)
[   24.133919] 
[   24.134097] The buggy address belongs to the physical page:
[   24.134598] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102abf
[   24.135053] flags: 0x200000000000000(node=0|zone=2)
[   24.135395] page_type: f5(slab)
[   24.135725] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   24.136450] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   24.136925] page dumped because: kasan: bad access detected
[   24.137329] 
[   24.137394] Memory state around the buggy address:
[   24.137544]  ffff888102abfa00: 00 06 fc fc 00 06 fc fc 00 06 fc fc fa fb fc fc
[   24.137752]  ffff888102abfa80: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.138561] >ffff888102abfb00: fa fb fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   24.139255]                                         ^
[   24.139710]  ffff888102abfb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.140216]  ffff888102abfc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.140677] ==================================================================