Date
Dec. 3, 2024, 11:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.676982] ================================================================== [ 30.678278] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 30.679118] Read of size 18446744073709551614 at addr fff00000c634df84 by task kunit_try_catch/169 [ 30.681159] [ 30.681483] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241203 #1 [ 30.682596] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.683617] Hardware name: linux,dummy-virt (DT) [ 30.684530] Call trace: [ 30.684990] show_stack+0x20/0x38 (C) [ 30.685671] dump_stack_lvl+0x8c/0xd0 [ 30.686314] print_report+0x118/0x5e0 [ 30.687454] kasan_report+0xc8/0x118 [ 30.688050] kasan_check_range+0x100/0x1a8 [ 30.688675] __asan_memmove+0x3c/0x98 [ 30.689274] kmalloc_memmove_negative_size+0x154/0x2e0 [ 30.690060] kunit_try_run_case+0x14c/0x3d0 [ 30.690675] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.691886] kthread+0x24c/0x2d0 [ 30.692429] ret_from_fork+0x10/0x20 [ 30.693048] [ 30.693473] Allocated by task 169: [ 30.693979] kasan_save_stack+0x3c/0x68 [ 30.694596] kasan_save_track+0x20/0x40 [ 30.695244] kasan_save_alloc_info+0x40/0x58 [ 30.695879] __kasan_kmalloc+0xd4/0xd8 [ 30.696468] __kmalloc_cache_noprof+0x15c/0x3c0 [ 30.697176] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 30.698280] kunit_try_run_case+0x14c/0x3d0 [ 30.699358] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.700248] kthread+0x24c/0x2d0 [ 30.700753] ret_from_fork+0x10/0x20 [ 30.701286] [ 30.701702] The buggy address belongs to the object at fff00000c634df80 [ 30.701702] which belongs to the cache kmalloc-64 of size 64 [ 30.703580] The buggy address is located 4 bytes inside of [ 30.703580] 64-byte region [fff00000c634df80, fff00000c634dfc0) [ 30.704814] [ 30.705135] The buggy address belongs to the physical page: [ 30.706049] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10634d [ 30.706950] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.708611] page_type: f5(slab) [ 30.709189] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 30.710210] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 30.711190] page dumped because: kasan: bad access detected [ 30.711821] [ 30.712180] Memory state around the buggy address: [ 30.712839] fff00000c634de80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 30.714361] fff00000c634df00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 30.715254] >fff00000c634df80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 30.716113] ^ [ 30.716627] fff00000c634e000: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 30.718295] fff00000c634e080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 30.719039] ==================================================================
[ 26.253623] ================================================================== [ 26.254405] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330 [ 26.255435] Read of size 18446744073709551614 at addr ffff888102986284 by task kunit_try_catch/189 [ 26.256553] [ 26.256825] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241203 #1 [ 26.257772] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.258330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.259434] Call Trace: [ 26.260073] <TASK> [ 26.260329] dump_stack_lvl+0x73/0xb0 [ 26.260898] print_report+0xd1/0x640 [ 26.261253] ? __virt_addr_valid+0x1db/0x2d0 [ 26.261641] ? kasan_complete_mode_report_info+0x2a/0x200 [ 26.262897] kasan_report+0x102/0x140 [ 26.263228] ? kmalloc_memmove_negative_size+0x172/0x330 [ 26.263886] ? kmalloc_memmove_negative_size+0x172/0x330 [ 26.264580] kasan_check_range+0x10c/0x1c0 [ 26.265231] __asan_memmove+0x27/0x70 [ 26.266001] kmalloc_memmove_negative_size+0x172/0x330 [ 26.266592] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 26.267158] ? __schedule+0xc3e/0x2790 [ 26.267853] ? __pfx_read_tsc+0x10/0x10 [ 26.268218] ? ktime_get_ts64+0x86/0x230 [ 26.268557] kunit_try_run_case+0x1b3/0x490 [ 26.269793] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.270177] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 26.271258] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.272005] ? __kthread_parkme+0x82/0x160 [ 26.272367] ? preempt_count_sub+0x50/0x80 [ 26.272975] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.273377] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.274448] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.275096] kthread+0x257/0x310 [ 26.275459] ? __pfx_kthread+0x10/0x10 [ 26.276549] ret_from_fork+0x41/0x80 [ 26.277083] ? __pfx_kthread+0x10/0x10 [ 26.277634] ret_from_fork_asm+0x1a/0x30 [ 26.278290] </TASK> [ 26.279243] [ 26.279376] Allocated by task 189: [ 26.279604] kasan_save_stack+0x3d/0x60 [ 26.280341] kasan_save_track+0x18/0x40 [ 26.281417] kasan_save_alloc_info+0x3b/0x50 [ 26.281784] __kasan_kmalloc+0xb7/0xc0 [ 26.282528] __kmalloc_cache_noprof+0x184/0x410 [ 26.283198] kmalloc_memmove_negative_size+0xad/0x330 [ 26.283662] kunit_try_run_case+0x1b3/0x490 [ 26.284473] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.284771] kthread+0x257/0x310 [ 26.285179] ret_from_fork+0x41/0x80 [ 26.286252] ret_from_fork_asm+0x1a/0x30 [ 26.286598] [ 26.287183] The buggy address belongs to the object at ffff888102986280 [ 26.287183] which belongs to the cache kmalloc-64 of size 64 [ 26.288074] The buggy address is located 4 bytes inside of [ 26.288074] 64-byte region [ffff888102986280, ffff8881029862c0) [ 26.288917] [ 26.290128] The buggy address belongs to the physical page: [ 26.290529] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102986 [ 26.291194] flags: 0x200000000000000(node=0|zone=2) [ 26.291666] page_type: f5(slab) [ 26.292045] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 26.292817] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 26.293264] page dumped because: kasan: bad access detected [ 26.293753] [ 26.293921] Memory state around the buggy address: [ 26.294299] ffff888102986180: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc [ 26.294867] ffff888102986200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 26.296580] >ffff888102986280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 26.297028] ^ [ 26.297350] ffff888102986300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.297966] ffff888102986380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.298491] ==================================================================