Hay
Date
July 6, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.831080] ==================================================================
[   17.831139] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   17.831186] Write of size 1 at addr fff00000c7819f00 by task kunit_try_catch/144
[   17.831383] 
[   17.831414] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.831726] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.831814] Hardware name: linux,dummy-virt (DT)
[   17.831847] Call trace:
[   17.831868]  show_stack+0x20/0x38 (C)
[   17.831927]  dump_stack_lvl+0x8c/0xd0
[   17.831983]  print_report+0x118/0x608
[   17.832031]  kasan_report+0xdc/0x128
[   17.832076]  __asan_report_store1_noabort+0x20/0x30
[   17.832124]  kmalloc_big_oob_right+0x2a4/0x2f0
[   17.832170]  kunit_try_run_case+0x170/0x3f0
[   17.832227]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.832278]  kthread+0x328/0x630
[   17.832319]  ret_from_fork+0x10/0x20
[   17.832365] 
[   17.832385] Allocated by task 144:
[   17.832413]  kasan_save_stack+0x3c/0x68
[   17.832453]  kasan_save_track+0x20/0x40
[   17.832490]  kasan_save_alloc_info+0x40/0x58
[   17.832545]  __kasan_kmalloc+0xd4/0xd8
[   17.832581]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.832619]  kmalloc_big_oob_right+0xb8/0x2f0
[   17.832656]  kunit_try_run_case+0x170/0x3f0
[   17.832692]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.832735]  kthread+0x328/0x630
[   17.832774]  ret_from_fork+0x10/0x20
[   17.832815] 
[   17.832835] The buggy address belongs to the object at fff00000c7818000
[   17.832835]  which belongs to the cache kmalloc-8k of size 8192
[   17.832899] The buggy address is located 0 bytes to the right of
[   17.832899]  allocated 7936-byte region [fff00000c7818000, fff00000c7819f00)
[   17.832962] 
[   17.832982] The buggy address belongs to the physical page:
[   17.833012] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107818
[   17.833061] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.833105] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.833154] page_type: f5(slab)
[   17.833201] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.833258] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.833317] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   17.833373] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   17.833421] head: 0bfffe0000000003 ffffc1ffc31e0601 00000000ffffffff 00000000ffffffff
[   17.833776] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   17.834113] page dumped because: kasan: bad access detected
[   17.834172] 
[   17.834270] Memory state around the buggy address:
[   17.834323]  fff00000c7819e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.834411]  fff00000c7819e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.834566] >fff00000c7819f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.834666]                    ^
[   17.834771]  fff00000c7819f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.834837]  fff00000c781a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.834874] ==================================================================

[   11.042055] ==================================================================
[   11.042587] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   11.043182] Write of size 1 at addr ffff888102b45f00 by task kunit_try_catch/161
[   11.043603] 
[   11.043728] CPU: 1 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.043772] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.043785] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.043805] Call Trace:
[   11.043817]  <TASK>
[   11.043845]  dump_stack_lvl+0x73/0xb0
[   11.043874]  print_report+0xd1/0x650
[   11.043896]  ? __virt_addr_valid+0x1db/0x2d0
[   11.043996]  ? kmalloc_big_oob_right+0x316/0x370
[   11.044019]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.044051]  ? kmalloc_big_oob_right+0x316/0x370
[   11.044073]  kasan_report+0x141/0x180
[   11.044095]  ? kmalloc_big_oob_right+0x316/0x370
[   11.044133]  __asan_report_store1_noabort+0x1b/0x30
[   11.044153]  kmalloc_big_oob_right+0x316/0x370
[   11.044174]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   11.044197]  ? __schedule+0x10cc/0x2b60
[   11.044219]  ? __pfx_read_tsc+0x10/0x10
[   11.044249]  ? ktime_get_ts64+0x86/0x230
[   11.044273]  kunit_try_run_case+0x1a5/0x480
[   11.044297]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.044329]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.044351]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.044373]  ? __kthread_parkme+0x82/0x180
[   11.044394]  ? preempt_count_sub+0x50/0x80
[   11.044417]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.044440]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.044462]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.044484]  kthread+0x337/0x6f0
[   11.044503]  ? trace_preempt_on+0x20/0xc0
[   11.044526]  ? __pfx_kthread+0x10/0x10
[   11.044546]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.044601]  ? calculate_sigpending+0x7b/0xa0
[   11.044627]  ? __pfx_kthread+0x10/0x10
[   11.044660]  ret_from_fork+0x116/0x1d0
[   11.044679]  ? __pfx_kthread+0x10/0x10
[   11.044699]  ret_from_fork_asm+0x1a/0x30
[   11.044729]  </TASK>
[   11.044741] 
[   11.053669] Allocated by task 161:
[   11.053859]  kasan_save_stack+0x45/0x70
[   11.054245]  kasan_save_track+0x18/0x40
[   11.054390]  kasan_save_alloc_info+0x3b/0x50
[   11.054915]  __kasan_kmalloc+0xb7/0xc0
[   11.055195]  __kmalloc_cache_noprof+0x189/0x420
[   11.055406]  kmalloc_big_oob_right+0xa9/0x370
[   11.055556]  kunit_try_run_case+0x1a5/0x480
[   11.055707]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.056040]  kthread+0x337/0x6f0
[   11.056208]  ret_from_fork+0x116/0x1d0
[   11.056557]  ret_from_fork_asm+0x1a/0x30
[   11.056831] 
[   11.056915] The buggy address belongs to the object at ffff888102b44000
[   11.056915]  which belongs to the cache kmalloc-8k of size 8192
[   11.057273] The buggy address is located 0 bytes to the right of
[   11.057273]  allocated 7936-byte region [ffff888102b44000, ffff888102b45f00)
[   11.058032] 
[   11.058151] The buggy address belongs to the physical page:
[   11.058441] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b40
[   11.058845] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.059388] flags: 0x200000000000040(head|node=0|zone=2)
[   11.059567] page_type: f5(slab)
[   11.059690] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.060387] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.060812] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   11.061059] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   11.061410] head: 0200000000000003 ffffea00040ad001 00000000ffffffff 00000000ffffffff
[   11.061847] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   11.062300] page dumped because: kasan: bad access detected
[   11.062623] 
[   11.062753] Memory state around the buggy address:
[   11.063032]  ffff888102b45e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.063326]  ffff888102b45e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.063541] >ffff888102b45f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.064152]                    ^
[   11.064351]  ffff888102b45f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.064832]  ffff888102b46000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.065150] ==================================================================