Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.208675] ==================================================================
[   17.208766] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   17.208838] Write of size 128 at addr fff00000c6fb0300 by task kunit_try_catch/172
[   17.209131] 
[   17.209180] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   17.209263] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.209298] Hardware name: linux,dummy-virt (DT)
[   17.209661] Call trace:
[   17.209752]  show_stack+0x20/0x38 (C)
[   17.209816]  dump_stack_lvl+0x8c/0xd0
[   17.209917]  print_report+0x118/0x5d0
[   17.209983]  kasan_report+0xdc/0x128
[   17.210027]  kasan_check_range+0x100/0x1a8
[   17.210421]  __asan_memset+0x34/0x78
[   17.210498]  kmalloc_oob_in_memset+0x144/0x2d0
[   17.210607]  kunit_try_run_case+0x170/0x3f0
[   17.210704]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.210783]  kthread+0x328/0x630
[   17.210921]  ret_from_fork+0x10/0x20
[   17.211027] 
[   17.211201] Allocated by task 172:
[   17.211237]  kasan_save_stack+0x3c/0x68
[   17.211293]  kasan_save_track+0x20/0x40
[   17.211329]  kasan_save_alloc_info+0x40/0x58
[   17.211563]  __kasan_kmalloc+0xd4/0xd8
[   17.211672]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.211750]  kmalloc_oob_in_memset+0xb0/0x2d0
[   17.211880]  kunit_try_run_case+0x170/0x3f0
[   17.211981]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.212121]  kthread+0x328/0x630
[   17.212201]  ret_from_fork+0x10/0x20
[   17.212264] 
[   17.212293] The buggy address belongs to the object at fff00000c6fb0300
[   17.212293]  which belongs to the cache kmalloc-128 of size 128
[   17.212737] The buggy address is located 0 bytes inside of
[   17.212737]  allocated 120-byte region [fff00000c6fb0300, fff00000c6fb0378)
[   17.212884] 
[   17.212943] The buggy address belongs to the physical page:
[   17.212991] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fb0
[   17.213110] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.213187] page_type: f5(slab)
[   17.213234] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.213617] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.213770] page dumped because: kasan: bad access detected
[   17.213849] 
[   17.213944] Memory state around the buggy address:
[   17.214049]  fff00000c6fb0200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.214113]  fff00000c6fb0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.214325] >fff00000c6fb0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.214470]                                                                 ^
[   17.214621]  fff00000c6fb0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.214749]  fff00000c6fb0400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.214914] ==================================================================

[   11.145730] ==================================================================
[   11.146140] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   11.146416] Write of size 128 at addr ffff8881028aff00 by task kunit_try_catch/190
[   11.146712] 
[   11.146934] CPU: 1 UID: 0 PID: 190 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   11.146984] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.146995] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.147016] Call Trace:
[   11.147028]  <TASK>
[   11.147084]  dump_stack_lvl+0x73/0xb0
[   11.147111]  print_report+0xd1/0x610
[   11.147133]  ? __virt_addr_valid+0x1db/0x2d0
[   11.147155]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.147176]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.147198]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.147268]  kasan_report+0x141/0x180
[   11.147289]  ? kmalloc_oob_in_memset+0x15f/0x320
[   11.147316]  kasan_check_range+0x10c/0x1c0
[   11.147335]  __asan_memset+0x27/0x50
[   11.147354]  kmalloc_oob_in_memset+0x15f/0x320
[   11.147389]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   11.147411]  ? __schedule+0x10c6/0x2b60
[   11.147434]  ? __pfx_read_tsc+0x10/0x10
[   11.147453]  ? ktime_get_ts64+0x86/0x230
[   11.147502]  kunit_try_run_case+0x1a5/0x480
[   11.147523]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.147541]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.147561]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.147584]  ? __kthread_parkme+0x82/0x180
[   11.147605]  ? preempt_count_sub+0x50/0x80
[   11.147629]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.147648]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.147670]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.147726]  kthread+0x337/0x6f0
[   11.147743]  ? trace_preempt_on+0x20/0xc0
[   11.147766]  ? __pfx_kthread+0x10/0x10
[   11.147783]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.147804]  ? calculate_sigpending+0x7b/0xa0
[   11.147825]  ? __pfx_kthread+0x10/0x10
[   11.147843]  ret_from_fork+0x41/0x80
[   11.147862]  ? __pfx_kthread+0x10/0x10
[   11.147879]  ret_from_fork_asm+0x1a/0x30
[   11.147910]  </TASK>
[   11.147920] 
[   11.161278] Allocated by task 190:
[   11.161532]  kasan_save_stack+0x45/0x70
[   11.161885]  kasan_save_track+0x18/0x40
[   11.162284]  kasan_save_alloc_info+0x3b/0x50
[   11.162896]  __kasan_kmalloc+0xb7/0xc0
[   11.163308]  __kmalloc_cache_noprof+0x189/0x420
[   11.163745]  kmalloc_oob_in_memset+0xac/0x320
[   11.164186]  kunit_try_run_case+0x1a5/0x480
[   11.164578]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.164919]  kthread+0x337/0x6f0
[   11.165043]  ret_from_fork+0x41/0x80
[   11.165173]  ret_from_fork_asm+0x1a/0x30
[   11.165325] 
[   11.165427] The buggy address belongs to the object at ffff8881028aff00
[   11.165427]  which belongs to the cache kmalloc-128 of size 128
[   11.166109] The buggy address is located 0 bytes inside of
[   11.166109]  allocated 120-byte region [ffff8881028aff00, ffff8881028aff78)
[   11.166602] 
[   11.166756] The buggy address belongs to the physical page:
[   11.166970] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028af
[   11.167272] flags: 0x200000000000000(node=0|zone=2)
[   11.167512] page_type: f5(slab)
[   11.167847] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.168164] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.168516] page dumped because: kasan: bad access detected
[   11.168806] 
[   11.168902] Memory state around the buggy address:
[   11.169099]  ffff8881028afe00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.169335]  ffff8881028afe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.169649] >ffff8881028aff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.169958]                                                                 ^
[   11.170200]  ffff8881028aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.170721]  ffff8881028b0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.170987] ==================================================================