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

Environment
qemu-arm64
qemu-x86_64

[   19.350282] ==================================================================
[   19.350368] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   19.350451] Write of size 4 at addr fff00000c4065475 by task kunit_try_catch/174
[   19.350525] 
[   19.350573] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   19.350672] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.350701] Hardware name: linux,dummy-virt (DT)
[   19.350739] Call trace:
[   19.350768]  show_stack+0x20/0x38 (C)
[   19.351248]  dump_stack_lvl+0x8c/0xd0
[   19.351310]  print_report+0x118/0x608
[   19.351364]  kasan_report+0xdc/0x128
[   19.352132]  kasan_check_range+0x100/0x1a8
[   19.352655]  __asan_memset+0x34/0x78
[   19.352787]  kmalloc_oob_memset_4+0x150/0x300
[   19.353021]  kunit_try_run_case+0x170/0x3f0
[   19.353274]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.353338]  kthread+0x328/0x630
[   19.353393]  ret_from_fork+0x10/0x20
[   19.353742] 
[   19.353827] Allocated by task 174:
[   19.354031]  kasan_save_stack+0x3c/0x68
[   19.354092]  kasan_save_track+0x20/0x40
[   19.354265]  kasan_save_alloc_info+0x40/0x58
[   19.354494]  __kasan_kmalloc+0xd4/0xd8
[   19.354543]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.354590]  kmalloc_oob_memset_4+0xb0/0x300
[   19.354636]  kunit_try_run_case+0x170/0x3f0
[   19.354802]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.355013]  kthread+0x328/0x630
[   19.355069]  ret_from_fork+0x10/0x20
[   19.355341] 
[   19.355407] The buggy address belongs to the object at fff00000c4065400
[   19.355407]  which belongs to the cache kmalloc-128 of size 128
[   19.355493] The buggy address is located 117 bytes inside of
[   19.355493]  allocated 120-byte region [fff00000c4065400, fff00000c4065478)
[   19.355559] 
[   19.355585] The buggy address belongs to the physical page:
[   19.355621] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104065
[   19.355680] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.355736] page_type: f5(slab)
[   19.355786] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.355841] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.355885] page dumped because: kasan: bad access detected
[   19.355919] 
[   19.355940] Memory state around the buggy address:
[   19.355997]  fff00000c4065300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.356048]  fff00000c4065380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.356093] >fff00000c4065400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.356133]                                                                 ^
[   19.356176]  fff00000c4065480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.356220]  fff00000c4065500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.356259] ==================================================================

[   11.204221] ==================================================================
[   11.205384] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   11.205741] Write of size 4 at addr ffff8881029ce475 by task kunit_try_catch/191
[   11.205967] 
[   11.206063] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   11.206115] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.206127] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.206148] Call Trace:
[   11.206160]  <TASK>
[   11.206178]  dump_stack_lvl+0x73/0xb0
[   11.206207]  print_report+0xd1/0x650
[   11.206471]  ? __virt_addr_valid+0x1db/0x2d0
[   11.206496]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.206517]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.206551]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.206573]  kasan_report+0x141/0x180
[   11.206596]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.206632]  kasan_check_range+0x10c/0x1c0
[   11.206666]  __asan_memset+0x27/0x50
[   11.206686]  kmalloc_oob_memset_4+0x166/0x330
[   11.206708]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   11.206731]  ? __schedule+0x10cc/0x2b60
[   11.206754]  ? __pfx_read_tsc+0x10/0x10
[   11.206775]  ? ktime_get_ts64+0x86/0x230
[   11.206800]  kunit_try_run_case+0x1a5/0x480
[   11.206826]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.206847]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.206870]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.206892]  ? __kthread_parkme+0x82/0x180
[   11.206913]  ? preempt_count_sub+0x50/0x80
[   11.206938]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.206961]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.206984]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.207006]  kthread+0x337/0x6f0
[   11.207026]  ? trace_preempt_on+0x20/0xc0
[   11.207051]  ? __pfx_kthread+0x10/0x10
[   11.207071]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.207091]  ? calculate_sigpending+0x7b/0xa0
[   11.207116]  ? __pfx_kthread+0x10/0x10
[   11.207138]  ret_from_fork+0x116/0x1d0
[   11.207156]  ? __pfx_kthread+0x10/0x10
[   11.207177]  ret_from_fork_asm+0x1a/0x30
[   11.207219]  </TASK>
[   11.207231] 
[   11.219991] Allocated by task 191:
[   11.220346]  kasan_save_stack+0x45/0x70
[   11.220724]  kasan_save_track+0x18/0x40
[   11.221090]  kasan_save_alloc_info+0x3b/0x50
[   11.221272]  __kasan_kmalloc+0xb7/0xc0
[   11.221639]  __kmalloc_cache_noprof+0x189/0x420
[   11.222215]  kmalloc_oob_memset_4+0xac/0x330
[   11.222684]  kunit_try_run_case+0x1a5/0x480
[   11.222839]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.223015]  kthread+0x337/0x6f0
[   11.223136]  ret_from_fork+0x116/0x1d0
[   11.223304]  ret_from_fork_asm+0x1a/0x30
[   11.223456] 
[   11.223666] The buggy address belongs to the object at ffff8881029ce400
[   11.223666]  which belongs to the cache kmalloc-128 of size 128
[   11.224156] The buggy address is located 117 bytes inside of
[   11.224156]  allocated 120-byte region [ffff8881029ce400, ffff8881029ce478)
[   11.224867] 
[   11.225031] The buggy address belongs to the physical page:
[   11.225300] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ce
[   11.225874] flags: 0x200000000000000(node=0|zone=2)
[   11.226212] page_type: f5(slab)
[   11.226378] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.226861] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.227235] page dumped because: kasan: bad access detected
[   11.227501] 
[   11.227573] Memory state around the buggy address:
[   11.227908]  ffff8881029ce300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.228269]  ffff8881029ce380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.228650] >ffff8881029ce400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.229176]                                                                 ^
[   11.229874]  ffff8881029ce480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.230748]  ffff8881029ce500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.231734] ==================================================================