Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.454368] ==================================================================
[   16.454429] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   16.454476] Write of size 1 at addr fff00000c6685f00 by task kunit_try_catch/144
[   16.454558] 
[   16.454588] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.454683] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.454708] Hardware name: linux,dummy-virt (DT)
[   16.454737] Call trace:
[   16.454757]  show_stack+0x20/0x38 (C)
[   16.454853]  dump_stack_lvl+0x8c/0xd0
[   16.454921]  print_report+0x118/0x5d0
[   16.455018]  kasan_report+0xdc/0x128
[   16.455103]  __asan_report_store1_noabort+0x20/0x30
[   16.455450]  kmalloc_big_oob_right+0x2a4/0x2f0
[   16.455507]  kunit_try_run_case+0x170/0x3f0
[   16.455827]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.455954]  kthread+0x328/0x630
[   16.456053]  ret_from_fork+0x10/0x20
[   16.456264] 
[   16.456511] Allocated by task 144:
[   16.456578]  kasan_save_stack+0x3c/0x68
[   16.456827]  kasan_save_track+0x20/0x40
[   16.456868]  kasan_save_alloc_info+0x40/0x58
[   16.456907]  __kasan_kmalloc+0xd4/0xd8
[   16.457304]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.457354]  kmalloc_big_oob_right+0xb8/0x2f0
[   16.457525]  kunit_try_run_case+0x170/0x3f0
[   16.457590]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.457634]  kthread+0x328/0x630
[   16.457665]  ret_from_fork+0x10/0x20
[   16.457700] 
[   16.458204] The buggy address belongs to the object at fff00000c6684000
[   16.458204]  which belongs to the cache kmalloc-8k of size 8192
[   16.458388] The buggy address is located 0 bytes to the right of
[   16.458388]  allocated 7936-byte region [fff00000c6684000, fff00000c6685f00)
[   16.458459] 
[   16.458479] The buggy address belongs to the physical page:
[   16.458510] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106680
[   16.458930] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.459275] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.459367] page_type: f5(slab)
[   16.459431] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   16.459483] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   16.459599] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   16.459807] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   16.460320] head: 0bfffe0000000003 ffffc1ffc319a001 00000000ffffffff 00000000ffffffff
[   16.460482] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   16.460818] page dumped because: kasan: bad access detected
[   16.461067] 
[   16.461229] Memory state around the buggy address:
[   16.461337]  fff00000c6685e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.461724]  fff00000c6685e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.461809] >fff00000c6685f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.462040]                    ^
[   16.462076]  fff00000c6685f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.462390]  fff00000c6686000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.462432] ==================================================================

[   12.374806] ==================================================================
[   12.376126] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   12.376802] Write of size 1 at addr ffff888101efdf00 by task kunit_try_catch/161
[   12.377661] 
[   12.377860] CPU: 1 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.377910] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.377922] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.377943] Call Trace:
[   12.377957]  <TASK>
[   12.377976]  dump_stack_lvl+0x73/0xb0
[   12.378030]  print_report+0xd1/0x610
[   12.378054]  ? __virt_addr_valid+0x1db/0x2d0
[   12.378079]  ? kmalloc_big_oob_right+0x316/0x370
[   12.378101]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.378124]  ? kmalloc_big_oob_right+0x316/0x370
[   12.378147]  kasan_report+0x141/0x180
[   12.378169]  ? kmalloc_big_oob_right+0x316/0x370
[   12.378197]  __asan_report_store1_noabort+0x1b/0x30
[   12.378222]  kmalloc_big_oob_right+0x316/0x370
[   12.378245]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   12.378281]  ? __schedule+0x10cc/0x2b60
[   12.378304]  ? __pfx_read_tsc+0x10/0x10
[   12.378326]  ? ktime_get_ts64+0x86/0x230
[   12.378352]  kunit_try_run_case+0x1a5/0x480
[   12.378378]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.378401]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.378426]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.378449]  ? __kthread_parkme+0x82/0x180
[   12.378471]  ? preempt_count_sub+0x50/0x80
[   12.378496]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.378520]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.378545]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.378570]  kthread+0x337/0x6f0
[   12.378589]  ? trace_preempt_on+0x20/0xc0
[   12.378613]  ? __pfx_kthread+0x10/0x10
[   12.378634]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.378655]  ? calculate_sigpending+0x7b/0xa0
[   12.378680]  ? __pfx_kthread+0x10/0x10
[   12.378706]  ret_from_fork+0x116/0x1d0
[   12.378725]  ? __pfx_kthread+0x10/0x10
[   12.378746]  ret_from_fork_asm+0x1a/0x30
[   12.378779]  </TASK>
[   12.378790] 
[   12.391174] Allocated by task 161:
[   12.391517]  kasan_save_stack+0x45/0x70
[   12.391862]  kasan_save_track+0x18/0x40
[   12.392252]  kasan_save_alloc_info+0x3b/0x50
[   12.392417]  __kasan_kmalloc+0xb7/0xc0
[   12.392550]  __kmalloc_cache_noprof+0x189/0x420
[   12.392708]  kmalloc_big_oob_right+0xa9/0x370
[   12.392860]  kunit_try_run_case+0x1a5/0x480
[   12.393024]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.393375]  kthread+0x337/0x6f0
[   12.393817]  ret_from_fork+0x116/0x1d0
[   12.394276]  ret_from_fork_asm+0x1a/0x30
[   12.394524] 
[   12.394597] The buggy address belongs to the object at ffff888101efc000
[   12.394597]  which belongs to the cache kmalloc-8k of size 8192
[   12.394965] The buggy address is located 0 bytes to the right of
[   12.394965]  allocated 7936-byte region [ffff888101efc000, ffff888101efdf00)
[   12.396234] 
[   12.396409] The buggy address belongs to the physical page:
[   12.396886] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101ef8
[   12.397775] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.398338] flags: 0x200000000000040(head|node=0|zone=2)
[   12.398810] page_type: f5(slab)
[   12.398934] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.399182] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.399431] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   12.400158] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   12.400811] head: 0200000000000003 ffffea000407be01 00000000ffffffff 00000000ffffffff
[   12.401611] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   12.401897] page dumped because: kasan: bad access detected
[   12.402312] 
[   12.402484] Memory state around the buggy address:
[   12.402912]  ffff888101efde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.403531]  ffff888101efde80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.403752] >ffff888101efdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.403964]                    ^
[   12.404349]  ffff888101efdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.404962]  ffff888101efe000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.405705] ==================================================================