Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.252203] ==================================================================
[   19.252345] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   19.252672] Write of size 1 at addr fff00000c65bdf00 by task kunit_try_catch/144
[   19.252990] 
[   19.253094] CPU: 0 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.253392] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.253653] Hardware name: linux,dummy-virt (DT)
[   19.253783] Call trace:
[   19.253874]  show_stack+0x20/0x38 (C)
[   19.254000]  dump_stack_lvl+0x8c/0xd0
[   19.254134]  print_report+0x118/0x608
[   19.254253]  kasan_report+0xdc/0x128
[   19.254382]  __asan_report_store1_noabort+0x20/0x30
[   19.254493]  kmalloc_big_oob_right+0x2a4/0x2f0
[   19.254588]  kunit_try_run_case+0x170/0x3f0
[   19.254673]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.254791]  kthread+0x328/0x630
[   19.254935]  ret_from_fork+0x10/0x20
[   19.255247] 
[   19.255312] Allocated by task 144:
[   19.255418]  kasan_save_stack+0x3c/0x68
[   19.255521]  kasan_save_track+0x20/0x40
[   19.255633]  kasan_save_alloc_info+0x40/0x58
[   19.255722]  __kasan_kmalloc+0xd4/0xd8
[   19.255806]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.255900]  kmalloc_big_oob_right+0xb8/0x2f0
[   19.255988]  kunit_try_run_case+0x170/0x3f0
[   19.256083]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.256189]  kthread+0x328/0x630
[   19.256271]  ret_from_fork+0x10/0x20
[   19.256366] 
[   19.256411] The buggy address belongs to the object at fff00000c65bc000
[   19.256411]  which belongs to the cache kmalloc-8k of size 8192
[   19.256545] The buggy address is located 0 bytes to the right of
[   19.256545]  allocated 7936-byte region [fff00000c65bc000, fff00000c65bdf00)
[   19.256701] 
[   19.256761] The buggy address belongs to the physical page:
[   19.256838] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065b8
[   19.256957] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.257570] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.257861] page_type: f5(slab)
[   19.257949] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   19.258067] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   19.258172] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   19.258400] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   19.258632] head: 0bfffe0000000003 ffffc1ffc3196e01 00000000ffffffff 00000000ffffffff
[   19.258750] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   19.258835] page dumped because: kasan: bad access detected
[   19.258906] 
[   19.258947] Memory state around the buggy address:
[   19.259056]  fff00000c65bde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.259190]  fff00000c65bde80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.259285] >fff00000c65bdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.259371]                    ^
[   19.259429]  fff00000c65bdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.259522]  fff00000c65be000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.259608] ==================================================================

[   10.978156] ==================================================================
[   10.979099] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.979401] Write of size 1 at addr ffff8881038f9f00 by task kunit_try_catch/161
[   10.979788] 
[   10.980142] CPU: 0 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   10.980189] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.980201] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.980221] Call Trace:
[   10.980232]  <TASK>
[   10.980247]  dump_stack_lvl+0x73/0xb0
[   10.980276]  print_report+0xd1/0x650
[   10.980297]  ? __virt_addr_valid+0x1db/0x2d0
[   10.980337]  ? kmalloc_big_oob_right+0x316/0x370
[   10.980358]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.980379]  ? kmalloc_big_oob_right+0x316/0x370
[   10.980400]  kasan_report+0x141/0x180
[   10.980420]  ? kmalloc_big_oob_right+0x316/0x370
[   10.980446]  __asan_report_store1_noabort+0x1b/0x30
[   10.980466]  kmalloc_big_oob_right+0x316/0x370
[   10.980487]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.980508]  ? __schedule+0x10cc/0x2b60
[   10.980529]  ? __pfx_read_tsc+0x10/0x10
[   10.980550]  ? ktime_get_ts64+0x86/0x230
[   10.980573]  kunit_try_run_case+0x1a5/0x480
[   10.980597]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.980618]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.980639]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.980660]  ? __kthread_parkme+0x82/0x180
[   10.980680]  ? preempt_count_sub+0x50/0x80
[   10.980702]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.980724]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.980745]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.980767]  kthread+0x337/0x6f0
[   10.980785]  ? trace_preempt_on+0x20/0xc0
[   10.980807]  ? __pfx_kthread+0x10/0x10
[   10.980826]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.980846]  ? calculate_sigpending+0x7b/0xa0
[   10.980868]  ? __pfx_kthread+0x10/0x10
[   10.980889]  ret_from_fork+0x116/0x1d0
[   10.980906]  ? __pfx_kthread+0x10/0x10
[   10.980925]  ret_from_fork_asm+0x1a/0x30
[   10.980954]  </TASK>
[   10.980965] 
[   10.988146] Allocated by task 161:
[   10.988298]  kasan_save_stack+0x45/0x70
[   10.988498]  kasan_save_track+0x18/0x40
[   10.988634]  kasan_save_alloc_info+0x3b/0x50
[   10.988782]  __kasan_kmalloc+0xb7/0xc0
[   10.988967]  __kmalloc_cache_noprof+0x189/0x420
[   10.989282]  kmalloc_big_oob_right+0xa9/0x370
[   10.989497]  kunit_try_run_case+0x1a5/0x480
[   10.989708]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.989939]  kthread+0x337/0x6f0
[   10.990084]  ret_from_fork+0x116/0x1d0
[   10.990292]  ret_from_fork_asm+0x1a/0x30
[   10.990479] 
[   10.990565] The buggy address belongs to the object at ffff8881038f8000
[   10.990565]  which belongs to the cache kmalloc-8k of size 8192
[   10.991000] The buggy address is located 0 bytes to the right of
[   10.991000]  allocated 7936-byte region [ffff8881038f8000, ffff8881038f9f00)
[   10.991552] 
[   10.991671] The buggy address belongs to the physical page:
[   10.991886] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038f8
[   10.992555] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.992796] flags: 0x200000000000040(head|node=0|zone=2)
[   10.992976] page_type: f5(slab)
[   10.993095] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.993449] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.993844] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.994137] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.994574] head: 0200000000000003 ffffea00040e3e01 00000000ffffffff 00000000ffffffff
[   10.994810] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.995105] page dumped because: kasan: bad access detected
[   10.995618] 
[   10.995718] Memory state around the buggy address:
[   10.995945]  ffff8881038f9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.996289]  ffff8881038f9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.996557] >ffff8881038f9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.996772]                    ^
[   10.996942]  ffff8881038f9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.997445]  ffff8881038fa000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.997687] ==================================================================