Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.721424] ==================================================================
[   22.722609] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   22.724208] Write of size 128 at addr fff00000c614cd00 by task kunit_try_catch/159
[   22.724945] 
[   22.725435] CPU: 1 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   22.725699] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.725767] Hardware name: linux,dummy-virt (DT)
[   22.725846] Call trace:
[   22.725923]  show_stack+0x20/0x38 (C)
[   22.726044]  dump_stack_lvl+0x8c/0xd0
[   22.726177]  print_report+0x118/0x608
[   22.726290]  kasan_report+0xdc/0x128
[   22.726396]  kasan_check_range+0x100/0x1a8
[   22.726505]  __asan_memset+0x34/0x78
[   22.726620]  kmalloc_oob_in_memset+0x144/0x2d0
[   22.726754]  kunit_try_run_case+0x170/0x3f0
[   22.726911]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.727059]  kthread+0x318/0x620
[   22.727168]  ret_from_fork+0x10/0x20
[   22.727232] 
[   22.734939] Allocated by task 159:
[   22.735494]  kasan_save_stack+0x3c/0x68
[   22.736127]  kasan_save_track+0x20/0x40
[   22.736627]  kasan_save_alloc_info+0x40/0x58
[   22.737168]  __kasan_kmalloc+0xd4/0xd8
[   22.737659]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.738288]  kmalloc_oob_in_memset+0xb0/0x2d0
[   22.738974]  kunit_try_run_case+0x170/0x3f0
[   22.739474]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.740101]  kthread+0x318/0x620
[   22.740604]  ret_from_fork+0x10/0x20
[   22.741100] 
[   22.741464] The buggy address belongs to the object at fff00000c614cd00
[   22.741464]  which belongs to the cache kmalloc-128 of size 128
[   22.742698] The buggy address is located 0 bytes inside of
[   22.742698]  allocated 120-byte region [fff00000c614cd00, fff00000c614cd78)
[   22.744512] 
[   22.744814] The buggy address belongs to the physical page:
[   22.745787] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10614c
[   22.746554] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.747581] page_type: f5(slab)
[   22.748053] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.748606] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.750978] page dumped because: kasan: bad access detected
[   22.751417] 
[   22.751729] Memory state around the buggy address:
[   22.753048]  fff00000c614cc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.755231]  fff00000c614cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.757456] >fff00000c614cd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.758103]                                                                 ^
[   22.758817]  fff00000c614cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.760550]  fff00000c614ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.762241] ==================================================================

[   17.621325] ==================================================================
[   17.622342] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x160/0x320
[   17.623039] Write of size 128 at addr ffff8881024bfb00 by task kunit_try_catch/178
[   17.623948] 
[   17.624239] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   17.624351] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.624382] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.624477] Call Trace:
[   17.624517]  <TASK>
[   17.624562]  dump_stack_lvl+0x73/0xb0
[   17.624652]  print_report+0xd1/0x650
[   17.624706]  ? __virt_addr_valid+0x1db/0x2d0
[   17.624765]  ? kmalloc_oob_in_memset+0x160/0x320
[   17.624895]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.624998]  ? kmalloc_oob_in_memset+0x160/0x320
[   17.625051]  kasan_report+0x140/0x180
[   17.625106]  ? kmalloc_oob_in_memset+0x160/0x320
[   17.625174]  kasan_check_range+0x10c/0x1c0
[   17.625233]  __asan_memset+0x27/0x50
[   17.625282]  kmalloc_oob_in_memset+0x160/0x320
[   17.625328]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   17.625364]  ? __schedule+0x1c5f/0x2840
[   17.625399]  ? __pfx_read_tsc+0x10/0x10
[   17.625428]  ? ktime_get_ts64+0x86/0x230
[   17.625462]  kunit_try_run_case+0x1a6/0x480
[   17.625495]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.625521]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   17.625552]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.625581]  ? __kthread_parkme+0x82/0x160
[   17.625610]  ? preempt_count_sub+0x50/0x80
[   17.625641]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.625669]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.625701]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.625732]  kthread+0x324/0x6e0
[   17.625758]  ? trace_preempt_on+0x20/0xc0
[   17.625789]  ? __pfx_kthread+0x10/0x10
[   17.625816]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.625844]  ? calculate_sigpending+0x7b/0xa0
[   17.625891]  ? __pfx_kthread+0x10/0x10
[   17.625920]  ret_from_fork+0x41/0x80
[   17.625945]  ? __pfx_kthread+0x10/0x10
[   17.625972]  ret_from_fork_asm+0x1a/0x30
[   17.626013]  </TASK>
[   17.626028] 
[   17.639228] Allocated by task 178:
[   17.639542]  kasan_save_stack+0x45/0x70
[   17.640059]  kasan_save_track+0x18/0x40
[   17.640414]  kasan_save_alloc_info+0x3b/0x50
[   17.640844]  __kasan_kmalloc+0xb7/0xc0
[   17.641189]  __kmalloc_cache_noprof+0x18a/0x420
[   17.641704]  kmalloc_oob_in_memset+0xad/0x320
[   17.642076]  kunit_try_run_case+0x1a6/0x480
[   17.642554]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.642973]  kthread+0x324/0x6e0
[   17.643374]  ret_from_fork+0x41/0x80
[   17.643674]  ret_from_fork_asm+0x1a/0x30
[   17.644116] 
[   17.644274] The buggy address belongs to the object at ffff8881024bfb00
[   17.644274]  which belongs to the cache kmalloc-128 of size 128
[   17.644970] The buggy address is located 0 bytes inside of
[   17.644970]  allocated 120-byte region [ffff8881024bfb00, ffff8881024bfb78)
[   17.646053] 
[   17.646337] The buggy address belongs to the physical page:
[   17.646904] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024bf
[   17.647659] flags: 0x200000000000000(node=0|zone=2)
[   17.648214] page_type: f5(slab)
[   17.648623] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.649381] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.649942] page dumped because: kasan: bad access detected
[   17.650421] 
[   17.650552] Memory state around the buggy address:
[   17.650804]  ffff8881024bfa00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.651444]  ffff8881024bfa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.652280] >ffff8881024bfb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.652847]                                                                 ^
[   17.653283]  ffff8881024bfb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.653824]  ffff8881024bfc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.654359] ==================================================================