Hay
Date
July 17, 2025, 10:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.596039] ==================================================================
[   29.596120] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   29.596229] Write of size 8 at addr fff00000c9b1e171 by task kunit_try_catch/207
[   29.596283] 
[   29.596317] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT 
[   29.596878] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.596909] Hardware name: linux,dummy-virt (DT)
[   29.597343] Call trace:
[   29.597499]  show_stack+0x20/0x38 (C)
[   29.597602]  dump_stack_lvl+0x8c/0xd0
[   29.597909]  print_report+0x118/0x5d0
[   29.597985]  kasan_report+0xdc/0x128
[   29.598399]  kasan_check_range+0x100/0x1a8
[   29.598714]  __asan_memset+0x34/0x78
[   29.598917]  kmalloc_oob_memset_8+0x150/0x2f8
[   29.599010]  kunit_try_run_case+0x170/0x3f0
[   29.599148]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.599223]  kthread+0x328/0x630
[   29.599603]  ret_from_fork+0x10/0x20
[   29.599762] 
[   29.599839] Allocated by task 207:
[   29.600008]  kasan_save_stack+0x3c/0x68
[   29.600169]  kasan_save_track+0x20/0x40
[   29.600209]  kasan_save_alloc_info+0x40/0x58
[   29.600271]  __kasan_kmalloc+0xd4/0xd8
[   29.600637]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.600763]  kmalloc_oob_memset_8+0xb0/0x2f8
[   29.600868]  kunit_try_run_case+0x170/0x3f0
[   29.601018]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.601183]  kthread+0x328/0x630
[   29.601221]  ret_from_fork+0x10/0x20
[   29.601256] 
[   29.601305] The buggy address belongs to the object at fff00000c9b1e100
[   29.601305]  which belongs to the cache kmalloc-128 of size 128
[   29.601664] The buggy address is located 113 bytes inside of
[   29.601664]  allocated 120-byte region [fff00000c9b1e100, fff00000c9b1e178)
[   29.601814] 
[   29.601901] The buggy address belongs to the physical page:
[   29.602017] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b1e
[   29.602116] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.602208] page_type: f5(slab)
[   29.602372] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.602630] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.602939] page dumped because: kasan: bad access detected
[   29.602995] 
[   29.603097] Memory state around the buggy address:
[   29.603181]  fff00000c9b1e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.603304]  fff00000c9b1e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.603408] >fff00000c9b1e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.603525]                                                                 ^
[   29.603606]  fff00000c9b1e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.603682]  fff00000c9b1e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.603991] ==================================================================

[   25.803130] ==================================================================
[   25.803702] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   25.804004] Write of size 8 at addr ffff88810553d771 by task kunit_try_catch/225
[   25.804280] 
[   25.804380] CPU: 0 UID: 0 PID: 225 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   25.804424] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.804435] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.804455] Call Trace:
[   25.804466]  <TASK>
[   25.804479]  dump_stack_lvl+0x73/0xb0
[   25.804507]  print_report+0xd1/0x610
[   25.804528]  ? __virt_addr_valid+0x1db/0x2d0
[   25.804550]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.804570]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.804594]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.804615]  kasan_report+0x141/0x180
[   25.804636]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.804663]  kasan_check_range+0x10c/0x1c0
[   25.804685]  __asan_memset+0x27/0x50
[   25.804708]  kmalloc_oob_memset_8+0x166/0x330
[   25.804729]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   25.804751]  ? __schedule+0x10c6/0x2b60
[   25.804773]  ? __pfx_read_tsc+0x10/0x10
[   25.804793]  ? ktime_get_ts64+0x86/0x230
[   25.804816]  kunit_try_run_case+0x1a5/0x480
[   25.804838]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.804859]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.804881]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.804904]  ? __kthread_parkme+0x82/0x180
[   25.804927]  ? preempt_count_sub+0x50/0x80
[   25.804949]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.804972]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.804994]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.805016]  kthread+0x337/0x6f0
[   25.805034]  ? trace_preempt_on+0x20/0xc0
[   25.805057]  ? __pfx_kthread+0x10/0x10
[   25.805170]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.805199]  ? calculate_sigpending+0x7b/0xa0
[   25.805222]  ? __pfx_kthread+0x10/0x10
[   25.805355]  ret_from_fork+0x116/0x1d0
[   25.805384]  ? __pfx_kthread+0x10/0x10
[   25.805406]  ret_from_fork_asm+0x1a/0x30
[   25.805437]  </TASK>
[   25.805448] 
[   25.814231] Allocated by task 225:
[   25.814457]  kasan_save_stack+0x45/0x70
[   25.814651]  kasan_save_track+0x18/0x40
[   25.814801]  kasan_save_alloc_info+0x3b/0x50
[   25.814996]  __kasan_kmalloc+0xb7/0xc0
[   25.815158]  __kmalloc_cache_noprof+0x189/0x420
[   25.815496]  kmalloc_oob_memset_8+0xac/0x330
[   25.815683]  kunit_try_run_case+0x1a5/0x480
[   25.815870]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.816095]  kthread+0x337/0x6f0
[   25.816327]  ret_from_fork+0x116/0x1d0
[   25.816491]  ret_from_fork_asm+0x1a/0x30
[   25.816675] 
[   25.816749] The buggy address belongs to the object at ffff88810553d700
[   25.816749]  which belongs to the cache kmalloc-128 of size 128
[   25.817121] The buggy address is located 113 bytes inside of
[   25.817121]  allocated 120-byte region [ffff88810553d700, ffff88810553d778)
[   25.817789] 
[   25.817872] The buggy address belongs to the physical page:
[   25.818041] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10553d
[   25.818415] flags: 0x200000000000000(node=0|zone=2)
[   25.818658] page_type: f5(slab)
[   25.818818] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.819172] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.819503] page dumped because: kasan: bad access detected
[   25.819858] 
[   25.819929] Memory state around the buggy address:
[   25.820125]  ffff88810553d600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.820630]  ffff88810553d680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.820922] >ffff88810553d700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.821161]                                                                 ^
[   25.821364]  ffff88810553d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.821668]  ffff88810553d800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.822061] ==================================================================