Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.486150] ================================================================== [ 15.486232] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 15.486527] Read of size 18446744073709551614 at addr fff00000c3f5ce84 by task kunit_try_catch/180 [ 15.486943] [ 15.487007] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 15.487093] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.487152] Hardware name: linux,dummy-virt (DT) [ 15.487184] Call trace: [ 15.487225] show_stack+0x20/0x38 (C) [ 15.487277] dump_stack_lvl+0x8c/0xd0 [ 15.487332] print_report+0x118/0x5d0 [ 15.487379] kasan_report+0xdc/0x128 [ 15.487432] kasan_check_range+0x100/0x1a8 [ 15.487490] __asan_memmove+0x3c/0x98 [ 15.487542] kmalloc_memmove_negative_size+0x154/0x2e0 [ 15.487591] kunit_try_run_case+0x170/0x3f0 [ 15.487645] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.487697] kthread+0x328/0x630 [ 15.487746] ret_from_fork+0x10/0x20 [ 15.489663] [ 15.489694] Allocated by task 180: [ 15.489905] kasan_save_stack+0x3c/0x68 [ 15.490015] kasan_save_track+0x20/0x40 [ 15.490168] kasan_save_alloc_info+0x40/0x58 [ 15.490245] __kasan_kmalloc+0xd4/0xd8 [ 15.490592] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.490797] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 15.490908] kunit_try_run_case+0x170/0x3f0 [ 15.491064] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.491250] kthread+0x328/0x630 [ 15.491471] ret_from_fork+0x10/0x20 [ 15.491728] [ 15.491773] The buggy address belongs to the object at fff00000c3f5ce80 [ 15.491773] which belongs to the cache kmalloc-64 of size 64 [ 15.492013] The buggy address is located 4 bytes inside of [ 15.492013] 64-byte region [fff00000c3f5ce80, fff00000c3f5cec0) [ 15.492091] [ 15.492112] The buggy address belongs to the physical page: [ 15.492469] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f5c [ 15.492590] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.492757] page_type: f5(slab) [ 15.492875] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.493200] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.493354] page dumped because: kasan: bad access detected [ 15.493431] [ 15.493572] Memory state around the buggy address: [ 15.493657] fff00000c3f5cd80: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 15.493932] fff00000c3f5ce00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.494263] >fff00000c3f5ce80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 15.494348] ^ [ 15.494605] fff00000c3f5cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.494656] fff00000c3f5cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.494722] ==================================================================
[ 12.789107] ================================================================== [ 12.789823] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330 [ 12.790224] Read of size 18446744073709551614 at addr ffff888102b02984 by task kunit_try_catch/197 [ 12.790611] [ 12.790725] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 12.790768] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.790780] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.790801] Call Trace: [ 12.790826] <TASK> [ 12.790842] dump_stack_lvl+0x73/0xb0 [ 12.790871] print_report+0xd1/0x610 [ 12.790892] ? __virt_addr_valid+0x1db/0x2d0 [ 12.790914] ? kmalloc_memmove_negative_size+0x171/0x330 [ 12.790938] ? kasan_complete_mode_report_info+0x2a/0x200 [ 12.790959] ? kmalloc_memmove_negative_size+0x171/0x330 [ 12.790999] kasan_report+0x141/0x180 [ 12.791021] ? kmalloc_memmove_negative_size+0x171/0x330 [ 12.791051] kasan_check_range+0x10c/0x1c0 [ 12.791074] __asan_memmove+0x27/0x70 [ 12.791093] kmalloc_memmove_negative_size+0x171/0x330 [ 12.791117] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 12.791142] ? __schedule+0x10c6/0x2b60 [ 12.791165] ? __pfx_read_tsc+0x10/0x10 [ 12.791185] ? ktime_get_ts64+0x86/0x230 [ 12.791208] kunit_try_run_case+0x1a5/0x480 [ 12.791232] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.791253] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.791276] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.791299] ? __kthread_parkme+0x82/0x180 [ 12.791319] ? preempt_count_sub+0x50/0x80 [ 12.791341] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.791364] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.791387] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.791411] kthread+0x337/0x6f0 [ 12.791431] ? trace_preempt_on+0x20/0xc0 [ 12.791453] ? __pfx_kthread+0x10/0x10 [ 12.791473] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.791494] ? calculate_sigpending+0x7b/0xa0 [ 12.791517] ? __pfx_kthread+0x10/0x10 [ 12.791538] ret_from_fork+0x116/0x1d0 [ 12.791556] ? __pfx_kthread+0x10/0x10 [ 12.791576] ret_from_fork_asm+0x1a/0x30 [ 12.791605] </TASK> [ 12.791615] [ 12.799166] Allocated by task 197: [ 12.799510] kasan_save_stack+0x45/0x70 [ 12.799722] kasan_save_track+0x18/0x40 [ 12.799917] kasan_save_alloc_info+0x3b/0x50 [ 12.800135] __kasan_kmalloc+0xb7/0xc0 [ 12.800414] __kmalloc_cache_noprof+0x189/0x420 [ 12.800619] kmalloc_memmove_negative_size+0xac/0x330 [ 12.800844] kunit_try_run_case+0x1a5/0x480 [ 12.800993] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.801279] kthread+0x337/0x6f0 [ 12.801625] ret_from_fork+0x116/0x1d0 [ 12.801834] ret_from_fork_asm+0x1a/0x30 [ 12.802022] [ 12.802107] The buggy address belongs to the object at ffff888102b02980 [ 12.802107] which belongs to the cache kmalloc-64 of size 64 [ 12.802701] The buggy address is located 4 bytes inside of [ 12.802701] 64-byte region [ffff888102b02980, ffff888102b029c0) [ 12.803212] [ 12.803296] The buggy address belongs to the physical page: [ 12.803536] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b02 [ 12.803848] flags: 0x200000000000000(node=0|zone=2) [ 12.804081] page_type: f5(slab) [ 12.804395] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.804671] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.804916] page dumped because: kasan: bad access detected [ 12.805091] [ 12.805162] Memory state around the buggy address: [ 12.805317] ffff888102b02880: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 12.805624] ffff888102b02900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.806344] >ffff888102b02980: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 12.806629] ^ [ 12.806747] ffff888102b02a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.806976] ffff888102b02a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.807191] ==================================================================