Hay
Date
July 5, 2025, 5:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.273095] ==================================================================
[   18.273517] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   18.273601] Write of size 16 at addr fff00000c5cb3680 by task kunit_try_catch/166
[   18.273653] 
[   18.273695] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.273772] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.273798] Hardware name: linux,dummy-virt (DT)
[   18.274054] Call trace:
[   18.274294]  show_stack+0x20/0x38 (C)
[   18.274355]  dump_stack_lvl+0x8c/0xd0
[   18.274400]  print_report+0x118/0x608
[   18.274509]  kasan_report+0xdc/0x128
[   18.274612]  __asan_report_store16_noabort+0x20/0x30
[   18.275053]  kmalloc_oob_16+0x3a0/0x3f8
[   18.275290]  kunit_try_run_case+0x170/0x3f0
[   18.275566]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.275693]  kthread+0x328/0x630
[   18.275759]  ret_from_fork+0x10/0x20
[   18.276299] 
[   18.276408] Allocated by task 166:
[   18.276537]  kasan_save_stack+0x3c/0x68
[   18.276704]  kasan_save_track+0x20/0x40
[   18.276755]  kasan_save_alloc_info+0x40/0x58
[   18.276794]  __kasan_kmalloc+0xd4/0xd8
[   18.276830]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.276880]  kmalloc_oob_16+0xb4/0x3f8
[   18.276920]  kunit_try_run_case+0x170/0x3f0
[   18.276956]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.276997]  kthread+0x328/0x630
[   18.277029]  ret_from_fork+0x10/0x20
[   18.277064] 
[   18.277099] The buggy address belongs to the object at fff00000c5cb3680
[   18.277099]  which belongs to the cache kmalloc-16 of size 16
[   18.277154] The buggy address is located 0 bytes inside of
[   18.277154]  allocated 13-byte region [fff00000c5cb3680, fff00000c5cb368d)
[   18.277223] 
[   18.277242] The buggy address belongs to the physical page:
[   18.277278] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105cb3
[   18.277329] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.277374] page_type: f5(slab)
[   18.277412] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   18.277460] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   18.277498] page dumped because: kasan: bad access detected
[   18.277537] 
[   18.277554] Memory state around the buggy address:
[   18.277593]  fff00000c5cb3580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   18.277634]  fff00000c5cb3600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   18.277683] >fff00000c5cb3680: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   18.277726]                       ^
[   18.277752]  fff00000c5cb3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.277802]  fff00000c5cb3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.277846] ==================================================================

[   11.595190] ==================================================================
[   11.595709] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   11.596095] Write of size 16 at addr ffff88810274c1c0 by task kunit_try_catch/184
[   11.596581] 
[   11.596807] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.596853] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.596865] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.596886] Call Trace:
[   11.596898]  <TASK>
[   11.596912]  dump_stack_lvl+0x73/0xb0
[   11.596940]  print_report+0xd1/0x650
[   11.596962]  ? __virt_addr_valid+0x1db/0x2d0
[   11.596983]  ? kmalloc_oob_16+0x452/0x4a0
[   11.597003]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.597024]  ? kmalloc_oob_16+0x452/0x4a0
[   11.597045]  kasan_report+0x141/0x180
[   11.597066]  ? kmalloc_oob_16+0x452/0x4a0
[   11.597090]  __asan_report_store16_noabort+0x1b/0x30
[   11.597110]  kmalloc_oob_16+0x452/0x4a0
[   11.597131]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   11.597152]  ? __schedule+0x10cc/0x2b60
[   11.597173]  ? __pfx_read_tsc+0x10/0x10
[   11.597194]  ? ktime_get_ts64+0x86/0x230
[   11.597217]  kunit_try_run_case+0x1a5/0x480
[   11.597241]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.597262]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.597284]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.597306]  ? __kthread_parkme+0x82/0x180
[   11.597325]  ? preempt_count_sub+0x50/0x80
[   11.597347]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.597370]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.597397]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.597419]  kthread+0x337/0x6f0
[   11.597438]  ? trace_preempt_on+0x20/0xc0
[   11.597471]  ? __pfx_kthread+0x10/0x10
[   11.597491]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.597511]  ? calculate_sigpending+0x7b/0xa0
[   11.597535]  ? __pfx_kthread+0x10/0x10
[   11.597555]  ret_from_fork+0x116/0x1d0
[   11.597573]  ? __pfx_kthread+0x10/0x10
[   11.597593]  ret_from_fork_asm+0x1a/0x30
[   11.597622]  </TASK>
[   11.597633] 
[   11.604357] Allocated by task 184:
[   11.604536]  kasan_save_stack+0x45/0x70
[   11.604719]  kasan_save_track+0x18/0x40
[   11.604888]  kasan_save_alloc_info+0x3b/0x50
[   11.605037]  __kasan_kmalloc+0xb7/0xc0
[   11.605171]  __kmalloc_cache_noprof+0x189/0x420
[   11.605401]  kmalloc_oob_16+0xa8/0x4a0
[   11.605600]  kunit_try_run_case+0x1a5/0x480
[   11.605889]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.606143]  kthread+0x337/0x6f0
[   11.606294]  ret_from_fork+0x116/0x1d0
[   11.606430]  ret_from_fork_asm+0x1a/0x30
[   11.606638] 
[   11.606732] The buggy address belongs to the object at ffff88810274c1c0
[   11.606732]  which belongs to the cache kmalloc-16 of size 16
[   11.607318] The buggy address is located 0 bytes inside of
[   11.607318]  allocated 13-byte region [ffff88810274c1c0, ffff88810274c1cd)
[   11.607756] 
[   11.607854] The buggy address belongs to the physical page:
[   11.608109] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10274c
[   11.608435] flags: 0x200000000000000(node=0|zone=2)
[   11.608619] page_type: f5(slab)
[   11.608740] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.608972] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.609340] page dumped because: kasan: bad access detected
[   11.609606] 
[   11.609710] Memory state around the buggy address:
[   11.609936]  ffff88810274c080: 00 03 fc fc fa fb fc fc 00 02 fc fc 00 05 fc fc
[   11.610259]  ffff88810274c100: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc
[   11.610541] >ffff88810274c180: fa fb fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   11.610753]                                               ^
[   11.611085]  ffff88810274c200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.611401]  ffff88810274c280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.611774] ==================================================================