Date
Nov. 28, 2024, 2:36 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.778607] ================================================================== [ 30.779685] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 30.780451] Read of size 18446744073709551614 at addr fff00000c6352984 by task kunit_try_catch/168 [ 30.781901] [ 30.782261] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241128 #1 [ 30.783151] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.783671] Hardware name: linux,dummy-virt (DT) [ 30.784252] Call trace: [ 30.784707] show_stack+0x20/0x38 (C) [ 30.785557] dump_stack_lvl+0x8c/0xd0 [ 30.786185] print_report+0x118/0x5e0 [ 30.787041] kasan_report+0xc8/0x118 [ 30.787906] kasan_check_range+0x100/0x1a8 [ 30.788585] __asan_memmove+0x3c/0x98 [ 30.789169] kmalloc_memmove_negative_size+0x154/0x2e0 [ 30.790208] kunit_try_run_case+0x14c/0x3d0 [ 30.790898] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.791671] kthread+0x24c/0x2d0 [ 30.792233] ret_from_fork+0x10/0x20 [ 30.792836] [ 30.793221] Allocated by task 168: [ 30.793735] kasan_save_stack+0x3c/0x68 [ 30.794272] kasan_save_track+0x20/0x40 [ 30.795407] kasan_save_alloc_info+0x40/0x58 [ 30.795997] __kasan_kmalloc+0xd4/0xd8 [ 30.796680] __kmalloc_cache_noprof+0x15c/0x3c0 [ 30.797420] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 30.798445] kunit_try_run_case+0x14c/0x3d0 [ 30.799133] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.799967] kthread+0x24c/0x2d0 [ 30.800461] ret_from_fork+0x10/0x20 [ 30.800937] [ 30.801260] The buggy address belongs to the object at fff00000c6352980 [ 30.801260] which belongs to the cache kmalloc-64 of size 64 [ 30.802928] The buggy address is located 4 bytes inside of [ 30.802928] 64-byte region [fff00000c6352980, fff00000c63529c0) [ 30.804938] [ 30.805295] The buggy address belongs to the physical page: [ 30.806492] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106352 [ 30.807502] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.808442] page_type: f5(slab) [ 30.809304] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 30.810007] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 30.810814] page dumped because: kasan: bad access detected [ 30.812210] [ 30.812578] Memory state around the buggy address: [ 30.813771] fff00000c6352880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.814524] fff00000c6352900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.815463] >fff00000c6352980: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 30.816187] ^ [ 30.816665] fff00000c6352a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.817700] fff00000c6352a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.818652] ==================================================================
[ 21.707568] ================================================================== [ 21.708516] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330 [ 21.709188] Read of size 18446744073709551614 at addr ffff888102a18c84 by task kunit_try_catch/188 [ 21.709891] [ 21.710199] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241128 #1 [ 21.711113] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.711856] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 21.713050] Call Trace: [ 21.713305] <TASK> [ 21.714011] dump_stack_lvl+0x73/0xb0 [ 21.714689] print_report+0xd1/0x640 [ 21.715090] ? __virt_addr_valid+0x1db/0x2d0 [ 21.715541] ? kasan_complete_mode_report_info+0x2a/0x200 [ 21.716076] kasan_report+0x102/0x140 [ 21.716518] ? kmalloc_memmove_negative_size+0x172/0x330 [ 21.717003] ? kmalloc_memmove_negative_size+0x172/0x330 [ 21.717646] kasan_check_range+0x10c/0x1c0 [ 21.718292] __asan_memmove+0x27/0x70 [ 21.718947] kmalloc_memmove_negative_size+0x172/0x330 [ 21.719819] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 21.720512] ? __schedule+0xc3e/0x2790 [ 21.721051] ? __pfx_read_tsc+0x10/0x10 [ 21.721657] ? ktime_get_ts64+0x84/0x230 [ 21.722209] kunit_try_run_case+0x1b3/0x490 [ 21.723072] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.723900] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 21.724510] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 21.724990] ? __kthread_parkme+0x82/0x160 [ 21.725619] ? preempt_count_sub+0x50/0x80 [ 21.726103] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.726817] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 21.727849] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.728966] kthread+0x257/0x310 [ 21.729419] ? __pfx_kthread+0x10/0x10 [ 21.729785] ret_from_fork+0x41/0x80 [ 21.729983] ? __pfx_kthread+0x10/0x10 [ 21.730432] ret_from_fork_asm+0x1a/0x30 [ 21.731146] </TASK> [ 21.731599] [ 21.731873] Allocated by task 188: [ 21.732306] kasan_save_stack+0x3d/0x60 [ 21.733241] kasan_save_track+0x18/0x40 [ 21.733549] kasan_save_alloc_info+0x3b/0x50 [ 21.734520] __kasan_kmalloc+0xb7/0xc0 [ 21.734884] __kmalloc_cache_noprof+0x184/0x410 [ 21.735639] kmalloc_memmove_negative_size+0xad/0x330 [ 21.736139] kunit_try_run_case+0x1b3/0x490 [ 21.736925] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.737454] kthread+0x257/0x310 [ 21.738121] ret_from_fork+0x41/0x80 [ 21.738773] ret_from_fork_asm+0x1a/0x30 [ 21.739045] [ 21.739437] The buggy address belongs to the object at ffff888102a18c80 [ 21.739437] which belongs to the cache kmalloc-64 of size 64 [ 21.740861] The buggy address is located 4 bytes inside of [ 21.740861] 64-byte region [ffff888102a18c80, ffff888102a18cc0) [ 21.741938] [ 21.742293] The buggy address belongs to the physical page: [ 21.742815] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a18 [ 21.743622] flags: 0x200000000000000(node=0|zone=2) [ 21.744011] page_type: f5(slab) [ 21.744680] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 21.745463] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 21.746372] page dumped because: kasan: bad access detected [ 21.746843] [ 21.747112] Memory state around the buggy address: [ 21.747665] ffff888102a18b80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 21.748479] ffff888102a18c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 21.749066] >ffff888102a18c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 21.749702] ^ [ 21.750144] ffff888102a18d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.750939] ffff888102a18d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.751615] ==================================================================