Hay
Date
July 3, 2025, 3:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.662250] ==================================================================
[   15.662617] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   15.662852] Read of size 18446744073709551614 at addr fff00000c7816e04 by task kunit_try_catch/183
[   15.663394] 
[   15.663510] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT 
[   15.663609] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.663828] Hardware name: linux,dummy-virt (DT)
[   15.663990] Call trace:
[   15.664109]  show_stack+0x20/0x38 (C)
[   15.664214]  dump_stack_lvl+0x8c/0xd0
[   15.664322]  print_report+0x118/0x608
[   15.664406]  kasan_report+0xdc/0x128
[   15.664630]  kasan_check_range+0x100/0x1a8
[   15.665152]  __asan_memmove+0x3c/0x98
[   15.665399]  kmalloc_memmove_negative_size+0x154/0x2e0
[   15.665585]  kunit_try_run_case+0x170/0x3f0
[   15.665844]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.666219]  kthread+0x328/0x630
[   15.666414]  ret_from_fork+0x10/0x20
[   15.666468] 
[   15.666487] Allocated by task 183:
[   15.667803]  kasan_save_stack+0x3c/0x68
[   15.668001]  kasan_save_track+0x20/0x40
[   15.668235]  kasan_save_alloc_info+0x40/0x58
[   15.668306]  __kasan_kmalloc+0xd4/0xd8
[   15.668682]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.668748]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   15.668987]  kunit_try_run_case+0x170/0x3f0
[   15.669132]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.669441]  kthread+0x328/0x630
[   15.669486]  ret_from_fork+0x10/0x20
[   15.669523] 
[   15.669665] The buggy address belongs to the object at fff00000c7816e00
[   15.669665]  which belongs to the cache kmalloc-64 of size 64
[   15.669887] The buggy address is located 4 bytes inside of
[   15.669887]  64-byte region [fff00000c7816e00, fff00000c7816e40)
[   15.670188] 
[   15.670310] The buggy address belongs to the physical page:
[   15.670402] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107816
[   15.670467] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.670627] page_type: f5(slab)
[   15.670674] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   15.670724] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   15.671130] page dumped because: kasan: bad access detected
[   15.671300] 
[   15.671823] Memory state around the buggy address:
[   15.671885]  fff00000c7816d00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   15.671966]  fff00000c7816d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   15.672164] >fff00000c7816e00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.672373]                    ^
[   15.672410]  fff00000c7816e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.672650]  fff00000c7816f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.672910] ==================================================================

[   11.372534] ==================================================================
[   11.373837] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   11.374579] Read of size 18446744073709551614 at addr ffff888102dcc884 by task kunit_try_catch/199
[   11.375530] 
[   11.375727] CPU: 1 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT(voluntary) 
[   11.375777] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.375788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.375810] Call Trace:
[   11.375823]  <TASK>
[   11.375842]  dump_stack_lvl+0x73/0xb0
[   11.375870]  print_report+0xd1/0x650
[   11.375894]  ? __virt_addr_valid+0x1db/0x2d0
[   11.375950]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.375973]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.376001]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.376043]  kasan_report+0x141/0x180
[   11.376066]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.376092]  kasan_check_range+0x10c/0x1c0
[   11.376112]  __asan_memmove+0x27/0x70
[   11.376132]  kmalloc_memmove_negative_size+0x171/0x330
[   11.376154]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.376178]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.376203]  kunit_try_run_case+0x1a5/0x480
[   11.376228]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.376259]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.376284]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.376307]  ? __kthread_parkme+0x82/0x180
[   11.376330]  ? preempt_count_sub+0x50/0x80
[   11.376356]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.376379]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.376401]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.376424]  kthread+0x337/0x6f0
[   11.376441]  ? trace_preempt_on+0x20/0xc0
[   11.376464]  ? __pfx_kthread+0x10/0x10
[   11.376482]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.376504]  ? calculate_sigpending+0x7b/0xa0
[   11.376526]  ? __pfx_kthread+0x10/0x10
[   11.376544]  ret_from_fork+0x41/0x80
[   11.376566]  ? __pfx_kthread+0x10/0x10
[   11.376583]  ret_from_fork_asm+0x1a/0x30
[   11.376614]  </TASK>
[   11.376625] 
[   11.389303] Allocated by task 199:
[   11.389730]  kasan_save_stack+0x45/0x70
[   11.390167]  kasan_save_track+0x18/0x40
[   11.390616]  kasan_save_alloc_info+0x3b/0x50
[   11.390870]  __kasan_kmalloc+0xb7/0xc0
[   11.391044]  __kmalloc_cache_noprof+0x189/0x420
[   11.391202]  kmalloc_memmove_negative_size+0xac/0x330
[   11.391705]  kunit_try_run_case+0x1a5/0x480
[   11.392146]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.392750]  kthread+0x337/0x6f0
[   11.393120]  ret_from_fork+0x41/0x80
[   11.393507]  ret_from_fork_asm+0x1a/0x30
[   11.393803] 
[   11.394049] The buggy address belongs to the object at ffff888102dcc880
[   11.394049]  which belongs to the cache kmalloc-64 of size 64
[   11.394807] The buggy address is located 4 bytes inside of
[   11.394807]  64-byte region [ffff888102dcc880, ffff888102dcc8c0)
[   11.395141] 
[   11.395214] The buggy address belongs to the physical page:
[   11.395741] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102dcc
[   11.396477] flags: 0x200000000000000(node=0|zone=2)
[   11.396983] page_type: f5(slab)
[   11.397187] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.397862] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.398494] page dumped because: kasan: bad access detected
[   11.398674] 
[   11.398884] Memory state around the buggy address:
[   11.399322]  ffff888102dcc780: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   11.400200]  ffff888102dcc800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.400796] >ffff888102dcc880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.401010]                    ^
[   11.401123]  ffff888102dcc900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.401374]  ffff888102dcc980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.401920] ==================================================================