Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.937155] ==================================================================
[   32.937272] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   32.937440] Write of size 2 at addr fff00000c63f7177 by task kunit_try_catch/184
[   32.937643] 
[   32.937975] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   32.938228] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.938297] Hardware name: linux,dummy-virt (DT)
[   32.938372] Call trace:
[   32.938532]  show_stack+0x20/0x38 (C)
[   32.938660]  dump_stack_lvl+0x8c/0xd0
[   32.938864]  print_report+0x118/0x608
[   32.938975]  kasan_report+0xdc/0x128
[   32.939100]  kasan_check_range+0x100/0x1a8
[   32.939213]  __asan_memset+0x34/0x78
[   32.939313]  kmalloc_oob_memset_2+0x150/0x2f8
[   32.939421]  kunit_try_run_case+0x170/0x3f0
[   32.939534]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.939654]  kthread+0x328/0x630
[   32.939757]  ret_from_fork+0x10/0x20
[   32.939870] 
[   32.939914] Allocated by task 184:
[   32.940315]  kasan_save_stack+0x3c/0x68
[   32.940488]  kasan_save_track+0x20/0x40
[   32.940598]  kasan_save_alloc_info+0x40/0x58
[   32.940809]  __kasan_kmalloc+0xd4/0xd8
[   32.941063]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.941270]  kmalloc_oob_memset_2+0xb0/0x2f8
[   32.941607]  kunit_try_run_case+0x170/0x3f0
[   32.941920]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.942156]  kthread+0x328/0x630
[   32.942298]  ret_from_fork+0x10/0x20
[   32.942396] 
[   32.942445] The buggy address belongs to the object at fff00000c63f7100
[   32.942445]  which belongs to the cache kmalloc-128 of size 128
[   32.942690] The buggy address is located 119 bytes inside of
[   32.942690]  allocated 120-byte region [fff00000c63f7100, fff00000c63f7178)
[   32.942966] 
[   32.943244] The buggy address belongs to the physical page:
[   32.943327] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063f7
[   32.943466] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.943811] page_type: f5(slab)
[   32.944181] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   32.944304] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   32.944484] page dumped because: kasan: bad access detected
[   32.944562] 
[   32.946611] Memory state around the buggy address:
[   32.946699]  fff00000c63f7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.946815]  fff00000c63f7080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.946969] >fff00000c63f7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   32.947077]                                                                 ^
[   32.947460]  fff00000c63f7180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.947562]  fff00000c63f7200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.947648] ==================================================================

[   21.836888] ==================================================================
[   21.838270] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   21.838993] Write of size 2 at addr ffff888102b4ec77 by task kunit_try_catch/201
[   21.839245] 
[   21.839360] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   21.839463] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.839483] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.839514] Call Trace:
[   21.839536]  <TASK>
[   21.839563]  dump_stack_lvl+0x73/0xb0
[   21.839612]  print_report+0xd1/0x650
[   21.839644]  ? __virt_addr_valid+0x1db/0x2d0
[   21.839682]  ? kmalloc_oob_memset_2+0x166/0x330
[   21.839714]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.839751]  ? kmalloc_oob_memset_2+0x166/0x330
[   21.839786]  kasan_report+0x141/0x180
[   21.839824]  ? kmalloc_oob_memset_2+0x166/0x330
[   21.839867]  kasan_check_range+0x10c/0x1c0
[   21.839907]  __asan_memset+0x27/0x50
[   21.839948]  kmalloc_oob_memset_2+0x166/0x330
[   21.839984]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   21.840066]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   21.840109]  kunit_try_run_case+0x1a5/0x480
[   21.840151]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.840190]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.840230]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.840269]  ? __kthread_parkme+0x82/0x180
[   21.840306]  ? preempt_count_sub+0x50/0x80
[   21.840349]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.840406]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.840448]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.840489]  kthread+0x337/0x6f0
[   21.840519]  ? trace_preempt_on+0x20/0xc0
[   21.840555]  ? __pfx_kthread+0x10/0x10
[   21.840583]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.840612]  ? calculate_sigpending+0x7b/0xa0
[   21.840649]  ? __pfx_kthread+0x10/0x10
[   21.840683]  ret_from_fork+0x116/0x1d0
[   21.840710]  ? __pfx_kthread+0x10/0x10
[   21.840738]  ret_from_fork_asm+0x1a/0x30
[   21.840787]  </TASK>
[   21.840805] 
[   21.853587] Allocated by task 201:
[   21.854185]  kasan_save_stack+0x45/0x70
[   21.854403]  kasan_save_track+0x18/0x40
[   21.854931]  kasan_save_alloc_info+0x3b/0x50
[   21.855106]  __kasan_kmalloc+0xb7/0xc0
[   21.855463]  __kmalloc_cache_noprof+0x189/0x420
[   21.855816]  kmalloc_oob_memset_2+0xac/0x330
[   21.856328]  kunit_try_run_case+0x1a5/0x480
[   21.856486]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.857069]  kthread+0x337/0x6f0
[   21.857338]  ret_from_fork+0x116/0x1d0
[   21.857638]  ret_from_fork_asm+0x1a/0x30
[   21.858409] 
[   21.858528] The buggy address belongs to the object at ffff888102b4ec00
[   21.858528]  which belongs to the cache kmalloc-128 of size 128
[   21.859341] The buggy address is located 119 bytes inside of
[   21.859341]  allocated 120-byte region [ffff888102b4ec00, ffff888102b4ec78)
[   21.860176] 
[   21.860470] The buggy address belongs to the physical page:
[   21.860972] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b4e
[   21.861228] flags: 0x200000000000000(node=0|zone=2)
[   21.861621] page_type: f5(slab)
[   21.861865] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   21.862968] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.863360] page dumped because: kasan: bad access detected
[   21.863862] 
[   21.863987] Memory state around the buggy address:
[   21.864151]  ffff888102b4eb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.865099]  ffff888102b4eb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.865438] >ffff888102b4ec00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.866107]                                                                 ^
[   21.866581]  ffff888102b4ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.866942]  ffff888102b4ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.867876] ==================================================================