Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.333067] ==================================================================
[   19.333161] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   19.333253] Write of size 2 at addr fff00000c4065377 by task kunit_try_catch/172
[   19.333308] 
[   19.333357] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   19.333456] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.333487] Hardware name: linux,dummy-virt (DT)
[   19.334019] Call trace:
[   19.334077]  show_stack+0x20/0x38 (C)
[   19.334148]  dump_stack_lvl+0x8c/0xd0
[   19.334219]  print_report+0x118/0x608
[   19.334701]  kasan_report+0xdc/0x128
[   19.334967]  kasan_check_range+0x100/0x1a8
[   19.335042]  __asan_memset+0x34/0x78
[   19.335347]  kmalloc_oob_memset_2+0x150/0x2f8
[   19.335474]  kunit_try_run_case+0x170/0x3f0
[   19.335541]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.335863]  kthread+0x328/0x630
[   19.335943]  ret_from_fork+0x10/0x20
[   19.336290] 
[   19.336369] Allocated by task 172:
[   19.336410]  kasan_save_stack+0x3c/0x68
[   19.336479]  kasan_save_track+0x20/0x40
[   19.336761]  kasan_save_alloc_info+0x40/0x58
[   19.336845]  __kasan_kmalloc+0xd4/0xd8
[   19.336908]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.336952]  kmalloc_oob_memset_2+0xb0/0x2f8
[   19.337011]  kunit_try_run_case+0x170/0x3f0
[   19.337222]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.337594]  kthread+0x328/0x630
[   19.337648]  ret_from_fork+0x10/0x20
[   19.337691] 
[   19.337954] The buggy address belongs to the object at fff00000c4065300
[   19.337954]  which belongs to the cache kmalloc-128 of size 128
[   19.338068] The buggy address is located 119 bytes inside of
[   19.338068]  allocated 120-byte region [fff00000c4065300, fff00000c4065378)
[   19.338139] 
[   19.338415] The buggy address belongs to the physical page:
[   19.338547] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104065
[   19.338619] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.338870] page_type: f5(slab)
[   19.339063] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.339127] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.339174] page dumped because: kasan: bad access detected
[   19.339211] 
[   19.339232] Memory state around the buggy address:
[   19.339408]  fff00000c4065200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.339483]  fff00000c4065280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.339534] >fff00000c4065300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.339760]                                                                 ^
[   19.339826]  fff00000c4065380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.340119]  fff00000c4065400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.340259] ==================================================================

[   11.163669] ==================================================================
[   11.165065] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   11.166152] Write of size 2 at addr ffff8881029ce377 by task kunit_try_catch/189
[   11.167100] 
[   11.167504] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   11.167605] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.167627] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.167648] Call Trace:
[   11.167663]  <TASK>
[   11.167683]  dump_stack_lvl+0x73/0xb0
[   11.167751]  print_report+0xd1/0x650
[   11.167774]  ? __virt_addr_valid+0x1db/0x2d0
[   11.167799]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.167820]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.167842]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.167865]  kasan_report+0x141/0x180
[   11.167887]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.167913]  kasan_check_range+0x10c/0x1c0
[   11.167937]  __asan_memset+0x27/0x50
[   11.167956]  kmalloc_oob_memset_2+0x166/0x330
[   11.167979]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.168001]  ? __schedule+0x10cc/0x2b60
[   11.168023]  ? __pfx_read_tsc+0x10/0x10
[   11.168044]  ? ktime_get_ts64+0x86/0x230
[   11.168070]  kunit_try_run_case+0x1a5/0x480
[   11.168097]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.168119]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.168142]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.168183]  ? __kthread_parkme+0x82/0x180
[   11.168205]  ? preempt_count_sub+0x50/0x80
[   11.168231]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.168254]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.168276]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.168299]  kthread+0x337/0x6f0
[   11.168318]  ? trace_preempt_on+0x20/0xc0
[   11.168343]  ? __pfx_kthread+0x10/0x10
[   11.168363]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.168383]  ? calculate_sigpending+0x7b/0xa0
[   11.168408]  ? __pfx_kthread+0x10/0x10
[   11.168429]  ret_from_fork+0x116/0x1d0
[   11.168448]  ? __pfx_kthread+0x10/0x10
[   11.168468]  ret_from_fork_asm+0x1a/0x30
[   11.168500]  </TASK>
[   11.168527] 
[   11.185128] Allocated by task 189:
[   11.185627]  kasan_save_stack+0x45/0x70
[   11.185971]  kasan_save_track+0x18/0x40
[   11.186550]  kasan_save_alloc_info+0x3b/0x50
[   11.186715]  __kasan_kmalloc+0xb7/0xc0
[   11.187192]  __kmalloc_cache_noprof+0x189/0x420
[   11.187753]  kmalloc_oob_memset_2+0xac/0x330
[   11.188211]  kunit_try_run_case+0x1a5/0x480
[   11.188542]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.189124]  kthread+0x337/0x6f0
[   11.189430]  ret_from_fork+0x116/0x1d0
[   11.189796]  ret_from_fork_asm+0x1a/0x30
[   11.189937] 
[   11.190010] The buggy address belongs to the object at ffff8881029ce300
[   11.190010]  which belongs to the cache kmalloc-128 of size 128
[   11.191156] The buggy address is located 119 bytes inside of
[   11.191156]  allocated 120-byte region [ffff8881029ce300, ffff8881029ce378)
[   11.192741] 
[   11.193084] The buggy address belongs to the physical page:
[   11.193569] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ce
[   11.194159] flags: 0x200000000000000(node=0|zone=2)
[   11.194740] page_type: f5(slab)
[   11.195011] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.195372] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.196052] page dumped because: kasan: bad access detected
[   11.196352] 
[   11.196536] Memory state around the buggy address:
[   11.197051]  ffff8881029ce200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.197375]  ffff8881029ce280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.198110] >ffff8881029ce300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.198623]                                                                 ^
[   11.199158]  ffff8881029ce380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.199662]  ffff8881029ce400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.199880] ==================================================================