Date
June 5, 2025, 7:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 25.334947] ================================================================== [ 25.335101] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 25.335216] Read of size 18446744073709551614 at addr fff00000c7781d04 by task kunit_try_catch/180 [ 25.337120] [ 25.337212] CPU: 0 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT [ 25.337428] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.337465] Hardware name: linux,dummy-virt (DT) [ 25.337509] Call trace: [ 25.337537] show_stack+0x20/0x38 (C) [ 25.337601] dump_stack_lvl+0x8c/0xd0 [ 25.337661] print_report+0x118/0x608 [ 25.337720] kasan_report+0xdc/0x128 [ 25.337776] kasan_check_range+0x100/0x1a8 [ 25.337835] __asan_memmove+0x3c/0x98 [ 25.337887] kmalloc_memmove_negative_size+0x154/0x2e0 [ 25.337948] kunit_try_run_case+0x170/0x3f0 [ 25.338009] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.338298] kthread+0x328/0x630 [ 25.338412] ret_from_fork+0x10/0x20 [ 25.338612] [ 25.338674] Allocated by task 180: [ 25.339033] kasan_save_stack+0x3c/0x68 [ 25.339472] kasan_save_track+0x20/0x40 [ 25.340291] kasan_save_alloc_info+0x40/0x58 [ 25.340461] __kasan_kmalloc+0xd4/0xd8 [ 25.340588] __kmalloc_cache_noprof+0x16c/0x3c0 [ 25.340687] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 25.340822] kunit_try_run_case+0x170/0x3f0 [ 25.341306] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.341483] kthread+0x328/0x630 [ 25.341611] ret_from_fork+0x10/0x20 [ 25.341884] [ 25.341935] The buggy address belongs to the object at fff00000c7781d00 [ 25.341935] which belongs to the cache kmalloc-64 of size 64 [ 25.342119] The buggy address is located 4 bytes inside of [ 25.342119] 64-byte region [fff00000c7781d00, fff00000c7781d40) [ 25.342304] [ 25.343478] The buggy address belongs to the physical page: [ 25.343560] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107781 [ 25.343706] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 25.343822] page_type: f5(slab) [ 25.343930] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 25.344070] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 25.344179] page dumped because: kasan: bad access detected [ 25.344732] [ 25.344797] Memory state around the buggy address: [ 25.345006] fff00000c7781c00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 25.345190] fff00000c7781c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.345323] >fff00000c7781d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 25.345455] ^ [ 25.345738] fff00000c7781d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.345931] fff00000c7781e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.346431] ==================================================================
[ 11.571700] ================================================================== [ 11.572469] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330 [ 11.573067] Read of size 18446744073709551614 at addr ffff888102b3b104 by task kunit_try_catch/197 [ 11.573758] [ 11.574018] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT(voluntary) [ 11.574067] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.574078] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.574099] Call Trace: [ 11.574233] <TASK> [ 11.574255] dump_stack_lvl+0x73/0xb0 [ 11.574284] print_report+0xd1/0x650 [ 11.574306] ? __virt_addr_valid+0x1db/0x2d0 [ 11.574328] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.574353] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.574375] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.574420] kasan_report+0x141/0x180 [ 11.574442] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.574471] kasan_check_range+0x10c/0x1c0 [ 11.574495] __asan_memmove+0x27/0x70 [ 11.574514] kmalloc_memmove_negative_size+0x171/0x330 [ 11.574538] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 11.574562] ? __schedule+0x10cc/0x2b60 [ 11.574585] ? __pfx_read_tsc+0x10/0x10 [ 11.574605] ? ktime_get_ts64+0x86/0x230 [ 11.574653] kunit_try_run_case+0x1a5/0x480 [ 11.574674] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.574693] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.574717] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.574740] ? __kthread_parkme+0x82/0x180 [ 11.574759] ? preempt_count_sub+0x50/0x80 [ 11.574783] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.574803] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.574827] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.574851] kthread+0x337/0x6f0 [ 11.574870] ? trace_preempt_on+0x20/0xc0 [ 11.574903] ? __pfx_kthread+0x10/0x10 [ 11.574923] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.574957] ? calculate_sigpending+0x7b/0xa0 [ 11.574979] ? __pfx_kthread+0x10/0x10 [ 11.575000] ret_from_fork+0x116/0x1d0 [ 11.575018] ? __pfx_kthread+0x10/0x10 [ 11.575037] ret_from_fork_asm+0x1a/0x30 [ 11.575066] </TASK> [ 11.575077] [ 11.587288] Allocated by task 197: [ 11.587606] kasan_save_stack+0x45/0x70 [ 11.588060] kasan_save_track+0x18/0x40 [ 11.588369] kasan_save_alloc_info+0x3b/0x50 [ 11.588714] __kasan_kmalloc+0xb7/0xc0 [ 11.589039] __kmalloc_cache_noprof+0x189/0x420 [ 11.589372] kmalloc_memmove_negative_size+0xac/0x330 [ 11.589790] kunit_try_run_case+0x1a5/0x480 [ 11.589960] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.590468] kthread+0x337/0x6f0 [ 11.590797] ret_from_fork+0x116/0x1d0 [ 11.591197] ret_from_fork_asm+0x1a/0x30 [ 11.591353] [ 11.591450] The buggy address belongs to the object at ffff888102b3b100 [ 11.591450] which belongs to the cache kmalloc-64 of size 64 [ 11.592323] The buggy address is located 4 bytes inside of [ 11.592323] 64-byte region [ffff888102b3b100, ffff888102b3b140) [ 11.593040] [ 11.593155] The buggy address belongs to the physical page: [ 11.593508] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b3b [ 11.594121] flags: 0x200000000000000(node=0|zone=2) [ 11.594431] page_type: f5(slab) [ 11.594604] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.595138] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.595541] page dumped because: kasan: bad access detected [ 11.595960] [ 11.596071] Memory state around the buggy address: [ 11.596438] ffff888102b3b000: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 11.596835] ffff888102b3b080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.597264] >ffff888102b3b100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 11.597668] ^ [ 11.597860] ffff888102b3b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.598361] ffff888102b3b200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.598824] ==================================================================