Hay
Date
July 18, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.387060] ==================================================================
[   15.387118] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   15.387169] Write of size 128 at addr fff00000c3f17c00 by task kunit_try_catch/170
[   15.387238] 
[   15.387271] CPU: 1 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.387364] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.387391] Hardware name: linux,dummy-virt (DT)
[   15.387422] Call trace:
[   15.387446]  show_stack+0x20/0x38 (C)
[   15.387494]  dump_stack_lvl+0x8c/0xd0
[   15.387542]  print_report+0x118/0x5d0
[   15.387588]  kasan_report+0xdc/0x128
[   15.387634]  kasan_check_range+0x100/0x1a8
[   15.387693]  __asan_memset+0x34/0x78
[   15.387744]  kmalloc_oob_in_memset+0x144/0x2d0
[   15.387790]  kunit_try_run_case+0x170/0x3f0
[   15.387837]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.387888]  kthread+0x328/0x630
[   15.387929]  ret_from_fork+0x10/0x20
[   15.387977] 
[   15.387995] Allocated by task 170:
[   15.388022]  kasan_save_stack+0x3c/0x68
[   15.388061]  kasan_save_track+0x20/0x40
[   15.388097]  kasan_save_alloc_info+0x40/0x58
[   15.388137]  __kasan_kmalloc+0xd4/0xd8
[   15.388182]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.388220]  kmalloc_oob_in_memset+0xb0/0x2d0
[   15.388256]  kunit_try_run_case+0x170/0x3f0
[   15.388293]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.388790]  kthread+0x328/0x630
[   15.388843]  ret_from_fork+0x10/0x20
[   15.388881] 
[   15.388902] The buggy address belongs to the object at fff00000c3f17c00
[   15.388902]  which belongs to the cache kmalloc-128 of size 128
[   15.389462] The buggy address is located 0 bytes inside of
[   15.389462]  allocated 120-byte region [fff00000c3f17c00, fff00000c3f17c78)
[   15.389802] 
[   15.389903] The buggy address belongs to the physical page:
[   15.389938] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f17
[   15.390003] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.390390] page_type: f5(slab)
[   15.390544] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.390641] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.390776] page dumped because: kasan: bad access detected
[   15.390847] 
[   15.390966] Memory state around the buggy address:
[   15.391032]  fff00000c3f17b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.391081]  fff00000c3f17b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.391379] >fff00000c3f17c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.391449]                                                                 ^
[   15.391597]  fff00000c3f17c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.391662]  fff00000c3f17d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.391827] ==================================================================

[   12.229004] ==================================================================
[   12.229466] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   12.229787] Write of size 128 at addr ffff8881029ce100 by task kunit_try_catch/189
[   12.230122] 
[   12.230233] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.230287] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.230298] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.230318] Call Trace:
[   12.230329]  <TASK>
[   12.230343]  dump_stack_lvl+0x73/0xb0
[   12.230382]  print_report+0xd1/0x610
[   12.230403]  ? __virt_addr_valid+0x1db/0x2d0
[   12.230426]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.230459]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.230481]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.230502]  kasan_report+0x141/0x180
[   12.230523]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.230550]  kasan_check_range+0x10c/0x1c0
[   12.230573]  __asan_memset+0x27/0x50
[   12.230591]  kmalloc_oob_in_memset+0x15f/0x320
[   12.230612]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   12.230655]  ? __schedule+0x10cc/0x2b60
[   12.230677]  ? __pfx_read_tsc+0x10/0x10
[   12.230696]  ? ktime_get_ts64+0x86/0x230
[   12.230719]  kunit_try_run_case+0x1a5/0x480
[   12.230753]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.230774]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.230797]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.230819]  ? __kthread_parkme+0x82/0x180
[   12.230839]  ? preempt_count_sub+0x50/0x80
[   12.230862]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.230885]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.230918]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.230941]  kthread+0x337/0x6f0
[   12.230959]  ? trace_preempt_on+0x20/0xc0
[   12.230992]  ? __pfx_kthread+0x10/0x10
[   12.231012]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.231032]  ? calculate_sigpending+0x7b/0xa0
[   12.231055]  ? __pfx_kthread+0x10/0x10
[   12.231075]  ret_from_fork+0x116/0x1d0
[   12.231093]  ? __pfx_kthread+0x10/0x10
[   12.231123]  ret_from_fork_asm+0x1a/0x30
[   12.231164]  </TASK>
[   12.231174] 
[   12.238635] Allocated by task 189:
[   12.238775]  kasan_save_stack+0x45/0x70
[   12.239153]  kasan_save_track+0x18/0x40
[   12.239469]  kasan_save_alloc_info+0x3b/0x50
[   12.239925]  __kasan_kmalloc+0xb7/0xc0
[   12.240247]  __kmalloc_cache_noprof+0x189/0x420
[   12.240545]  kmalloc_oob_in_memset+0xac/0x320
[   12.240707]  kunit_try_run_case+0x1a5/0x480
[   12.240854]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.241038]  kthread+0x337/0x6f0
[   12.241189]  ret_from_fork+0x116/0x1d0
[   12.241385]  ret_from_fork_asm+0x1a/0x30
[   12.241629] 
[   12.241728] The buggy address belongs to the object at ffff8881029ce100
[   12.241728]  which belongs to the cache kmalloc-128 of size 128
[   12.242493] The buggy address is located 0 bytes inside of
[   12.242493]  allocated 120-byte region [ffff8881029ce100, ffff8881029ce178)
[   12.243254] 
[   12.243382] The buggy address belongs to the physical page:
[   12.243864] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ce
[   12.244144] flags: 0x200000000000000(node=0|zone=2)
[   12.244321] page_type: f5(slab)
[   12.244442] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.244776] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.245170] page dumped because: kasan: bad access detected
[   12.245409] 
[   12.245477] Memory state around the buggy address:
[   12.245631]  ffff8881029ce000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.246256]  ffff8881029ce080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.246658] >ffff8881029ce100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.246942]                                                                 ^
[   12.247285]  ffff8881029ce180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.247615]  ffff8881029ce200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.247911] ==================================================================