Hay
Date
June 5, 2025, 7:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   25.266572] ==================================================================
[   25.266688] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   25.266851] Write of size 8 at addr fff00000c6419571 by task kunit_try_catch/176
[   25.266977] 
[   25.267825] CPU: 0 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT 
[   25.268069] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.268218] Hardware name: linux,dummy-virt (DT)
[   25.268297] Call trace:
[   25.268588]  show_stack+0x20/0x38 (C)
[   25.268798]  dump_stack_lvl+0x8c/0xd0
[   25.269016]  print_report+0x118/0x608
[   25.269220]  kasan_report+0xdc/0x128
[   25.269609]  kasan_check_range+0x100/0x1a8
[   25.269909]  __asan_memset+0x34/0x78
[   25.270110]  kmalloc_oob_memset_8+0x150/0x2f8
[   25.270485]  kunit_try_run_case+0x170/0x3f0
[   25.270773]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.270973]  kthread+0x328/0x630
[   25.271633]  ret_from_fork+0x10/0x20
[   25.271848] 
[   25.272322] Allocated by task 176:
[   25.272420]  kasan_save_stack+0x3c/0x68
[   25.272538]  kasan_save_track+0x20/0x40
[   25.272630]  kasan_save_alloc_info+0x40/0x58
[   25.273307]  __kasan_kmalloc+0xd4/0xd8
[   25.273431]  __kmalloc_cache_noprof+0x16c/0x3c0
[   25.273529]  kmalloc_oob_memset_8+0xb0/0x2f8
[   25.274339]  kunit_try_run_case+0x170/0x3f0
[   25.274636]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.275446]  kthread+0x328/0x630
[   25.275541]  ret_from_fork+0x10/0x20
[   25.275647] 
[   25.275701] The buggy address belongs to the object at fff00000c6419500
[   25.275701]  which belongs to the cache kmalloc-128 of size 128
[   25.276541] The buggy address is located 113 bytes inside of
[   25.276541]  allocated 120-byte region [fff00000c6419500, fff00000c6419578)
[   25.277127] 
[   25.277240] The buggy address belongs to the physical page:
[   25.277428] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106419
[   25.277556] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   25.277692] page_type: f5(slab)
[   25.277915] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   25.278064] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.278173] page dumped because: kasan: bad access detected
[   25.278519] 
[   25.278601] Memory state around the buggy address:
[   25.278749]  fff00000c6419400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.278944]  fff00000c6419480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.279102] >fff00000c6419500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.279204]                                                                 ^
[   25.279473]  fff00000c6419580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.279579]  fff00000c6419600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.279668] ==================================================================


[   11.509606] ==================================================================
[   11.510045] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   11.510357] Write of size 8 at addr ffff888102b2d471 by task kunit_try_catch/193
[   11.510647] 
[   11.510753] CPU: 0 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT(voluntary) 
[   11.510794] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.510804] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.510823] Call Trace:
[   11.510834]  <TASK>
[   11.510847]  dump_stack_lvl+0x73/0xb0
[   11.510871]  print_report+0xd1/0x650
[   11.510901]  ? __virt_addr_valid+0x1db/0x2d0
[   11.510924]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.510957]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.510978]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.511000]  kasan_report+0x141/0x180
[   11.511021]  ? kmalloc_oob_memset_8+0x166/0x330
[   11.511047]  kasan_check_range+0x10c/0x1c0
[   11.511070]  __asan_memset+0x27/0x50
[   11.511097]  kmalloc_oob_memset_8+0x166/0x330
[   11.511119]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   11.511141]  ? __schedule+0x10cc/0x2b60
[   11.511164]  ? __pfx_read_tsc+0x10/0x10
[   11.511184]  ? ktime_get_ts64+0x86/0x230
[   11.511208]  kunit_try_run_case+0x1a5/0x480
[   11.511228]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.511247]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.511271]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.511295]  ? __kthread_parkme+0x82/0x180
[   11.511314]  ? preempt_count_sub+0x50/0x80
[   11.511337]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.511357]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.511381]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.511404]  kthread+0x337/0x6f0
[   11.511423]  ? trace_preempt_on+0x20/0xc0
[   11.511445]  ? __pfx_kthread+0x10/0x10
[   11.511464]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.511487]  ? calculate_sigpending+0x7b/0xa0
[   11.511509]  ? __pfx_kthread+0x10/0x10
[   11.511530]  ret_from_fork+0x116/0x1d0
[   11.511547]  ? __pfx_kthread+0x10/0x10
[   11.511567]  ret_from_fork_asm+0x1a/0x30
[   11.511596]  </TASK>
[   11.511606] 
[   11.519098] Allocated by task 193:
[   11.519223]  kasan_save_stack+0x45/0x70
[   11.519363]  kasan_save_track+0x18/0x40
[   11.519498]  kasan_save_alloc_info+0x3b/0x50
[   11.519681]  __kasan_kmalloc+0xb7/0xc0
[   11.520088]  __kmalloc_cache_noprof+0x189/0x420
[   11.520311]  kmalloc_oob_memset_8+0xac/0x330
[   11.520522]  kunit_try_run_case+0x1a5/0x480
[   11.520736]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.521073]  kthread+0x337/0x6f0
[   11.521230]  ret_from_fork+0x116/0x1d0
[   11.521403]  ret_from_fork_asm+0x1a/0x30
[   11.521543] 
[   11.521638] The buggy address belongs to the object at ffff888102b2d400
[   11.521638]  which belongs to the cache kmalloc-128 of size 128
[   11.522307] The buggy address is located 113 bytes inside of
[   11.522307]  allocated 120-byte region [ffff888102b2d400, ffff888102b2d478)
[   11.522788] 
[   11.522869] The buggy address belongs to the physical page:
[   11.523150] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b2d
[   11.523476] flags: 0x200000000000000(node=0|zone=2)
[   11.523726] page_type: f5(slab)
[   11.523890] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.524250] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.524728] page dumped because: kasan: bad access detected
[   11.524926] 
[   11.524994] Memory state around the buggy address:
[   11.525156]  ffff888102b2d300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.525372]  ffff888102b2d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.525676] >ffff888102b2d400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.526114]                                                                 ^
[   11.526336]  ffff888102b2d480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.526548]  ffff888102b2d500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.526757] ==================================================================