Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   27.594077] ==================================================================
[   27.594323] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   27.594772] Write of size 4 at addr fff00000c5a34c75 by task kunit_try_catch/176
[   27.594979] 
[   27.595162] CPU: 0 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   27.595568] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.595683] Hardware name: linux,dummy-virt (DT)
[   27.595874] Call trace:
[   27.596053]  show_stack+0x20/0x38 (C)
[   27.596334]  dump_stack_lvl+0x8c/0xd0
[   27.596522]  print_report+0x118/0x608
[   27.596933]  kasan_report+0xdc/0x128
[   27.597100]  kasan_check_range+0x100/0x1a8
[   27.597172]  __asan_memset+0x34/0x78
[   27.597235]  kmalloc_oob_memset_4+0x150/0x300
[   27.597303]  kunit_try_run_case+0x170/0x3f0
[   27.597371]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.597459]  kthread+0x328/0x630
[   27.597802]  ret_from_fork+0x10/0x20
[   27.598031] 
[   27.598099] Allocated by task 176:
[   27.598570]  kasan_save_stack+0x3c/0x68
[   27.598789]  kasan_save_track+0x20/0x40
[   27.598917]  kasan_save_alloc_info+0x40/0x58
[   27.599088]  __kasan_kmalloc+0xd4/0xd8
[   27.599205]  __kmalloc_cache_noprof+0x15c/0x3c0
[   27.599687]  kmalloc_oob_memset_4+0xb0/0x300
[   27.599963]  kunit_try_run_case+0x170/0x3f0
[   27.600140]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.600292]  kthread+0x328/0x630
[   27.600396]  ret_from_fork+0x10/0x20
[   27.600501] 
[   27.600550] The buggy address belongs to the object at fff00000c5a34c00
[   27.600550]  which belongs to the cache kmalloc-128 of size 128
[   27.600728] The buggy address is located 117 bytes inside of
[   27.600728]  allocated 120-byte region [fff00000c5a34c00, fff00000c5a34c78)
[   27.600915] 
[   27.600985] The buggy address belongs to the physical page:
[   27.601109] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a34
[   27.601381] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.601747] page_type: f5(slab)
[   27.602004] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   27.602241] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.602368] page dumped because: kasan: bad access detected
[   27.602471] 
[   27.602523] Memory state around the buggy address:
[   27.602617]  fff00000c5a34b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.602745]  fff00000c5a34b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.602871] >fff00000c5a34c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.602983]                                                                 ^
[   27.603101]  fff00000c5a34c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.603226]  fff00000c5a34d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.603340] ==================================================================

[   12.674723] ==================================================================
[   12.675414] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   12.675710] Write of size 4 at addr ffff888102a2d575 by task kunit_try_catch/193
[   12.676116] 
[   12.676542] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.676590] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.676602] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.676623] Call Trace:
[   12.676634]  <TASK>
[   12.676650]  dump_stack_lvl+0x73/0xb0
[   12.676679]  print_report+0xd1/0x650
[   12.676702]  ? __virt_addr_valid+0x1db/0x2d0
[   12.676723]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.676744]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.676766]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.676788]  kasan_report+0x141/0x180
[   12.676811]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.676837]  kasan_check_range+0x10c/0x1c0
[   12.676857]  __asan_memset+0x27/0x50
[   12.676876]  kmalloc_oob_memset_4+0x166/0x330
[   12.676899]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.676922]  ? __schedule+0x10cc/0x2b30
[   12.676944]  ? __pfx_read_tsc+0x10/0x10
[   12.676964]  ? ktime_get_ts64+0x86/0x230
[   12.676989]  kunit_try_run_case+0x1a5/0x480
[   12.677013]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.677035]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.677058]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.677079]  ? __kthread_parkme+0x82/0x180
[   12.677101]  ? preempt_count_sub+0x50/0x80
[   12.677126]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.677148]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.677170]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.677192]  kthread+0x337/0x6f0
[   12.677208]  ? trace_preempt_on+0x20/0xc0
[   12.677230]  ? __pfx_kthread+0x10/0x10
[   12.677248]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.677268]  ? calculate_sigpending+0x7b/0xa0
[   12.677302]  ? __pfx_kthread+0x10/0x10
[   12.677328]  ret_from_fork+0x41/0x80
[   12.677348]  ? __pfx_kthread+0x10/0x10
[   12.677365]  ret_from_fork_asm+0x1a/0x30
[   12.677397]  </TASK>
[   12.677408] 
[   12.685258] Allocated by task 193:
[   12.685517]  kasan_save_stack+0x45/0x70
[   12.685737]  kasan_save_track+0x18/0x40
[   12.685896]  kasan_save_alloc_info+0x3b/0x50
[   12.686042]  __kasan_kmalloc+0xb7/0xc0
[   12.686250]  __kmalloc_cache_noprof+0x189/0x420
[   12.686478]  kmalloc_oob_memset_4+0xac/0x330
[   12.686768]  kunit_try_run_case+0x1a5/0x480
[   12.686918]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.687473]  kthread+0x337/0x6f0
[   12.687655]  ret_from_fork+0x41/0x80
[   12.687802]  ret_from_fork_asm+0x1a/0x30
[   12.688097] 
[   12.688199] The buggy address belongs to the object at ffff888102a2d500
[   12.688199]  which belongs to the cache kmalloc-128 of size 128
[   12.688603] The buggy address is located 117 bytes inside of
[   12.688603]  allocated 120-byte region [ffff888102a2d500, ffff888102a2d578)
[   12.689146] 
[   12.689372] The buggy address belongs to the physical page:
[   12.689609] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a2d
[   12.689884] flags: 0x200000000000000(node=0|zone=2)
[   12.690173] page_type: f5(slab)
[   12.690355] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.690700] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.690958] page dumped because: kasan: bad access detected
[   12.691214] 
[   12.691287] Memory state around the buggy address:
[   12.691564]  ffff888102a2d400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.691839]  ffff888102a2d480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.692144] >ffff888102a2d500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.692370]                                                                 ^
[   12.692582]  ffff888102a2d580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.692844]  ffff888102a2d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.693160] ==================================================================