Hay
Date
May 12, 2025, 6:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.881487] ==================================================================
[   18.882446] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e8
[   18.883843] Read of size 64 at addr fff00000c5a02c04 by task kunit_try_catch/171
[   18.884399] 
[   18.884650] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   18.884823] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.884857] Hardware name: linux,dummy-virt (DT)
[   18.884896] Call trace:
[   18.884927]  show_stack+0x20/0x38 (C)
[   18.885008]  dump_stack_lvl+0x8c/0xd0
[   18.885062]  print_report+0x118/0x608
[   18.885110]  kasan_report+0xdc/0x128
[   18.885157]  kasan_check_range+0x100/0x1a8
[   18.885206]  __asan_memmove+0x3c/0x98
[   18.885251]  kmalloc_memmove_invalid_size+0x154/0x2e8
[   18.885302]  kunit_try_run_case+0x170/0x3f0
[   18.885350]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.885402]  kthread+0x318/0x620
[   18.885448]  ret_from_fork+0x10/0x20
[   18.885499] 
[   18.891680] Allocated by task 171:
[   18.892110]  kasan_save_stack+0x3c/0x68
[   18.893212]  kasan_save_track+0x20/0x40
[   18.893678]  kasan_save_alloc_info+0x40/0x58
[   18.894035]  __kasan_kmalloc+0xd4/0xd8
[   18.895000]  __kmalloc_cache_noprof+0x15c/0x3c0
[   18.895500]  kmalloc_memmove_invalid_size+0xb0/0x2e8
[   18.896205]  kunit_try_run_case+0x170/0x3f0
[   18.896778]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.897426]  kthread+0x318/0x620
[   18.897945]  ret_from_fork+0x10/0x20
[   18.898504] 
[   18.899220] The buggy address belongs to the object at fff00000c5a02c00
[   18.899220]  which belongs to the cache kmalloc-64 of size 64
[   18.899963] The buggy address is located 4 bytes inside of
[   18.899963]  allocated 64-byte region [fff00000c5a02c00, fff00000c5a02c40)
[   18.901643] 
[   18.901831] The buggy address belongs to the physical page:
[   18.902196] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a02
[   18.903261] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.903881] page_type: f5(slab)
[   18.904368] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   18.904932] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   18.905585] page dumped because: kasan: bad access detected
[   18.906091] 
[   18.906378] Memory state around the buggy address:
[   18.906900]  fff00000c5a02b00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   18.907463]  fff00000c5a02b80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   18.907996] >fff00000c5a02c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   18.908584]                                            ^
[   18.909199]  fff00000c5a02c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.909708]  fff00000c5a02d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.910426] ==================================================================

[   12.658507] ==================================================================
[   12.659294] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x170/0x330
[   12.660581] Read of size 64 at addr ffff888102ad8484 by task kunit_try_catch/190
[   12.660874] 
[   12.660983] CPU: 0 UID: 0 PID: 190 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   12.661035] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.661049] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.661070] Call Trace:
[   12.661089]  <TASK>
[   12.661121]  dump_stack_lvl+0x73/0xb0
[   12.661155]  print_report+0xd1/0x650
[   12.661178]  ? __virt_addr_valid+0x1db/0x2d0
[   12.661200]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.661224]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.661249]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.661272]  kasan_report+0x140/0x180
[   12.661294]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.661321]  kasan_check_range+0x10c/0x1c0
[   12.661344]  __asan_memmove+0x27/0x70
[   12.661366]  kmalloc_memmove_invalid_size+0x170/0x330
[   12.661389]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   12.661412]  ? __schedule+0xce8/0x2840
[   12.661437]  ? __pfx_read_tsc+0x10/0x10
[   12.661459]  ? ktime_get_ts64+0x86/0x230
[   12.661485]  kunit_try_run_case+0x1a6/0x480
[   12.661510]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.661530]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.661551]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.661575]  ? __kthread_parkme+0x82/0x160
[   12.661597]  ? preempt_count_sub+0x50/0x80
[   12.661622]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.661644]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.661669]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.661694]  kthread+0x324/0x6e0
[   12.661715]  ? trace_preempt_on+0x20/0xc0
[   12.661738]  ? __pfx_kthread+0x10/0x10
[   12.661766]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.661788]  ? calculate_sigpending+0x7b/0xa0
[   12.661809]  ? __pfx_kthread+0x10/0x10
[   12.661831]  ret_from_fork+0x41/0x80
[   12.661859]  ? __pfx_kthread+0x10/0x10
[   12.661881]  ret_from_fork_asm+0x1a/0x30
[   12.661912]  </TASK>
[   12.661923] 
[   12.676032] Allocated by task 190:
[   12.676495]  kasan_save_stack+0x45/0x70
[   12.676907]  kasan_save_track+0x18/0x40
[   12.677289]  kasan_save_alloc_info+0x3b/0x50
[   12.677671]  __kasan_kmalloc+0xb7/0xc0
[   12.677813]  __kmalloc_cache_noprof+0x18a/0x420
[   12.677979]  kmalloc_memmove_invalid_size+0xad/0x330
[   12.678275]  kunit_try_run_case+0x1a6/0x480
[   12.678670]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.679361]  kthread+0x324/0x6e0
[   12.679669]  ret_from_fork+0x41/0x80
[   12.680012]  ret_from_fork_asm+0x1a/0x30
[   12.680460] 
[   12.680627] The buggy address belongs to the object at ffff888102ad8480
[   12.680627]  which belongs to the cache kmalloc-64 of size 64
[   12.681658] The buggy address is located 4 bytes inside of
[   12.681658]  allocated 64-byte region [ffff888102ad8480, ffff888102ad84c0)
[   12.682158] 
[   12.682356] The buggy address belongs to the physical page:
[   12.682830] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad8
[   12.683751] flags: 0x200000000000000(node=0|zone=2)
[   12.684314] page_type: f5(slab)
[   12.684692] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.685272] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.685502] page dumped because: kasan: bad access detected
[   12.685674] 
[   12.685751] Memory state around the buggy address:
[   12.685930]  ffff888102ad8380: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   12.686237]  ffff888102ad8400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.686644] >ffff888102ad8480: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.686891]                                            ^
[   12.687647]  ffff888102ad8500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.687999]  ffff888102ad8580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.688323] ==================================================================