Hay
Date
May 12, 2025, 11:48 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.764607] ==================================================================
[   16.764734] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   16.764841] Write of size 8 at addr fff00000c78d9171 by task kunit_try_catch/176
[   16.764946] 
[   16.765013] CPU: 1 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT 
[   16.765695] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.765766] Hardware name: linux,dummy-virt (DT)
[   16.765930] Call trace:
[   16.765988]  show_stack+0x20/0x38 (C)
[   16.766127]  dump_stack_lvl+0x8c/0xd0
[   16.766302]  print_report+0x118/0x608
[   16.766621]  kasan_report+0xdc/0x128
[   16.766794]  kasan_check_range+0x100/0x1a8
[   16.766915]  __asan_memset+0x34/0x78
[   16.767356]  kmalloc_oob_memset_8+0x150/0x2f8
[   16.767643]  kunit_try_run_case+0x170/0x3f0
[   16.767826]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.768088]  kthread+0x328/0x630
[   16.768193]  ret_from_fork+0x10/0x20
[   16.768303] 
[   16.768343] Allocated by task 176:
[   16.768403]  kasan_save_stack+0x3c/0x68
[   16.768486]  kasan_save_track+0x20/0x40
[   16.768669]  kasan_save_alloc_info+0x40/0x58
[   16.768857]  __kasan_kmalloc+0xd4/0xd8
[   16.769280]  __kmalloc_cache_noprof+0x15c/0x3c0
[   16.769578]  kmalloc_oob_memset_8+0xb0/0x2f8
[   16.769698]  kunit_try_run_case+0x170/0x3f0
[   16.770059]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.770232]  kthread+0x328/0x630
[   16.770350]  ret_from_fork+0x10/0x20
[   16.770437] 
[   16.770666] The buggy address belongs to the object at fff00000c78d9100
[   16.770666]  which belongs to the cache kmalloc-128 of size 128
[   16.770796] The buggy address is located 113 bytes inside of
[   16.770796]  allocated 120-byte region [fff00000c78d9100, fff00000c78d9178)
[   16.770912] 
[   16.770955] The buggy address belongs to the physical page:
[   16.771125] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078d9
[   16.771346] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.771549] page_type: f5(slab)
[   16.771840] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.771941] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.772124] page dumped because: kasan: bad access detected
[   16.772337] 
[   16.772490] Memory state around the buggy address:
[   16.772564]  fff00000c78d9000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.772741]  fff00000c78d9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.772857] >fff00000c78d9100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.772937]                                                                 ^
[   16.773022]  fff00000c78d9180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.773125]  fff00000c78d9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.773208] ==================================================================

[   16.764186] ==================================================================
[   16.764925] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   16.765503] Write of size 8 at addr ffff888102b42771 by task kunit_try_catch/193
[   16.765951] 
[   16.766207] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) 
[   16.766338] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.766368] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.766406] Call Trace:
[   16.766431]  <TASK>
[   16.766461]  dump_stack_lvl+0x73/0xb0
[   16.766518]  print_report+0xd1/0x650
[   16.766559]  ? __virt_addr_valid+0x1db/0x2d0
[   16.766603]  ? kmalloc_oob_memset_8+0x166/0x330
[   16.766646]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.766732]  ? kmalloc_oob_memset_8+0x166/0x330
[   16.766794]  kasan_report+0x141/0x180
[   16.766841]  ? kmalloc_oob_memset_8+0x166/0x330
[   16.766896]  kasan_check_range+0x10c/0x1c0
[   16.766941]  __asan_memset+0x27/0x50
[   16.766984]  kmalloc_oob_memset_8+0x166/0x330
[   16.767076]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   16.767125]  ? __schedule+0x10cc/0x2b60
[   16.767164]  ? __pfx_read_tsc+0x10/0x10
[   16.767198]  ? ktime_get_ts64+0x86/0x230
[   16.767240]  kunit_try_run_case+0x1a5/0x480
[   16.767299]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.767343]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.767388]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.767437]  ? __kthread_parkme+0x82/0x180
[   16.767492]  ? preempt_count_sub+0x50/0x80
[   16.767544]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.767587]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.767632]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.767714]  kthread+0x337/0x6f0
[   16.767768]  ? trace_preempt_on+0x20/0xc0
[   16.767822]  ? __pfx_kthread+0x10/0x10
[   16.767861]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.767898]  ? calculate_sigpending+0x7b/0xa0
[   16.767934]  ? __pfx_kthread+0x10/0x10
[   16.767957]  ret_from_fork+0x116/0x1d0
[   16.767978]  ? __pfx_kthread+0x10/0x10
[   16.767999]  ret_from_fork_asm+0x1a/0x30
[   16.768046]  </TASK>
[   16.768071] 
[   16.781821] Allocated by task 193:
[   16.782293]  kasan_save_stack+0x45/0x70
[   16.782720]  kasan_save_track+0x18/0x40
[   16.782964]  kasan_save_alloc_info+0x3b/0x50
[   16.783434]  __kasan_kmalloc+0xb7/0xc0
[   16.783803]  __kmalloc_cache_noprof+0x189/0x420
[   16.784224]  kmalloc_oob_memset_8+0xac/0x330
[   16.784537]  kunit_try_run_case+0x1a5/0x480
[   16.784818]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.785246]  kthread+0x337/0x6f0
[   16.785565]  ret_from_fork+0x116/0x1d0
[   16.785884]  ret_from_fork_asm+0x1a/0x30
[   16.786227] 
[   16.786590] The buggy address belongs to the object at ffff888102b42700
[   16.786590]  which belongs to the cache kmalloc-128 of size 128
[   16.787887] The buggy address is located 113 bytes inside of
[   16.787887]  allocated 120-byte region [ffff888102b42700, ffff888102b42778)
[   16.788984] 
[   16.789313] The buggy address belongs to the physical page:
[   16.789707] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b42
[   16.790152] flags: 0x200000000000000(node=0|zone=2)
[   16.790548] page_type: f5(slab)
[   16.790916] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.791703] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.792543] page dumped because: kasan: bad access detected
[   16.793164] 
[   16.793367] Memory state around the buggy address:
[   16.793775]  ffff888102b42600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.794483]  ffff888102b42680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.795233] >ffff888102b42700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.795602]                                                                 ^
[   16.796214]  ffff888102b42780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.796713]  ffff888102b42800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.797130] ==================================================================