Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.377319] ==================================================================
[   19.377451] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   19.377540] Write of size 16 at addr fff00000c4065669 by task kunit_try_catch/178
[   19.377597] 
[   19.377642] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   19.377741] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.377771] Hardware name: linux,dummy-virt (DT)
[   19.377836] Call trace:
[   19.377878]  show_stack+0x20/0x38 (C)
[   19.377938]  dump_stack_lvl+0x8c/0xd0
[   19.378007]  print_report+0x118/0x608
[   19.378089]  kasan_report+0xdc/0x128
[   19.378267]  kasan_check_range+0x100/0x1a8
[   19.378352]  __asan_memset+0x34/0x78
[   19.378412]  kmalloc_oob_memset_16+0x150/0x2f8
[   19.378570]  kunit_try_run_case+0x170/0x3f0
[   19.378667]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.378727]  kthread+0x328/0x630
[   19.378779]  ret_from_fork+0x10/0x20
[   19.378835] 
[   19.378857] Allocated by task 178:
[   19.379035]  kasan_save_stack+0x3c/0x68
[   19.379086]  kasan_save_track+0x20/0x40
[   19.379128]  kasan_save_alloc_info+0x40/0x58
[   19.379173]  __kasan_kmalloc+0xd4/0xd8
[   19.379215]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.379259]  kmalloc_oob_memset_16+0xb0/0x2f8
[   19.379435]  kunit_try_run_case+0x170/0x3f0
[   19.379593]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.379756]  kthread+0x328/0x630
[   19.379811]  ret_from_fork+0x10/0x20
[   19.379854] 
[   19.379900] The buggy address belongs to the object at fff00000c4065600
[   19.379900]  which belongs to the cache kmalloc-128 of size 128
[   19.379966] The buggy address is located 105 bytes inside of
[   19.379966]  allocated 120-byte region [fff00000c4065600, fff00000c4065678)
[   19.380045] 
[   19.380209] The buggy address belongs to the physical page:
[   19.380277] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104065
[   19.380339] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.380405] page_type: f5(slab)
[   19.380461] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.380516] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.380560] page dumped because: kasan: bad access detected
[   19.380594] 
[   19.380614] Memory state around the buggy address:
[   19.380652]  fff00000c4065500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.380699]  fff00000c4065580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.380762] >fff00000c4065600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.380803]                                                                 ^
[   19.380848]  fff00000c4065680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.380893]  fff00000c4065700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.380947] ==================================================================

[   11.260238] ==================================================================
[   11.260787] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   11.261391] Write of size 16 at addr ffff8881026a8969 by task kunit_try_catch/195
[   11.262085] 
[   11.262365] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   11.262417] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.262430] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.262451] Call Trace:
[   11.262468]  <TASK>
[   11.262485]  dump_stack_lvl+0x73/0xb0
[   11.262515]  print_report+0xd1/0x650
[   11.262537]  ? __virt_addr_valid+0x1db/0x2d0
[   11.262560]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.262581]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.262603]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.262636]  kasan_report+0x141/0x180
[   11.262659]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.262687]  kasan_check_range+0x10c/0x1c0
[   11.262710]  __asan_memset+0x27/0x50
[   11.262730]  kmalloc_oob_memset_16+0x166/0x330
[   11.262753]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   11.262776]  ? __schedule+0x10cc/0x2b60
[   11.262798]  ? __pfx_read_tsc+0x10/0x10
[   11.262818]  ? ktime_get_ts64+0x86/0x230
[   11.262842]  kunit_try_run_case+0x1a5/0x480
[   11.262865]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.262894]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.262915]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.262937]  ? __kthread_parkme+0x82/0x180
[   11.262957]  ? preempt_count_sub+0x50/0x80
[   11.262980]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.263003]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.263025]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.263047]  kthread+0x337/0x6f0
[   11.263067]  ? trace_preempt_on+0x20/0xc0
[   11.263090]  ? __pfx_kthread+0x10/0x10
[   11.263110]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.263130]  ? calculate_sigpending+0x7b/0xa0
[   11.263153]  ? __pfx_kthread+0x10/0x10
[   11.263175]  ret_from_fork+0x116/0x1d0
[   11.263192]  ? __pfx_kthread+0x10/0x10
[   11.263212]  ret_from_fork_asm+0x1a/0x30
[   11.263244]  </TASK>
[   11.263254] 
[   11.273946] Allocated by task 195:
[   11.274121]  kasan_save_stack+0x45/0x70
[   11.274546]  kasan_save_track+0x18/0x40
[   11.274918]  kasan_save_alloc_info+0x3b/0x50
[   11.275230]  __kasan_kmalloc+0xb7/0xc0
[   11.275530]  __kmalloc_cache_noprof+0x189/0x420
[   11.275774]  kmalloc_oob_memset_16+0xac/0x330
[   11.276162]  kunit_try_run_case+0x1a5/0x480
[   11.276514]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.276963]  kthread+0x337/0x6f0
[   11.277125]  ret_from_fork+0x116/0x1d0
[   11.277466]  ret_from_fork_asm+0x1a/0x30
[   11.277738] 
[   11.278041] The buggy address belongs to the object at ffff8881026a8900
[   11.278041]  which belongs to the cache kmalloc-128 of size 128
[   11.278880] The buggy address is located 105 bytes inside of
[   11.278880]  allocated 120-byte region [ffff8881026a8900, ffff8881026a8978)
[   11.279493] 
[   11.279704] The buggy address belongs to the physical page:
[   11.280059] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026a8
[   11.280481] flags: 0x200000000000000(node=0|zone=2)
[   11.280983] page_type: f5(slab)
[   11.281244] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.281815] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.282275] page dumped because: kasan: bad access detected
[   11.282639] 
[   11.282739] Memory state around the buggy address:
[   11.282947]  ffff8881026a8800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.283500]  ffff8881026a8880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.284088] >ffff8881026a8900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.284491]                                                                 ^
[   11.285138]  ffff8881026a8980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.285649]  ffff8881026a8a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.285975] ==================================================================