Hay
Date
May 12, 2025, 11:48 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.280894] ==================================================================
[   16.281016] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   16.281291] Write of size 1 at addr fff00000c78b1f00 by task kunit_try_catch/144
[   16.281408] 
[   16.281490] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT 
[   16.281827] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.282051] Hardware name: linux,dummy-virt (DT)
[   16.282121] Call trace:
[   16.282164]  show_stack+0x20/0x38 (C)
[   16.282271]  dump_stack_lvl+0x8c/0xd0
[   16.282464]  print_report+0x118/0x608
[   16.282548]  kasan_report+0xdc/0x128
[   16.282632]  __asan_report_store1_noabort+0x20/0x30
[   16.282908]  kmalloc_big_oob_right+0x2a4/0x2f0
[   16.283036]  kunit_try_run_case+0x170/0x3f0
[   16.283139]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.283237]  kthread+0x328/0x630
[   16.283405]  ret_from_fork+0x10/0x20
[   16.283507] 
[   16.283549] Allocated by task 144:
[   16.283610]  kasan_save_stack+0x3c/0x68
[   16.283693]  kasan_save_track+0x20/0x40
[   16.283769]  kasan_save_alloc_info+0x40/0x58
[   16.283848]  __kasan_kmalloc+0xd4/0xd8
[   16.284115]  __kmalloc_cache_noprof+0x15c/0x3c0
[   16.284222]  kmalloc_big_oob_right+0xb8/0x2f0
[   16.284453]  kunit_try_run_case+0x170/0x3f0
[   16.284668]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.284756]  kthread+0x328/0x630
[   16.284829]  ret_from_fork+0x10/0x20
[   16.284987] 
[   16.285132] The buggy address belongs to the object at fff00000c78b0000
[   16.285132]  which belongs to the cache kmalloc-8k of size 8192
[   16.285253] The buggy address is located 0 bytes to the right of
[   16.285253]  allocated 7936-byte region [fff00000c78b0000, fff00000c78b1f00)
[   16.285708] 
[   16.285786] The buggy address belongs to the physical page:
[   16.285867] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b0
[   16.286021] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.286082] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.286185] page_type: f5(slab)
[   16.286294] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   16.286439] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   16.286587] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   16.286728] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   16.286874] head: 0bfffe0000000003 ffffc1ffc31e2c01 00000000ffffffff 00000000ffffffff
[   16.286980] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   16.287109] page dumped because: kasan: bad access detected
[   16.287199] 
[   16.287253] Memory state around the buggy address:
[   16.287335]  fff00000c78b1e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.287409]  fff00000c78b1e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.287478] >fff00000c78b1f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.287544]                    ^
[   16.287597]  fff00000c78b1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.287706]  fff00000c78b2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.287815] ==================================================================

[   15.770510] ==================================================================
[   15.772311] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   15.774469] Write of size 1 at addr ffff888103b79f00 by task kunit_try_catch/161
[   15.775534] 
[   15.775779] CPU: 1 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) 
[   15.775880] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.775903] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.775942] Call Trace:
[   15.775970]  <TASK>
[   15.776006]  dump_stack_lvl+0x73/0xb0
[   15.776074]  print_report+0xd1/0x650
[   15.776115]  ? __virt_addr_valid+0x1db/0x2d0
[   15.776177]  ? kmalloc_big_oob_right+0x316/0x370
[   15.776218]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.776281]  ? kmalloc_big_oob_right+0x316/0x370
[   15.776322]  kasan_report+0x141/0x180
[   15.776358]  ? kmalloc_big_oob_right+0x316/0x370
[   15.776406]  __asan_report_store1_noabort+0x1b/0x30
[   15.776446]  kmalloc_big_oob_right+0x316/0x370
[   15.776487]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   15.776525]  ? __schedule+0x10cc/0x2b60
[   15.776565]  ? __pfx_read_tsc+0x10/0x10
[   15.776606]  ? ktime_get_ts64+0x86/0x230
[   15.776653]  kunit_try_run_case+0x1a5/0x480
[   15.776702]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.776744]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.776789]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.776831]  ? __kthread_parkme+0x82/0x180
[   15.776867]  ? preempt_count_sub+0x50/0x80
[   15.776910]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.776950]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.776988]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.777026]  kthread+0x337/0x6f0
[   15.777060]  ? trace_preempt_on+0x20/0xc0
[   15.777101]  ? __pfx_kthread+0x10/0x10
[   15.777134]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.777168]  ? calculate_sigpending+0x7b/0xa0
[   15.777212]  ? __pfx_kthread+0x10/0x10
[   15.777249]  ret_from_fork+0x116/0x1d0
[   15.778592]  ? __pfx_kthread+0x10/0x10
[   15.778640]  ret_from_fork_asm+0x1a/0x30
[   15.778736]  </TASK>
[   15.778762] 
[   15.795840] Allocated by task 161:
[   15.796241]  kasan_save_stack+0x45/0x70
[   15.797356]  kasan_save_track+0x18/0x40
[   15.797962]  kasan_save_alloc_info+0x3b/0x50
[   15.798449]  __kasan_kmalloc+0xb7/0xc0
[   15.798837]  __kmalloc_cache_noprof+0x189/0x420
[   15.799470]  kmalloc_big_oob_right+0xa9/0x370
[   15.799909]  kunit_try_run_case+0x1a5/0x480
[   15.800137]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.801123]  kthread+0x337/0x6f0
[   15.801345]  ret_from_fork+0x116/0x1d0
[   15.801512]  ret_from_fork_asm+0x1a/0x30
[   15.803853] 
[   15.803987] The buggy address belongs to the object at ffff888103b78000
[   15.803987]  which belongs to the cache kmalloc-8k of size 8192
[   15.805507] The buggy address is located 0 bytes to the right of
[   15.805507]  allocated 7936-byte region [ffff888103b78000, ffff888103b79f00)
[   15.807814] 
[   15.807952] The buggy address belongs to the physical page:
[   15.808193] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b78
[   15.808646] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.808966] flags: 0x200000000000040(head|node=0|zone=2)
[   15.809368] page_type: f5(slab)
[   15.810651] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   15.812691] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   15.814471] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   15.816615] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   15.818832] head: 0200000000000003 ffffea00040ede01 00000000ffffffff 00000000ffffffff
[   15.820812] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   15.821546] page dumped because: kasan: bad access detected
[   15.821811] 
[   15.821923] Memory state around the buggy address:
[   15.823579]  ffff888103b79e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.824155]  ffff888103b79e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   15.825748] >ffff888103b79f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.827184]                    ^
[   15.827648]  ffff888103b79f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.828995]  ffff888103b7a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.829546] ==================================================================