Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.843607] ==================================================================
[   21.843914] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   21.844154] Read of size 64 at addr fff00000c5e38704 by task kunit_try_catch/182
[   21.844272] 
[   21.844413] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   21.844728] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.844817] Hardware name: linux,dummy-virt (DT)
[   21.844929] Call trace:
[   21.844997]  show_stack+0x20/0x38 (C)
[   21.845140]  dump_stack_lvl+0x8c/0xd0
[   21.845316]  print_report+0x118/0x608
[   21.845484]  kasan_report+0xdc/0x128
[   21.845594]  kasan_check_range+0x100/0x1a8
[   21.845922]  __asan_memmove+0x3c/0x98
[   21.846122]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   21.846481]  kunit_try_run_case+0x170/0x3f0
[   21.846658]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.846860]  kthread+0x328/0x630
[   21.847077]  ret_from_fork+0x10/0x20
[   21.847445] 
[   21.847516] Allocated by task 182:
[   21.847602]  kasan_save_stack+0x3c/0x68
[   21.847729]  kasan_save_track+0x20/0x40
[   21.847834]  kasan_save_alloc_info+0x40/0x58
[   21.847929]  __kasan_kmalloc+0xd4/0xd8
[   21.848021]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.848194]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   21.848423]  kunit_try_run_case+0x170/0x3f0
[   21.848787]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.848989]  kthread+0x328/0x630
[   21.849091]  ret_from_fork+0x10/0x20
[   21.849532] 
[   21.849672] The buggy address belongs to the object at fff00000c5e38700
[   21.849672]  which belongs to the cache kmalloc-64 of size 64
[   21.849886] The buggy address is located 4 bytes inside of
[   21.849886]  allocated 64-byte region [fff00000c5e38700, fff00000c5e38740)
[   21.850056] 
[   21.850305] The buggy address belongs to the physical page:
[   21.850443] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105e38
[   21.850570] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.850677] page_type: f5(slab)
[   21.850763] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   21.850876] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   21.850954] page dumped because: kasan: bad access detected
[   21.851026] 
[   21.851068] Memory state around the buggy address:
[   21.851445]  fff00000c5e38600: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   21.851644]  fff00000c5e38680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   21.851776] >fff00000c5e38700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   21.852178]                                            ^
[   21.852335]  fff00000c5e38780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.852449]  fff00000c5e38800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.852658] ==================================================================


[   11.079105] ==================================================================
[   11.079693] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   11.080309] Read of size 64 at addr ffff8881028a0584 by task kunit_try_catch/199
[   11.080985] 
[   11.081109] CPU: 1 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   11.081157] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.081183] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.081203] Call Trace:
[   11.081215]  <TASK>
[   11.081229]  dump_stack_lvl+0x73/0xb0
[   11.081257]  print_report+0xd1/0x650
[   11.081280]  ? __virt_addr_valid+0x1db/0x2d0
[   11.081302]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   11.081326]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.081348]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   11.081381]  kasan_report+0x141/0x180
[   11.081403]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   11.081432]  kasan_check_range+0x10c/0x1c0
[   11.081455]  __asan_memmove+0x27/0x70
[   11.081475]  kmalloc_memmove_invalid_size+0x16f/0x330
[   11.081499]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   11.081535]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   11.081564]  kunit_try_run_case+0x1a5/0x480
[   11.081584]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.081604]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.081642]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.081666]  ? __kthread_parkme+0x82/0x180
[   11.081686]  ? preempt_count_sub+0x50/0x80
[   11.081709]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.081729]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.081812]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.081840]  kthread+0x337/0x6f0
[   11.081859]  ? trace_preempt_on+0x20/0xc0
[   11.081882]  ? __pfx_kthread+0x10/0x10
[   11.081903]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.081925]  ? calculate_sigpending+0x7b/0xa0
[   11.081948]  ? __pfx_kthread+0x10/0x10
[   11.081969]  ret_from_fork+0x116/0x1d0
[   11.081988]  ? __pfx_kthread+0x10/0x10
[   11.082008]  ret_from_fork_asm+0x1a/0x30
[   11.082038]  </TASK>
[   11.082047] 
[   11.089501] Allocated by task 199:
[   11.089652]  kasan_save_stack+0x45/0x70
[   11.090004]  kasan_save_track+0x18/0x40
[   11.090207]  kasan_save_alloc_info+0x3b/0x50
[   11.090418]  __kasan_kmalloc+0xb7/0xc0
[   11.090633]  __kmalloc_cache_noprof+0x189/0x420
[   11.090938]  kmalloc_memmove_invalid_size+0xac/0x330
[   11.091184]  kunit_try_run_case+0x1a5/0x480
[   11.091335]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.091593]  kthread+0x337/0x6f0
[   11.091792]  ret_from_fork+0x116/0x1d0
[   11.091982]  ret_from_fork_asm+0x1a/0x30
[   11.092175] 
[   11.092259] The buggy address belongs to the object at ffff8881028a0580
[   11.092259]  which belongs to the cache kmalloc-64 of size 64
[   11.092718] The buggy address is located 4 bytes inside of
[   11.092718]  allocated 64-byte region [ffff8881028a0580, ffff8881028a05c0)
[   11.093302] 
[   11.093400] The buggy address belongs to the physical page:
[   11.093906] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028a0
[   11.094233] flags: 0x200000000000000(node=0|zone=2)
[   11.094454] page_type: f5(slab)
[   11.094624] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.095032] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.095385] page dumped because: kasan: bad access detected
[   11.095566] 
[   11.096274] Memory state around the buggy address:
[   11.096691]  ffff8881028a0480: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   11.097736]  ffff8881028a0500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.098067] >ffff8881028a0580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.098416]                                            ^
[   11.098670]  ffff8881028a0600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.099221]  ffff8881028a0680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.099472] ==================================================================