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

Environment
qemu-arm64
qemu-x86_64

[   30.606915] ==================================================================
[   30.606972] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   30.607033] Write of size 128 at addr fff00000c6361900 by task kunit_try_catch/201
[   30.607084] 
[   30.607114] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   30.607198] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.607224] Hardware name: linux,dummy-virt (DT)
[   30.607265] Call trace:
[   30.607288]  show_stack+0x20/0x38 (C)
[   30.607335]  dump_stack_lvl+0x8c/0xd0
[   30.607380]  print_report+0x118/0x5d0
[   30.607423]  kasan_report+0xdc/0x128
[   30.607464]  kasan_check_range+0x100/0x1a8
[   30.607522]  __asan_memset+0x34/0x78
[   30.607567]  kmalloc_oob_in_memset+0x144/0x2d0
[   30.607614]  kunit_try_run_case+0x170/0x3f0
[   30.607660]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.607710]  kthread+0x328/0x630
[   30.607750]  ret_from_fork+0x10/0x20
[   30.608608] 
[   30.608765] Allocated by task 201:
[   30.608797]  kasan_save_stack+0x3c/0x68
[   30.608859]  kasan_save_track+0x20/0x40
[   30.608894]  kasan_save_alloc_info+0x40/0x58
[   30.608931]  __kasan_kmalloc+0xd4/0xd8
[   30.609516]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.609601]  kmalloc_oob_in_memset+0xb0/0x2d0
[   30.609757]  kunit_try_run_case+0x170/0x3f0
[   30.609863]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.610133]  kthread+0x328/0x630
[   30.610310]  ret_from_fork+0x10/0x20
[   30.610579] 
[   30.610693] The buggy address belongs to the object at fff00000c6361900
[   30.610693]  which belongs to the cache kmalloc-128 of size 128
[   30.611146] The buggy address is located 0 bytes inside of
[   30.611146]  allocated 120-byte region [fff00000c6361900, fff00000c6361978)
[   30.611441] 
[   30.611523] The buggy address belongs to the physical page:
[   30.611588] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106361
[   30.611869] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.612308] page_type: f5(slab)
[   30.612395] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   30.612599] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.612670] page dumped because: kasan: bad access detected
[   30.612882] 
[   30.613047] Memory state around the buggy address:
[   30.613190]  fff00000c6361800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.613313]  fff00000c6361880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.613485] >fff00000c6361900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.613535]                                                                 ^
[   30.613714]  fff00000c6361980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.613940]  fff00000c6361a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.614056] ==================================================================

[   23.321576] ==================================================================
[   23.322196] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   23.322541] Write of size 128 at addr ffff88810539f800 by task kunit_try_catch/219
[   23.322989] 
[   23.323097] CPU: 0 UID: 0 PID: 219 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   23.323146] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.323158] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.323179] Call Trace:
[   23.323191]  <TASK>
[   23.323208]  dump_stack_lvl+0x73/0xb0
[   23.323237]  print_report+0xd1/0x610
[   23.323259]  ? __virt_addr_valid+0x1db/0x2d0
[   23.323296]  ? kmalloc_oob_in_memset+0x15f/0x320
[   23.323396]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.323423]  ? kmalloc_oob_in_memset+0x15f/0x320
[   23.323444]  kasan_report+0x141/0x180
[   23.323466]  ? kmalloc_oob_in_memset+0x15f/0x320
[   23.323491]  kasan_check_range+0x10c/0x1c0
[   23.323514]  __asan_memset+0x27/0x50
[   23.323536]  kmalloc_oob_in_memset+0x15f/0x320
[   23.323558]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   23.323579]  ? __schedule+0x10c6/0x2b60
[   23.323611]  ? __pfx_read_tsc+0x10/0x10
[   23.323634]  ? ktime_get_ts64+0x86/0x230
[   23.323659]  kunit_try_run_case+0x1a5/0x480
[   23.323684]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.323705]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.323727]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.323749]  ? __kthread_parkme+0x82/0x180
[   23.323770]  ? preempt_count_sub+0x50/0x80
[   23.323792]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.323815]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.323840]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.323866]  kthread+0x337/0x6f0
[   23.323892]  ? trace_preempt_on+0x20/0xc0
[   23.323915]  ? __pfx_kthread+0x10/0x10
[   23.323935]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.323955]  ? calculate_sigpending+0x7b/0xa0
[   23.323978]  ? __pfx_kthread+0x10/0x10
[   23.323998]  ret_from_fork+0x116/0x1d0
[   23.324017]  ? __pfx_kthread+0x10/0x10
[   23.324037]  ret_from_fork_asm+0x1a/0x30
[   23.324068]  </TASK>
[   23.324078] 
[   23.331546] Allocated by task 219:
[   23.331762]  kasan_save_stack+0x45/0x70
[   23.332064]  kasan_save_track+0x18/0x40
[   23.332245]  kasan_save_alloc_info+0x3b/0x50
[   23.332519]  __kasan_kmalloc+0xb7/0xc0
[   23.332703]  __kmalloc_cache_noprof+0x189/0x420
[   23.332855]  kmalloc_oob_in_memset+0xac/0x320
[   23.333112]  kunit_try_run_case+0x1a5/0x480
[   23.333331]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.333563]  kthread+0x337/0x6f0
[   23.333739]  ret_from_fork+0x116/0x1d0
[   23.334034]  ret_from_fork_asm+0x1a/0x30
[   23.334218] 
[   23.334299] The buggy address belongs to the object at ffff88810539f800
[   23.334299]  which belongs to the cache kmalloc-128 of size 128
[   23.334648] The buggy address is located 0 bytes inside of
[   23.334648]  allocated 120-byte region [ffff88810539f800, ffff88810539f878)
[   23.335165] 
[   23.335259] The buggy address belongs to the physical page:
[   23.335518] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10539f
[   23.335780] flags: 0x200000000000000(node=0|zone=2)
[   23.335936] page_type: f5(slab)
[   23.336051] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   23.336887] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.337216] page dumped because: kasan: bad access detected
[   23.337395] 
[   23.337458] Memory state around the buggy address:
[   23.337822]  ffff88810539f700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.338431]  ffff88810539f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.338900] >ffff88810539f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.339111]                                                                 ^
[   23.339414]  ffff88810539f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.339901]  ffff88810539f900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.340169] ==================================================================