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

Environment
qemu-arm64
qemu-x86_64

[   22.860353] ==================================================================
[   22.861613] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   22.862274] Write of size 8 at addr fff00000c6414071 by task kunit_try_catch/165
[   22.862930] 
[   22.863314] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   22.863521] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.863601] Hardware name: linux,dummy-virt (DT)
[   22.863687] Call trace:
[   22.863754]  show_stack+0x20/0x38 (C)
[   22.863910]  dump_stack_lvl+0x8c/0xd0
[   22.864039]  print_report+0x118/0x608
[   22.864103]  kasan_report+0xdc/0x128
[   22.864158]  kasan_check_range+0x100/0x1a8
[   22.864279]  __asan_memset+0x34/0x78
[   22.864405]  kmalloc_oob_memset_8+0x150/0x2f8
[   22.864550]  kunit_try_run_case+0x170/0x3f0
[   22.864689]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.864831]  kthread+0x318/0x620
[   22.864981]  ret_from_fork+0x10/0x20
[   22.865110] 
[   22.871676] Allocated by task 165:
[   22.872198]  kasan_save_stack+0x3c/0x68
[   22.872741]  kasan_save_track+0x20/0x40
[   22.873270]  kasan_save_alloc_info+0x40/0x58
[   22.874622]  __kasan_kmalloc+0xd4/0xd8
[   22.875114]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.875685]  kmalloc_oob_memset_8+0xb0/0x2f8
[   22.876249]  kunit_try_run_case+0x170/0x3f0
[   22.876821]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.878069]  kthread+0x318/0x620
[   22.878498]  ret_from_fork+0x10/0x20
[   22.879032] 
[   22.879328] The buggy address belongs to the object at fff00000c6414000
[   22.879328]  which belongs to the cache kmalloc-128 of size 128
[   22.880308] The buggy address is located 113 bytes inside of
[   22.880308]  allocated 120-byte region [fff00000c6414000, fff00000c6414078)
[   22.881943] 
[   22.882302] The buggy address belongs to the physical page:
[   22.882835] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106414
[   22.883670] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.884383] page_type: f5(slab)
[   22.884865] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.885959] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.887148] page dumped because: kasan: bad access detected
[   22.887685] 
[   22.888009] Memory state around the buggy address:
[   22.888569]  fff00000c6413f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.889853]  fff00000c6413f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.890556] >fff00000c6414000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.891231]                                                                 ^
[   22.892405]  fff00000c6414080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.893014]  fff00000c6414100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.893937] ==================================================================

[   17.749252] ==================================================================
[   17.750008] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x167/0x330
[   17.750524] Write of size 8 at addr ffff8881024bfd71 by task kunit_try_catch/184
[   17.751205] 
[   17.751835] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   17.752134] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.752172] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.752220] Call Trace:
[   17.752261]  <TASK>
[   17.752306]  dump_stack_lvl+0x73/0xb0
[   17.752395]  print_report+0xd1/0x650
[   17.752553]  ? __virt_addr_valid+0x1db/0x2d0
[   17.752637]  ? kmalloc_oob_memset_8+0x167/0x330
[   17.752693]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.752758]  ? kmalloc_oob_memset_8+0x167/0x330
[   17.752814]  kasan_report+0x140/0x180
[   17.752891]  ? kmalloc_oob_memset_8+0x167/0x330
[   17.752961]  kasan_check_range+0x10c/0x1c0
[   17.753021]  __asan_memset+0x27/0x50
[   17.753066]  kmalloc_oob_memset_8+0x167/0x330
[   17.753096]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   17.753124]  ? __schedule+0xce8/0x2840
[   17.753157]  ? __pfx_read_tsc+0x10/0x10
[   17.753185]  ? ktime_get_ts64+0x86/0x230
[   17.753219]  kunit_try_run_case+0x1a6/0x480
[   17.753250]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.753278]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   17.753308]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.753351]  ? __kthread_parkme+0x82/0x160
[   17.753382]  ? preempt_count_sub+0x50/0x80
[   17.753413]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.753457]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.753511]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.753555]  kthread+0x324/0x6e0
[   17.753584]  ? trace_preempt_on+0x20/0xc0
[   17.753617]  ? __pfx_kthread+0x10/0x10
[   17.753644]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.753672]  ? calculate_sigpending+0x7b/0xa0
[   17.753700]  ? __pfx_kthread+0x10/0x10
[   17.753727]  ret_from_fork+0x41/0x80
[   17.753752]  ? __pfx_kthread+0x10/0x10
[   17.753779]  ret_from_fork_asm+0x1a/0x30
[   17.753819]  </TASK>
[   17.753834] 
[   17.768414] Allocated by task 184:
[   17.768933]  kasan_save_stack+0x45/0x70
[   17.769519]  kasan_save_track+0x18/0x40
[   17.770136]  kasan_save_alloc_info+0x3b/0x50
[   17.770711]  __kasan_kmalloc+0xb7/0xc0
[   17.771172]  __kmalloc_cache_noprof+0x18a/0x420
[   17.771931]  kmalloc_oob_memset_8+0xad/0x330
[   17.772450]  kunit_try_run_case+0x1a6/0x480
[   17.772724]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.773242]  kthread+0x324/0x6e0
[   17.773951]  ret_from_fork+0x41/0x80
[   17.774141]  ret_from_fork_asm+0x1a/0x30
[   17.774285] 
[   17.775097] The buggy address belongs to the object at ffff8881024bfd00
[   17.775097]  which belongs to the cache kmalloc-128 of size 128
[   17.776334] The buggy address is located 113 bytes inside of
[   17.776334]  allocated 120-byte region [ffff8881024bfd00, ffff8881024bfd78)
[   17.777109] 
[   17.777741] The buggy address belongs to the physical page:
[   17.778237] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024bf
[   17.779383] flags: 0x200000000000000(node=0|zone=2)
[   17.779854] page_type: f5(slab)
[   17.780173] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.781201] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.782159] page dumped because: kasan: bad access detected
[   17.782516] 
[   17.783039] Memory state around the buggy address:
[   17.783829]  ffff8881024bfc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.784268]  ffff8881024bfc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.785101] >ffff8881024bfd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.785369]                                                                 ^
[   17.786098]  ffff8881024bfd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.786650]  ffff8881024bfe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.787147] ==================================================================