Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.710004] ==================================================================
[   19.710552] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   19.710732] Write of size 4 at addr fff00000c6345b75 by task kunit_try_catch/174
[   19.711056] 
[   19.711168] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.711400] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.711453] Hardware name: linux,dummy-virt (DT)
[   19.711518] Call trace:
[   19.711566]  show_stack+0x20/0x38 (C)
[   19.711924]  dump_stack_lvl+0x8c/0xd0
[   19.712078]  print_report+0x118/0x608
[   19.712203]  kasan_report+0xdc/0x128
[   19.712365]  kasan_check_range+0x100/0x1a8
[   19.712494]  __asan_memset+0x34/0x78
[   19.712600]  kmalloc_oob_memset_4+0x150/0x300
[   19.712753]  kunit_try_run_case+0x170/0x3f0
[   19.712902]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.713014]  kthread+0x328/0x630
[   19.713120]  ret_from_fork+0x10/0x20
[   19.713220] 
[   19.713271] Allocated by task 174:
[   19.713359]  kasan_save_stack+0x3c/0x68
[   19.713479]  kasan_save_track+0x20/0x40
[   19.713587]  kasan_save_alloc_info+0x40/0x58
[   19.713686]  __kasan_kmalloc+0xd4/0xd8
[   19.713751]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.713828]  kmalloc_oob_memset_4+0xb0/0x300
[   19.713904]  kunit_try_run_case+0x170/0x3f0
[   19.714370]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.714497]  kthread+0x328/0x630
[   19.714564]  ret_from_fork+0x10/0x20
[   19.714795] 
[   19.714913] The buggy address belongs to the object at fff00000c6345b00
[   19.714913]  which belongs to the cache kmalloc-128 of size 128
[   19.715088] The buggy address is located 117 bytes inside of
[   19.715088]  allocated 120-byte region [fff00000c6345b00, fff00000c6345b78)
[   19.715261] 
[   19.715326] The buggy address belongs to the physical page:
[   19.715400] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106345
[   19.715506] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.715838] page_type: f5(slab)
[   19.715928] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.716053] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.716145] page dumped because: kasan: bad access detected
[   19.716212] 
[   19.716249] Memory state around the buggy address:
[   19.716317]  fff00000c6345a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.716413]  fff00000c6345a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.716670] >fff00000c6345b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.716772]                                                                 ^
[   19.716892]  fff00000c6345b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.717439]  fff00000c6345c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.717598] ==================================================================

[   11.633292] ==================================================================
[   11.635339] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   11.637238] Write of size 4 at addr ffff888103173d75 by task kunit_try_catch/191
[   11.637487] 
[   11.637586] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.637632] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.637643] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.637664] Call Trace:
[   11.637677]  <TASK>
[   11.637693]  dump_stack_lvl+0x73/0xb0
[   11.637725]  print_report+0xd1/0x650
[   11.637748]  ? __virt_addr_valid+0x1db/0x2d0
[   11.637771]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.637791]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.637812]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.637833]  kasan_report+0x141/0x180
[   11.637854]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.637879]  kasan_check_range+0x10c/0x1c0
[   11.637901]  __asan_memset+0x27/0x50
[   11.637919]  kmalloc_oob_memset_4+0x166/0x330
[   11.637939]  ? __kasan_check_write+0x18/0x20
[   11.637957]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   11.637979]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   11.638003]  ? __pfx_read_tsc+0x10/0x10
[   11.638024]  ? ktime_get_ts64+0x86/0x230
[   11.638049]  kunit_try_run_case+0x1a5/0x480
[   11.638073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.638094]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   11.638114]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.638147]  ? __kthread_parkme+0x82/0x180
[   11.638168]  ? preempt_count_sub+0x50/0x80
[   11.638192]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.638215]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.638236]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.638258]  kthread+0x337/0x6f0
[   11.638276]  ? trace_preempt_on+0x20/0xc0
[   11.638299]  ? __pfx_kthread+0x10/0x10
[   11.638319]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.638338]  ? calculate_sigpending+0x7b/0xa0
[   11.638361]  ? __pfx_kthread+0x10/0x10
[   11.638381]  ret_from_fork+0x116/0x1d0
[   11.638398]  ? __pfx_kthread+0x10/0x10
[   11.638418]  ret_from_fork_asm+0x1a/0x30
[   11.638447]  </TASK>
[   11.638458] 
[   11.654342] Allocated by task 191:
[   11.654797]  kasan_save_stack+0x45/0x70
[   11.655380]  kasan_save_track+0x18/0x40
[   11.655732]  kasan_save_alloc_info+0x3b/0x50
[   11.655894]  __kasan_kmalloc+0xb7/0xc0
[   11.656028]  __kmalloc_cache_noprof+0x189/0x420
[   11.656435]  kmalloc_oob_memset_4+0xac/0x330
[   11.656751]  kunit_try_run_case+0x1a5/0x480
[   11.657162]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.657568]  kthread+0x337/0x6f0
[   11.657734]  ret_from_fork+0x116/0x1d0
[   11.657907]  ret_from_fork_asm+0x1a/0x30
[   11.658088] 
[   11.658504] The buggy address belongs to the object at ffff888103173d00
[   11.658504]  which belongs to the cache kmalloc-128 of size 128
[   11.659247] The buggy address is located 117 bytes inside of
[   11.659247]  allocated 120-byte region [ffff888103173d00, ffff888103173d78)
[   11.660051] 
[   11.660318] The buggy address belongs to the physical page:
[   11.660662] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103173
[   11.660945] flags: 0x200000000000000(node=0|zone=2)
[   11.661195] page_type: f5(slab)
[   11.661354] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.661650] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.662100] page dumped because: kasan: bad access detected
[   11.662336] 
[   11.662430] Memory state around the buggy address:
[   11.662647]  ffff888103173c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.663032]  ffff888103173c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.663411] >ffff888103173d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.663655]                                                                 ^
[   11.663938]  ffff888103173d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.664189]  ffff888103173e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.664631] ==================================================================