Hay
Date
July 3, 2025, 6:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.806751] ==================================================================
[   16.806815] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   16.806960] Write of size 128 at addr fff00000c652de00 by task kunit_try_catch/170
[   16.807014] 
[   16.807210] CPU: 0 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   16.807304] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.807330] Hardware name: linux,dummy-virt (DT)
[   16.807727] Call trace:
[   16.807767]  show_stack+0x20/0x38 (C)
[   16.807820]  dump_stack_lvl+0x8c/0xd0
[   16.807991]  print_report+0x118/0x608
[   16.808064]  kasan_report+0xdc/0x128
[   16.808109]  kasan_check_range+0x100/0x1a8
[   16.808352]  __asan_memset+0x34/0x78
[   16.808415]  kmalloc_oob_in_memset+0x144/0x2d0
[   16.808468]  kunit_try_run_case+0x170/0x3f0
[   16.808597]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.808706]  kthread+0x328/0x630
[   16.808825]  ret_from_fork+0x10/0x20
[   16.808874] 
[   16.808892] Allocated by task 170:
[   16.808945]  kasan_save_stack+0x3c/0x68
[   16.809256]  kasan_save_track+0x20/0x40
[   16.809443]  kasan_save_alloc_info+0x40/0x58
[   16.809593]  __kasan_kmalloc+0xd4/0xd8
[   16.809672]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.809756]  kmalloc_oob_in_memset+0xb0/0x2d0
[   16.809866]  kunit_try_run_case+0x170/0x3f0
[   16.810087]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.810340]  kthread+0x328/0x630
[   16.810408]  ret_from_fork+0x10/0x20
[   16.810585] 
[   16.810704] The buggy address belongs to the object at fff00000c652de00
[   16.810704]  which belongs to the cache kmalloc-128 of size 128
[   16.810800] The buggy address is located 0 bytes inside of
[   16.810800]  allocated 120-byte region [fff00000c652de00, fff00000c652de78)
[   16.811224] 
[   16.811429] The buggy address belongs to the physical page:
[   16.811466] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10652d
[   16.811692] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.811974] page_type: f5(slab)
[   16.812081] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.812277] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.812369] page dumped because: kasan: bad access detected
[   16.812662] 
[   16.812719] Memory state around the buggy address:
[   16.812903]  fff00000c652dd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.812988]  fff00000c652dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.813123] >fff00000c652de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.813221]                                                                 ^
[   16.813355]  fff00000c652de80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.813397]  fff00000c652df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.813440] ==================================================================

[   11.517421] ==================================================================
[   11.518023] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   11.518543] Write of size 128 at addr ffff8881029db400 by task kunit_try_catch/188
[   11.518862] 
[   11.519045] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.519091] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.519102] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.519135] Call Trace:
[   11.519146]  <TASK>
[   11.519231]  dump_stack_lvl+0x73/0xb0
[   11.519264]  print_report+0xd1/0x650
[   11.519287]  ? __virt_addr_valid+0x1db/0x2d0
[   11.519310]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.519331]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.519352]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.519374]  kasan_report+0x141/0x180
[   11.519395]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.519421]  kasan_check_range+0x10c/0x1c0
[   11.519444]  __asan_memset+0x27/0x50
[   11.519464]  kmalloc_oob_in_memset+0x15f/0x320
[   11.519511]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   11.519535]  ? __schedule+0x10cc/0x2b60
[   11.519556]  ? __pfx_read_tsc+0x10/0x10
[   11.519577]  ? ktime_get_ts64+0x86/0x230
[   11.519600]  kunit_try_run_case+0x1a5/0x480
[   11.519625]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.519646]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.519669]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.519690]  ? __kthread_parkme+0x82/0x180
[   11.519710]  ? preempt_count_sub+0x50/0x80
[   11.519733]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.519756]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.519778]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.519800]  kthread+0x337/0x6f0
[   11.519818]  ? trace_preempt_on+0x20/0xc0
[   11.519841]  ? __pfx_kthread+0x10/0x10
[   11.519860]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.519880]  ? calculate_sigpending+0x7b/0xa0
[   11.519902]  ? __pfx_kthread+0x10/0x10
[   11.519923]  ret_from_fork+0x116/0x1d0
[   11.519940]  ? __pfx_kthread+0x10/0x10
[   11.519960]  ret_from_fork_asm+0x1a/0x30
[   11.519989]  </TASK>
[   11.520000] 
[   11.528064] Allocated by task 188:
[   11.528218]  kasan_save_stack+0x45/0x70
[   11.528369]  kasan_save_track+0x18/0x40
[   11.528546]  kasan_save_alloc_info+0x3b/0x50
[   11.528756]  __kasan_kmalloc+0xb7/0xc0
[   11.528944]  __kmalloc_cache_noprof+0x189/0x420
[   11.529413]  kmalloc_oob_in_memset+0xac/0x320
[   11.529641]  kunit_try_run_case+0x1a5/0x480
[   11.529824]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.530051]  kthread+0x337/0x6f0
[   11.530336]  ret_from_fork+0x116/0x1d0
[   11.530534]  ret_from_fork_asm+0x1a/0x30
[   11.530747] 
[   11.530838] The buggy address belongs to the object at ffff8881029db400
[   11.530838]  which belongs to the cache kmalloc-128 of size 128
[   11.531469] The buggy address is located 0 bytes inside of
[   11.531469]  allocated 120-byte region [ffff8881029db400, ffff8881029db478)
[   11.531982] 
[   11.532076] The buggy address belongs to the physical page:
[   11.532418] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029db
[   11.532759] flags: 0x200000000000000(node=0|zone=2)
[   11.532990] page_type: f5(slab)
[   11.533323] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.533707] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.534054] page dumped because: kasan: bad access detected
[   11.534321] 
[   11.534423] Memory state around the buggy address:
[   11.534598]  ffff8881029db300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.534819]  ffff8881029db380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.535139] >ffff8881029db400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.535470]                                                                 ^
[   11.535789]  ffff8881029db480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.536082]  ffff8881029db500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.536462] ==================================================================