Date
May 12, 2025, 11:48 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.816957] ================================================================== [ 16.817141] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 16.817254] Read of size 18446744073709551614 at addr fff00000c78cba04 by task kunit_try_catch/180 [ 16.817456] [ 16.817517] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT [ 16.817754] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.817829] Hardware name: linux,dummy-virt (DT) [ 16.817945] Call trace: [ 16.817986] show_stack+0x20/0x38 (C) [ 16.818087] dump_stack_lvl+0x8c/0xd0 [ 16.818180] print_report+0x118/0x608 [ 16.818277] kasan_report+0xdc/0x128 [ 16.818518] kasan_check_range+0x100/0x1a8 [ 16.818827] __asan_memmove+0x3c/0x98 [ 16.819106] kmalloc_memmove_negative_size+0x154/0x2e0 [ 16.819336] kunit_try_run_case+0x170/0x3f0 [ 16.819470] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.819615] kthread+0x328/0x630 [ 16.819698] ret_from_fork+0x10/0x20 [ 16.819922] [ 16.819963] Allocated by task 180: [ 16.820018] kasan_save_stack+0x3c/0x68 [ 16.820108] kasan_save_track+0x20/0x40 [ 16.820217] kasan_save_alloc_info+0x40/0x58 [ 16.820302] __kasan_kmalloc+0xd4/0xd8 [ 16.820373] __kmalloc_cache_noprof+0x15c/0x3c0 [ 16.820455] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 16.820538] kunit_try_run_case+0x170/0x3f0 [ 16.820784] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.820875] kthread+0x328/0x630 [ 16.821212] ret_from_fork+0x10/0x20 [ 16.821311] [ 16.822209] The buggy address belongs to the object at fff00000c78cba00 [ 16.822209] which belongs to the cache kmalloc-64 of size 64 [ 16.822352] The buggy address is located 4 bytes inside of [ 16.822352] 64-byte region [fff00000c78cba00, fff00000c78cba40) [ 16.822462] [ 16.822506] The buggy address belongs to the physical page: [ 16.822681] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cb [ 16.822970] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.823187] page_type: f5(slab) [ 16.823300] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 16.823455] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 16.823559] page dumped because: kasan: bad access detected [ 16.823651] [ 16.823688] Memory state around the buggy address: [ 16.823763] fff00000c78cb900: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 16.823896] fff00000c78cb980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.824018] >fff00000c78cba00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 16.824108] ^ [ 16.824164] fff00000c78cba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.824490] fff00000c78cbb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.824612] ==================================================================
[ 16.837396] ================================================================== [ 16.838236] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330 [ 16.838713] Read of size 18446744073709551614 at addr ffff888102316004 by task kunit_try_catch/197 [ 16.839581] [ 16.839890] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) [ 16.840015] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.840064] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.840109] Call Trace: [ 16.840140] <TASK> [ 16.840180] dump_stack_lvl+0x73/0xb0 [ 16.840249] print_report+0xd1/0x650 [ 16.840313] ? __virt_addr_valid+0x1db/0x2d0 [ 16.840367] ? kmalloc_memmove_negative_size+0x171/0x330 [ 16.840413] ? kasan_complete_mode_report_info+0x2a/0x200 [ 16.840680] ? kmalloc_memmove_negative_size+0x171/0x330 [ 16.840785] kasan_report+0x141/0x180 [ 16.840840] ? kmalloc_memmove_negative_size+0x171/0x330 [ 16.840890] kasan_check_range+0x10c/0x1c0 [ 16.840939] __asan_memmove+0x27/0x70 [ 16.840972] kmalloc_memmove_negative_size+0x171/0x330 [ 16.840999] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 16.841026] ? __schedule+0x10cc/0x2b60 [ 16.841064] ? __pfx_read_tsc+0x10/0x10 [ 16.841126] ? ktime_get_ts64+0x86/0x230 [ 16.841170] kunit_try_run_case+0x1a5/0x480 [ 16.841211] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.841236] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.841281] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.841309] ? __kthread_parkme+0x82/0x180 [ 16.841332] ? preempt_count_sub+0x50/0x80 [ 16.841358] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.841382] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.841406] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.841430] kthread+0x337/0x6f0 [ 16.841451] ? trace_preempt_on+0x20/0xc0 [ 16.841478] ? __pfx_kthread+0x10/0x10 [ 16.841499] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.841520] ? calculate_sigpending+0x7b/0xa0 [ 16.841546] ? __pfx_kthread+0x10/0x10 [ 16.841569] ret_from_fork+0x116/0x1d0 [ 16.841588] ? __pfx_kthread+0x10/0x10 [ 16.841610] ret_from_fork_asm+0x1a/0x30 [ 16.841643] </TASK> [ 16.841657] [ 16.854689] Allocated by task 197: [ 16.855023] kasan_save_stack+0x45/0x70 [ 16.855544] kasan_save_track+0x18/0x40 [ 16.855933] kasan_save_alloc_info+0x3b/0x50 [ 16.856707] __kasan_kmalloc+0xb7/0xc0 [ 16.857126] __kmalloc_cache_noprof+0x189/0x420 [ 16.857710] kmalloc_memmove_negative_size+0xac/0x330 [ 16.858007] kunit_try_run_case+0x1a5/0x480 [ 16.858478] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.858931] kthread+0x337/0x6f0 [ 16.859441] ret_from_fork+0x116/0x1d0 [ 16.859880] ret_from_fork_asm+0x1a/0x30 [ 16.860125] [ 16.860234] The buggy address belongs to the object at ffff888102316000 [ 16.860234] which belongs to the cache kmalloc-64 of size 64 [ 16.860493] The buggy address is located 4 bytes inside of [ 16.860493] 64-byte region [ffff888102316000, ffff888102316040) [ 16.860695] [ 16.860750] The buggy address belongs to the physical page: [ 16.860863] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102316 [ 16.861018] flags: 0x200000000000000(node=0|zone=2) [ 16.861130] page_type: f5(slab) [ 16.861223] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 16.862523] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 16.863346] page dumped because: kasan: bad access detected [ 16.863861] [ 16.864216] Memory state around the buggy address: [ 16.864683] ffff888102315f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.865427] ffff888102315f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.865696] >ffff888102316000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 16.866526] ^ [ 16.866752] ffff888102316080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.867287] ffff888102316100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.867630] ==================================================================