Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.395599] ================================================================== [ 18.395665] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 18.395714] Read of size 18446744073709551614 at addr fff00000c7818404 by task kunit_try_catch/180 [ 18.395800] [ 18.395956] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.396145] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.396177] Hardware name: linux,dummy-virt (DT) [ 18.396245] Call trace: [ 18.396266] show_stack+0x20/0x38 (C) [ 18.396351] dump_stack_lvl+0x8c/0xd0 [ 18.396401] print_report+0x118/0x608 [ 18.396631] kasan_report+0xdc/0x128 [ 18.396676] kasan_check_range+0x100/0x1a8 [ 18.396799] __asan_memmove+0x3c/0x98 [ 18.396840] kmalloc_memmove_negative_size+0x154/0x2e0 [ 18.396904] kunit_try_run_case+0x170/0x3f0 [ 18.397593] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.397771] kthread+0x328/0x630 [ 18.398025] ret_from_fork+0x10/0x20 [ 18.398074] [ 18.398094] Allocated by task 180: [ 18.398120] kasan_save_stack+0x3c/0x68 [ 18.398214] kasan_save_track+0x20/0x40 [ 18.398250] kasan_save_alloc_info+0x40/0x58 [ 18.398291] __kasan_kmalloc+0xd4/0xd8 [ 18.398328] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.398385] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 18.398517] kunit_try_run_case+0x170/0x3f0 [ 18.398557] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.398601] kthread+0x328/0x630 [ 18.398641] ret_from_fork+0x10/0x20 [ 18.398682] [ 18.398750] The buggy address belongs to the object at fff00000c7818400 [ 18.398750] which belongs to the cache kmalloc-64 of size 64 [ 18.398981] The buggy address is located 4 bytes inside of [ 18.398981] 64-byte region [fff00000c7818400, fff00000c7818440) [ 18.399047] [ 18.399067] The buggy address belongs to the physical page: [ 18.399099] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107818 [ 18.399150] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.399196] page_type: f5(slab) [ 18.399232] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 18.399281] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 18.399320] page dumped because: kasan: bad access detected [ 18.399351] [ 18.399369] Memory state around the buggy address: [ 18.399399] fff00000c7818300: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 18.399448] fff00000c7818380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.399490] >fff00000c7818400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 18.399528] ^ [ 18.399554] fff00000c7818480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.399596] fff00000c7818500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.399634] ==================================================================
[ 11.785144] ================================================================== [ 11.786240] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330 [ 11.787047] Read of size 18446744073709551614 at addr ffff8881038d5804 by task kunit_try_catch/198 [ 11.788094] [ 11.788267] CPU: 1 UID: 0 PID: 198 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.788325] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.788337] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.788359] Call Trace: [ 11.788373] <TASK> [ 11.788389] dump_stack_lvl+0x73/0xb0 [ 11.788417] print_report+0xd1/0x650 [ 11.788439] ? __virt_addr_valid+0x1db/0x2d0 [ 11.788471] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.788495] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.788516] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.788561] kasan_report+0x141/0x180 [ 11.788583] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.788612] kasan_check_range+0x10c/0x1c0 [ 11.788634] __asan_memmove+0x27/0x70 [ 11.788654] kmalloc_memmove_negative_size+0x171/0x330 [ 11.788711] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 11.788737] ? __schedule+0x10cc/0x2b60 [ 11.788759] ? __pfx_read_tsc+0x10/0x10 [ 11.788791] ? ktime_get_ts64+0x86/0x230 [ 11.788814] kunit_try_run_case+0x1a5/0x480 [ 11.788838] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.788859] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.788882] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.788904] ? __kthread_parkme+0x82/0x180 [ 11.788923] ? preempt_count_sub+0x50/0x80 [ 11.788946] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.788969] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.788990] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.789012] kthread+0x337/0x6f0 [ 11.789031] ? trace_preempt_on+0x20/0xc0 [ 11.789053] ? __pfx_kthread+0x10/0x10 [ 11.789073] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.789093] ? calculate_sigpending+0x7b/0xa0 [ 11.789116] ? __pfx_kthread+0x10/0x10 [ 11.789136] ret_from_fork+0x116/0x1d0 [ 11.789154] ? __pfx_kthread+0x10/0x10 [ 11.789173] ret_from_fork_asm+0x1a/0x30 [ 11.789230] </TASK> [ 11.789242] [ 11.800714] Allocated by task 198: [ 11.801240] kasan_save_stack+0x45/0x70 [ 11.801613] kasan_save_track+0x18/0x40 [ 11.801804] kasan_save_alloc_info+0x3b/0x50 [ 11.802253] __kasan_kmalloc+0xb7/0xc0 [ 11.802572] __kmalloc_cache_noprof+0x189/0x420 [ 11.802930] kmalloc_memmove_negative_size+0xac/0x330 [ 11.803437] kunit_try_run_case+0x1a5/0x480 [ 11.803670] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.803992] kthread+0x337/0x6f0 [ 11.804348] ret_from_fork+0x116/0x1d0 [ 11.804660] ret_from_fork_asm+0x1a/0x30 [ 11.804987] [ 11.805206] The buggy address belongs to the object at ffff8881038d5800 [ 11.805206] which belongs to the cache kmalloc-64 of size 64 [ 11.806085] The buggy address is located 4 bytes inside of [ 11.806085] 64-byte region [ffff8881038d5800, ffff8881038d5840) [ 11.806946] [ 11.807058] The buggy address belongs to the physical page: [ 11.807446] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038d5 [ 11.808020] flags: 0x200000000000000(node=0|zone=2) [ 11.808467] page_type: f5(slab) [ 11.808605] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.809241] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.809762] page dumped because: kasan: bad access detected [ 11.810131] [ 11.810272] Memory state around the buggy address: [ 11.810850] ffff8881038d5700: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 11.811300] ffff8881038d5780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.811632] >ffff8881038d5800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 11.812247] ^ [ 11.812529] ffff8881038d5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.813050] ffff8881038d5900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.813440] ==================================================================