Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.790674] ==================================================================
[   16.790735] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   16.790814] Read of size 64 at addr fff00000c592f604 by task kunit_try_catch/182
[   16.790865] 
[   16.790893] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.791338] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.791436] Hardware name: linux,dummy-virt (DT)
[   16.791546] Call trace:
[   16.791576]  show_stack+0x20/0x38 (C)
[   16.791626]  dump_stack_lvl+0x8c/0xd0
[   16.791670]  print_report+0x118/0x5d0
[   16.791959]  kasan_report+0xdc/0x128
[   16.792136]  kasan_check_range+0x100/0x1a8
[   16.792245]  __asan_memmove+0x3c/0x98
[   16.792354]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   16.792454]  kunit_try_run_case+0x170/0x3f0
[   16.792499]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.792551]  kthread+0x328/0x630
[   16.792812]  ret_from_fork+0x10/0x20
[   16.793005] 
[   16.793062] Allocated by task 182:
[   16.793166]  kasan_save_stack+0x3c/0x68
[   16.793268]  kasan_save_track+0x20/0x40
[   16.793339]  kasan_save_alloc_info+0x40/0x58
[   16.793380]  __kasan_kmalloc+0xd4/0xd8
[   16.793439]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.793720]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   16.793845]  kunit_try_run_case+0x170/0x3f0
[   16.793978]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.794035]  kthread+0x328/0x630
[   16.794067]  ret_from_fork+0x10/0x20
[   16.794405] 
[   16.794454] The buggy address belongs to the object at fff00000c592f600
[   16.794454]  which belongs to the cache kmalloc-64 of size 64
[   16.794559] The buggy address is located 4 bytes inside of
[   16.794559]  allocated 64-byte region [fff00000c592f600, fff00000c592f640)
[   16.794668] 
[   16.794719] The buggy address belongs to the physical page:
[   16.794770] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592f
[   16.794836] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.795135] page_type: f5(slab)
[   16.795204] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   16.795284] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   16.795395] page dumped because: kasan: bad access detected
[   16.795446] 
[   16.795464] Memory state around the buggy address:
[   16.795496]  fff00000c592f500: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   16.795540]  fff00000c592f580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.795583] >fff00000c592f600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   16.795624]                                            ^
[   16.795833]  fff00000c592f680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.795925]  fff00000c592f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.795981] ==================================================================

[   13.188257] ==================================================================
[   13.188806] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   13.189304] Read of size 64 at addr ffff888103a50184 by task kunit_try_catch/199
[   13.189626] 
[   13.189738] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.189780] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.189791] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.189812] Call Trace:
[   13.189824]  <TASK>
[   13.189839]  dump_stack_lvl+0x73/0xb0
[   13.189869]  print_report+0xd1/0x610
[   13.189892]  ? __virt_addr_valid+0x1db/0x2d0
[   13.189916]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   13.189941]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.189964]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   13.190115]  kasan_report+0x141/0x180
[   13.190142]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   13.190173]  kasan_check_range+0x10c/0x1c0
[   13.190198]  __asan_memmove+0x27/0x70
[   13.190218]  kmalloc_memmove_invalid_size+0x16f/0x330
[   13.190243]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   13.190283]  ? __schedule+0x10cc/0x2b60
[   13.190306]  ? __pfx_read_tsc+0x10/0x10
[   13.190327]  ? ktime_get_ts64+0x86/0x230
[   13.190351]  kunit_try_run_case+0x1a5/0x480
[   13.190376]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.190399]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.190424]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.190448]  ? __kthread_parkme+0x82/0x180
[   13.190469]  ? preempt_count_sub+0x50/0x80
[   13.190493]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.190517]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.190542]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.190567]  kthread+0x337/0x6f0
[   13.190586]  ? trace_preempt_on+0x20/0xc0
[   13.190610]  ? __pfx_kthread+0x10/0x10
[   13.190630]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.190651]  ? calculate_sigpending+0x7b/0xa0
[   13.190676]  ? __pfx_kthread+0x10/0x10
[   13.190698]  ret_from_fork+0x116/0x1d0
[   13.190721]  ? __pfx_kthread+0x10/0x10
[   13.190741]  ret_from_fork_asm+0x1a/0x30
[   13.190771]  </TASK>
[   13.190781] 
[   13.198339] Allocated by task 199:
[   13.198519]  kasan_save_stack+0x45/0x70
[   13.198730]  kasan_save_track+0x18/0x40
[   13.198901]  kasan_save_alloc_info+0x3b/0x50
[   13.199127]  __kasan_kmalloc+0xb7/0xc0
[   13.199277]  __kmalloc_cache_noprof+0x189/0x420
[   13.199463]  kmalloc_memmove_invalid_size+0xac/0x330
[   13.199702]  kunit_try_run_case+0x1a5/0x480
[   13.199910]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.200237]  kthread+0x337/0x6f0
[   13.200423]  ret_from_fork+0x116/0x1d0
[   13.200615]  ret_from_fork_asm+0x1a/0x30
[   13.200812] 
[   13.200908] The buggy address belongs to the object at ffff888103a50180
[   13.200908]  which belongs to the cache kmalloc-64 of size 64
[   13.201561] The buggy address is located 4 bytes inside of
[   13.201561]  allocated 64-byte region [ffff888103a50180, ffff888103a501c0)
[   13.201926] 
[   13.202120] The buggy address belongs to the physical page:
[   13.202384] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a50
[   13.202737] flags: 0x200000000000000(node=0|zone=2)
[   13.203040] page_type: f5(slab)
[   13.203220] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   13.203564] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   13.203847] page dumped because: kasan: bad access detected
[   13.204125] 
[   13.204197] Memory state around the buggy address:
[   13.204380]  ffff888103a50080: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   13.204703]  ffff888103a50100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.205184] >ffff888103a50180: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   13.205523]                                            ^
[   13.205757]  ffff888103a50200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.206120]  ffff888103a50280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.206368] ==================================================================