Hay
Date
July 19, 2025, 11:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.279961] ==================================================================
[   15.280226] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   15.280283] Write of size 16 at addr fff00000c5f9c420 by task kunit_try_catch/167
[   15.280370] 
[   15.280466] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.280649] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.280679] Hardware name: linux,dummy-virt (DT)
[   15.280711] Call trace:
[   15.280752]  show_stack+0x20/0x38 (C)
[   15.281019]  dump_stack_lvl+0x8c/0xd0
[   15.281098]  print_report+0x118/0x5d0
[   15.281196]  kasan_report+0xdc/0x128
[   15.281247]  __asan_report_store16_noabort+0x20/0x30
[   15.281298]  kmalloc_oob_16+0x3a0/0x3f8
[   15.281560]  kunit_try_run_case+0x170/0x3f0
[   15.281636]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.281700]  kthread+0x328/0x630
[   15.281775]  ret_from_fork+0x10/0x20
[   15.281823] 
[   15.281842] Allocated by task 167:
[   15.282012]  kasan_save_stack+0x3c/0x68
[   15.282064]  kasan_save_track+0x20/0x40
[   15.282153]  kasan_save_alloc_info+0x40/0x58
[   15.282205]  __kasan_kmalloc+0xd4/0xd8
[   15.282354]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.282462]  kmalloc_oob_16+0xb4/0x3f8
[   15.282522]  kunit_try_run_case+0x170/0x3f0
[   15.282569]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.282620]  kthread+0x328/0x630
[   15.282652]  ret_from_fork+0x10/0x20
[   15.282695] 
[   15.282714] The buggy address belongs to the object at fff00000c5f9c420
[   15.282714]  which belongs to the cache kmalloc-16 of size 16
[   15.282772] The buggy address is located 0 bytes inside of
[   15.282772]  allocated 13-byte region [fff00000c5f9c420, fff00000c5f9c42d)
[   15.282832] 
[   15.282850] The buggy address belongs to the physical page:
[   15.282888] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105f9c
[   15.282949] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.283002] page_type: f5(slab)
[   15.283049] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.283103] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.283151] page dumped because: kasan: bad access detected
[   15.283191] 
[   15.283208] Memory state around the buggy address:
[   15.283238]  fff00000c5f9c300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.283278]  fff00000c5f9c380: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc
[   15.283328] >fff00000c5f9c400: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   15.283365]                                   ^
[   15.283404]  fff00000c5f9c480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.283451]  fff00000c5f9c500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.283494] ==================================================================

[   12.097906] ==================================================================
[   12.098568] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.098869] Write of size 16 at addr ffff8881016429e0 by task kunit_try_catch/184
[   12.099176] 
[   12.099373] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.099420] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.099431] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.099453] Call Trace:
[   12.099466]  <TASK>
[   12.099484]  dump_stack_lvl+0x73/0xb0
[   12.099528]  print_report+0xd1/0x610
[   12.099550]  ? __virt_addr_valid+0x1db/0x2d0
[   12.099574]  ? kmalloc_oob_16+0x452/0x4a0
[   12.099593]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.099614]  ? kmalloc_oob_16+0x452/0x4a0
[   12.099634]  kasan_report+0x141/0x180
[   12.099655]  ? kmalloc_oob_16+0x452/0x4a0
[   12.099679]  __asan_report_store16_noabort+0x1b/0x30
[   12.099704]  kmalloc_oob_16+0x452/0x4a0
[   12.099724]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.099744]  ? __schedule+0x10cc/0x2b60
[   12.099766]  ? __pfx_read_tsc+0x10/0x10
[   12.099787]  ? ktime_get_ts64+0x86/0x230
[   12.099812]  kunit_try_run_case+0x1a5/0x480
[   12.099838]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.099859]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.099883]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.099905]  ? __kthread_parkme+0x82/0x180
[   12.099926]  ? preempt_count_sub+0x50/0x80
[   12.099950]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.099973]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.099996]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.100022]  kthread+0x337/0x6f0
[   12.100041]  ? trace_preempt_on+0x20/0xc0
[   12.100065]  ? __pfx_kthread+0x10/0x10
[   12.100084]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.100104]  ? calculate_sigpending+0x7b/0xa0
[   12.100128]  ? __pfx_kthread+0x10/0x10
[   12.100148]  ret_from_fork+0x116/0x1d0
[   12.100167]  ? __pfx_kthread+0x10/0x10
[   12.100187]  ret_from_fork_asm+0x1a/0x30
[   12.100218]  </TASK>
[   12.100228] 
[   12.107097] Allocated by task 184:
[   12.107415]  kasan_save_stack+0x45/0x70
[   12.107630]  kasan_save_track+0x18/0x40
[   12.107818]  kasan_save_alloc_info+0x3b/0x50
[   12.108031]  __kasan_kmalloc+0xb7/0xc0
[   12.108314]  __kmalloc_cache_noprof+0x189/0x420
[   12.108525]  kmalloc_oob_16+0xa8/0x4a0
[   12.108669]  kunit_try_run_case+0x1a5/0x480
[   12.108857]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.109201]  kthread+0x337/0x6f0
[   12.109362]  ret_from_fork+0x116/0x1d0
[   12.109537]  ret_from_fork_asm+0x1a/0x30
[   12.109681] 
[   12.109756] The buggy address belongs to the object at ffff8881016429e0
[   12.109756]  which belongs to the cache kmalloc-16 of size 16
[   12.110383] The buggy address is located 0 bytes inside of
[   12.110383]  allocated 13-byte region [ffff8881016429e0, ffff8881016429ed)
[   12.110864] 
[   12.110959] The buggy address belongs to the physical page:
[   12.111422] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101642
[   12.111709] flags: 0x200000000000000(node=0|zone=2)
[   12.111875] page_type: f5(slab)
[   12.111997] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.112227] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.112640] page dumped because: kasan: bad access detected
[   12.112954] 
[   12.113045] Memory state around the buggy address:
[   12.113262]  ffff888101642880: 00 02 fc fc 00 06 fc fc 00 06 fc fc 00 04 fc fc
[   12.113483]  ffff888101642900: 00 04 fc fc 00 01 fc fc 00 01 fc fc 00 04 fc fc
[   12.113857] >ffff888101642980: 00 04 fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   12.114251]                                                           ^
[   12.114457]  ffff888101642a00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.114743]  ffff888101642a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.115108] ==================================================================