Hay
Date
June 20, 2025, 12:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.916091] ==================================================================
[   31.916275] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   31.916519] Write of size 128 at addr fff00000c44df600 by task kunit_try_catch/181
[   31.917355] 
[   31.917409] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT 
[   31.917514] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.917543] Hardware name: linux,dummy-virt (DT)
[   31.917582] Call trace:
[   31.917632]  show_stack+0x20/0x38 (C)
[   31.917752]  dump_stack_lvl+0x8c/0xd0
[   31.917848]  print_report+0x118/0x608
[   31.917919]  kasan_report+0xdc/0x128
[   31.918008]  kasan_check_range+0x100/0x1a8
[   31.918063]  __asan_memset+0x34/0x78
[   31.918110]  kmalloc_oob_in_memset+0x144/0x2d0
[   31.918162]  kunit_try_run_case+0x170/0x3f0
[   31.918214]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.918272]  kthread+0x328/0x630
[   31.918317]  ret_from_fork+0x10/0x20
[   31.918373] 
[   31.918398] Allocated by task 181:
[   31.918431]  kasan_save_stack+0x3c/0x68
[   31.918483]  kasan_save_track+0x20/0x40
[   31.918525]  kasan_save_alloc_info+0x40/0x58
[   31.918570]  __kasan_kmalloc+0xd4/0xd8
[   31.918624]  __kmalloc_cache_noprof+0x16c/0x3c0
[   31.918674]  kmalloc_oob_in_memset+0xb0/0x2d0
[   31.918715]  kunit_try_run_case+0x170/0x3f0
[   31.918756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.918803]  kthread+0x328/0x630
[   31.918838]  ret_from_fork+0x10/0x20
[   31.918878] 
[   31.918902] The buggy address belongs to the object at fff00000c44df600
[   31.918902]  which belongs to the cache kmalloc-128 of size 128
[   31.918968] The buggy address is located 0 bytes inside of
[   31.918968]  allocated 120-byte region [fff00000c44df600, fff00000c44df678)
[   31.919035] 
[   31.919061] The buggy address belongs to the physical page:
[   31.919098] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1044df
[   31.919159] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.919221] page_type: f5(slab)
[   31.919273] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   31.919329] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   31.919376] page dumped because: kasan: bad access detected
[   31.919410] 
[   31.919449] Memory state around the buggy address:
[   31.919498]  fff00000c44df500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   31.919547]  fff00000c44df580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.919593] >fff00000c44df600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   31.920053]                                                                 ^
[   31.920183]  fff00000c44df680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.920304]  fff00000c44df700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.920410] ==================================================================

[   25.621108] ==================================================================
[   25.621604] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   25.622464] Write of size 128 at addr ffff888102b17100 by task kunit_try_catch/199
[   25.622726] 
[   25.622872] CPU: 1 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) 
[   25.622977] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.623004] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.623044] Call Trace:
[   25.623067]  <TASK>
[   25.623103]  dump_stack_lvl+0x73/0xb0
[   25.623166]  print_report+0xd1/0x650
[   25.623209]  ? __virt_addr_valid+0x1db/0x2d0
[   25.623242]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.623265]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.623291]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.623313]  kasan_report+0x141/0x180
[   25.623335]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.623360]  kasan_check_range+0x10c/0x1c0
[   25.623383]  __asan_memset+0x27/0x50
[   25.623403]  kmalloc_oob_in_memset+0x15f/0x320
[   25.623424]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   25.624003]  ? __schedule+0x10cc/0x2b60
[   25.624386]  ? __pfx_read_tsc+0x10/0x10
[   25.624463]  ? ktime_get_ts64+0x86/0x230
[   25.624527]  kunit_try_run_case+0x1a5/0x480
[   25.624582]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.624619]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.624657]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.624693]  ? __kthread_parkme+0x82/0x180
[   25.624727]  ? preempt_count_sub+0x50/0x80
[   25.624766]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.624805]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.624842]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.624878]  kthread+0x337/0x6f0
[   25.624911]  ? trace_preempt_on+0x20/0xc0
[   25.624951]  ? __pfx_kthread+0x10/0x10
[   25.624986]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.625022]  ? calculate_sigpending+0x7b/0xa0
[   25.625061]  ? __pfx_kthread+0x10/0x10
[   25.625102]  ret_from_fork+0x116/0x1d0
[   25.625139]  ? __pfx_kthread+0x10/0x10
[   25.625174]  ret_from_fork_asm+0x1a/0x30
[   25.625214]  </TASK>
[   25.625228] 
[   25.638881] Allocated by task 199:
[   25.639161]  kasan_save_stack+0x45/0x70
[   25.639374]  kasan_save_track+0x18/0x40
[   25.640156]  kasan_save_alloc_info+0x3b/0x50
[   25.640467]  __kasan_kmalloc+0xb7/0xc0
[   25.640786]  __kmalloc_cache_noprof+0x189/0x420
[   25.641076]  kmalloc_oob_in_memset+0xac/0x320
[   25.641351]  kunit_try_run_case+0x1a5/0x480
[   25.641664]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.642061]  kthread+0x337/0x6f0
[   25.642365]  ret_from_fork+0x116/0x1d0
[   25.643406]  ret_from_fork_asm+0x1a/0x30
[   25.643832] 
[   25.644016] The buggy address belongs to the object at ffff888102b17100
[   25.644016]  which belongs to the cache kmalloc-128 of size 128
[   25.644860] The buggy address is located 0 bytes inside of
[   25.644860]  allocated 120-byte region [ffff888102b17100, ffff888102b17178)
[   25.645490] 
[   25.645745] The buggy address belongs to the physical page:
[   25.646071] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b17
[   25.646728] flags: 0x200000000000000(node=0|zone=2)
[   25.647763] page_type: f5(slab)
[   25.648313] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.648713] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.649487] page dumped because: kasan: bad access detected
[   25.650032] 
[   25.650220] Memory state around the buggy address:
[   25.650876]  ffff888102b17000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.651358]  ffff888102b17080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.651631] >ffff888102b17100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.652347]                                                                 ^
[   25.652864]  ffff888102b17180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.653330]  ffff888102b17200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.653668] ==================================================================