Hay
Date
July 20, 2025, 8:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.155998] ==================================================================
[   15.156069] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   15.156170] Write of size 16 at addr fff00000c60866e0 by task kunit_try_catch/167
[   15.156233] 
[   15.156265] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.156517] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.156547] Hardware name: linux,dummy-virt (DT)
[   15.156580] Call trace:
[   15.156950]  show_stack+0x20/0x38 (C)
[   15.157108]  dump_stack_lvl+0x8c/0xd0
[   15.157254]  print_report+0x118/0x5d0
[   15.157342]  kasan_report+0xdc/0x128
[   15.157466]  __asan_report_store16_noabort+0x20/0x30
[   15.157625]  kmalloc_oob_16+0x3a0/0x3f8
[   15.157713]  kunit_try_run_case+0x170/0x3f0
[   15.157896]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.158249]  kthread+0x328/0x630
[   15.158335]  ret_from_fork+0x10/0x20
[   15.158442] 
[   15.158538] Allocated by task 167:
[   15.158568]  kasan_save_stack+0x3c/0x68
[   15.158757]  kasan_save_track+0x20/0x40
[   15.158839]  kasan_save_alloc_info+0x40/0x58
[   15.159125]  __kasan_kmalloc+0xd4/0xd8
[   15.159171]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.159578]  kmalloc_oob_16+0xb4/0x3f8
[   15.159657]  kunit_try_run_case+0x170/0x3f0
[   15.159936]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.160240]  kthread+0x328/0x630
[   15.160376]  ret_from_fork+0x10/0x20
[   15.160463] 
[   15.160561] The buggy address belongs to the object at fff00000c60866e0
[   15.160561]  which belongs to the cache kmalloc-16 of size 16
[   15.160619] The buggy address is located 0 bytes inside of
[   15.160619]  allocated 13-byte region [fff00000c60866e0, fff00000c60866ed)
[   15.160813] 
[   15.161153] The buggy address belongs to the physical page:
[   15.161283] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106086
[   15.161577] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.161696] page_type: f5(slab)
[   15.161785] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.161976] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.162178] page dumped because: kasan: bad access detected
[   15.162249] 
[   15.162299] Memory state around the buggy address:
[   15.162389]  fff00000c6086580: 00 04 fc fc 00 04 fc fc fa fb fc fc 00 05 fc fc
[   15.162469]  fff00000c6086600: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   15.162726] >fff00000c6086680: 00 00 fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   15.162839]                                                           ^
[   15.162936]  fff00000c6086700: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.163066]  fff00000c6086780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.163120] ==================================================================

[   12.930886] ==================================================================
[   12.931596] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.931949] Write of size 16 at addr ffff888101c73500 by task kunit_try_catch/184
[   12.932284] 
[   12.932405] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.932452] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.932464] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.932498] Call Trace:
[   12.932532]  <TASK>
[   12.932550]  dump_stack_lvl+0x73/0xb0
[   12.932584]  print_report+0xd1/0x610
[   12.932609]  ? __virt_addr_valid+0x1db/0x2d0
[   12.932634]  ? kmalloc_oob_16+0x452/0x4a0
[   12.932655]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.932677]  ? kmalloc_oob_16+0x452/0x4a0
[   12.932699]  kasan_report+0x141/0x180
[   12.932721]  ? kmalloc_oob_16+0x452/0x4a0
[   12.932853]  __asan_report_store16_noabort+0x1b/0x30
[   12.932881]  kmalloc_oob_16+0x452/0x4a0
[   12.932904]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.932927]  ? __schedule+0x10c6/0x2b60
[   12.932951]  ? __pfx_read_tsc+0x10/0x10
[   12.932973]  ? ktime_get_ts64+0x86/0x230
[   12.933022]  kunit_try_run_case+0x1a5/0x480
[   12.933058]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933082]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.933107]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.933131]  ? __kthread_parkme+0x82/0x180
[   12.933152]  ? preempt_count_sub+0x50/0x80
[   12.933180]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933204]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.933228]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.933306]  kthread+0x337/0x6f0
[   12.933329]  ? trace_preempt_on+0x20/0xc0
[   12.933353]  ? __pfx_kthread+0x10/0x10
[   12.933374]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.933397]  ? calculate_sigpending+0x7b/0xa0
[   12.933422]  ? __pfx_kthread+0x10/0x10
[   12.933444]  ret_from_fork+0x116/0x1d0
[   12.933464]  ? __pfx_kthread+0x10/0x10
[   12.933497]  ret_from_fork_asm+0x1a/0x30
[   12.933528]  </TASK>
[   12.933539] 
[   12.942549] Allocated by task 184:
[   12.942729]  kasan_save_stack+0x45/0x70
[   12.942995]  kasan_save_track+0x18/0x40
[   12.943245]  kasan_save_alloc_info+0x3b/0x50
[   12.943459]  __kasan_kmalloc+0xb7/0xc0
[   12.943660]  __kmalloc_cache_noprof+0x189/0x420
[   12.944169]  kmalloc_oob_16+0xa8/0x4a0
[   12.944381]  kunit_try_run_case+0x1a5/0x480
[   12.944578]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.944869]  kthread+0x337/0x6f0
[   12.945064]  ret_from_fork+0x116/0x1d0
[   12.945340]  ret_from_fork_asm+0x1a/0x30
[   12.945568] 
[   12.945681] The buggy address belongs to the object at ffff888101c73500
[   12.945681]  which belongs to the cache kmalloc-16 of size 16
[   12.946276] The buggy address is located 0 bytes inside of
[   12.946276]  allocated 13-byte region [ffff888101c73500, ffff888101c7350d)
[   12.947177] 
[   12.947272] The buggy address belongs to the physical page:
[   12.947456] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c73
[   12.947978] flags: 0x200000000000000(node=0|zone=2)
[   12.948406] page_type: f5(slab)
[   12.948685] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.949172] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.949583] page dumped because: kasan: bad access detected
[   12.949858] 
[   12.949959] Memory state around the buggy address:
[   12.950277]  ffff888101c73400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   12.950641]  ffff888101c73480: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   12.950990] >ffff888101c73500: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   12.951322]                       ^
[   12.951526]  ffff888101c73580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.951856]  ffff888101c73600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.952185] ==================================================================