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

Environment
qemu-arm64
qemu-x86_64

[   15.402873] ==================================================================
[   15.402932] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   15.403229] Write of size 2 at addr fff00000c3f17d77 by task kunit_try_catch/172
[   15.403682] 
[   15.403859] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.404003] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.404063] Hardware name: linux,dummy-virt (DT)
[   15.404097] Call trace:
[   15.404147]  show_stack+0x20/0x38 (C)
[   15.404207]  dump_stack_lvl+0x8c/0xd0
[   15.404528]  print_report+0x118/0x5d0
[   15.404667]  kasan_report+0xdc/0x128
[   15.404729]  kasan_check_range+0x100/0x1a8
[   15.405013]  __asan_memset+0x34/0x78
[   15.405074]  kmalloc_oob_memset_2+0x150/0x2f8
[   15.405305]  kunit_try_run_case+0x170/0x3f0
[   15.405480]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.405927]  kthread+0x328/0x630
[   15.406038]  ret_from_fork+0x10/0x20
[   15.406116] 
[   15.406135] Allocated by task 172:
[   15.406164]  kasan_save_stack+0x3c/0x68
[   15.406204]  kasan_save_track+0x20/0x40
[   15.406242]  kasan_save_alloc_info+0x40/0x58
[   15.406301]  __kasan_kmalloc+0xd4/0xd8
[   15.406360]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.406407]  kmalloc_oob_memset_2+0xb0/0x2f8
[   15.406444]  kunit_try_run_case+0x170/0x3f0
[   15.406490]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.406532]  kthread+0x328/0x630
[   15.406564]  ret_from_fork+0x10/0x20
[   15.406615] 
[   15.406634] The buggy address belongs to the object at fff00000c3f17d00
[   15.406634]  which belongs to the cache kmalloc-128 of size 128
[   15.406704] The buggy address is located 119 bytes inside of
[   15.406704]  allocated 120-byte region [fff00000c3f17d00, fff00000c3f17d78)
[   15.406766] 
[   15.406786] The buggy address belongs to the physical page:
[   15.406816] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f17
[   15.406867] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.406912] page_type: f5(slab)
[   15.406950] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.407007] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.407046] page dumped because: kasan: bad access detected
[   15.407076] 
[   15.407093] Memory state around the buggy address:
[   15.407131]  fff00000c3f17c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.407173]  fff00000c3f17c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.407222] >fff00000c3f17d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.407258]                                                                 ^
[   15.407296]  fff00000c3f17d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.407345]  fff00000c3f17e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.407382] ==================================================================

[   12.251698] ==================================================================
[   12.252209] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   12.252838] Write of size 2 at addr ffff8881029ce277 by task kunit_try_catch/191
[   12.253338] 
[   12.253457] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.253511] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.253522] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.253541] Call Trace:
[   12.253551]  <TASK>
[   12.253564]  dump_stack_lvl+0x73/0xb0
[   12.253592]  print_report+0xd1/0x610
[   12.253613]  ? __virt_addr_valid+0x1db/0x2d0
[   12.253634]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.253654]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.253676]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.253697]  kasan_report+0x141/0x180
[   12.253719]  ? kmalloc_oob_memset_2+0x166/0x330
[   12.253744]  kasan_check_range+0x10c/0x1c0
[   12.253766]  __asan_memset+0x27/0x50
[   12.253785]  kmalloc_oob_memset_2+0x166/0x330
[   12.253816]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   12.253838]  ? __schedule+0x10cc/0x2b60
[   12.253860]  ? __pfx_read_tsc+0x10/0x10
[   12.253889]  ? ktime_get_ts64+0x86/0x230
[   12.253913]  kunit_try_run_case+0x1a5/0x480
[   12.253935]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.253956]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.253980]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.254003]  ? __kthread_parkme+0x82/0x180
[   12.254069]  ? preempt_count_sub+0x50/0x80
[   12.254092]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.254114]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.254138]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.254161]  kthread+0x337/0x6f0
[   12.254179]  ? trace_preempt_on+0x20/0xc0
[   12.254200]  ? __pfx_kthread+0x10/0x10
[   12.254220]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.254240]  ? calculate_sigpending+0x7b/0xa0
[   12.254263]  ? __pfx_kthread+0x10/0x10
[   12.254295]  ret_from_fork+0x116/0x1d0
[   12.254312]  ? __pfx_kthread+0x10/0x10
[   12.254331]  ret_from_fork_asm+0x1a/0x30
[   12.254360]  </TASK>
[   12.254369] 
[   12.262240] Allocated by task 191:
[   12.262456]  kasan_save_stack+0x45/0x70
[   12.262661]  kasan_save_track+0x18/0x40
[   12.262854]  kasan_save_alloc_info+0x3b/0x50
[   12.263205]  __kasan_kmalloc+0xb7/0xc0
[   12.263634]  __kmalloc_cache_noprof+0x189/0x420
[   12.263829]  kmalloc_oob_memset_2+0xac/0x330
[   12.264158]  kunit_try_run_case+0x1a5/0x480
[   12.264368]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.264678]  kthread+0x337/0x6f0
[   12.264855]  ret_from_fork+0x116/0x1d0
[   12.265031]  ret_from_fork_asm+0x1a/0x30
[   12.265168] 
[   12.265239] The buggy address belongs to the object at ffff8881029ce200
[   12.265239]  which belongs to the cache kmalloc-128 of size 128
[   12.265611] The buggy address is located 119 bytes inside of
[   12.265611]  allocated 120-byte region [ffff8881029ce200, ffff8881029ce278)
[   12.266576] 
[   12.266680] The buggy address belongs to the physical page:
[   12.266945] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ce
[   12.267454] flags: 0x200000000000000(node=0|zone=2)
[   12.267663] page_type: f5(slab)
[   12.267870] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.268451] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.268685] page dumped because: kasan: bad access detected
[   12.268862] 
[   12.268976] Memory state around the buggy address:
[   12.269269]  ffff8881029ce100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.269936]  ffff8881029ce180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.270373] >ffff8881029ce200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.270669]                                                                 ^
[   12.270906]  ffff8881029ce280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.271381]  ffff8881029ce300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.271752] ==================================================================