Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4881339B6C9 for ; Tue, 16 Dec 2025 13:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765893282; cv=none; b=PJxkHkuOi55rk4XGCHcNVqurjZNkEi0bNN4nSiPsXr3sBukNORMAjsk5fMPOE3jvDxMFLOu9DxRQAcwa1r48CTyrvq5lZ6DyA+lqMu4POwjeR1Unkq17tgfNxLHiy5l70IBwPSIZ1FejSc7ug3Dg3b+ncpb4g01uwuNBc/n17Pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765893282; c=relaxed/simple; bh=ai5plbD6tOmFNil8LqU16GW7LqXAvecSZ/79iJjOv+g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rzVWf6L3oOMNUjsUuZGYW+yvTs8K54WdXP9EYo4kMr5ZRYZi9ui64xE2exLQ+DO3Fka7alm7F/5MhNB8+aBW+LIOQhVfz5FgqdpUSzY+dcLXjAagVlRmMS6FBgYlcFD0TddMikJu2XTZlyzLX2+wjm9/n5MCRbYhrvMkCqTMKGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DQk/m80y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DQk/m80y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ACFFC4CEF1; Tue, 16 Dec 2025 13:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765893281; bh=ai5plbD6tOmFNil8LqU16GW7LqXAvecSZ/79iJjOv+g=; h=From:To:Cc:Subject:Date:Reply-To:From; b=DQk/m80ycNrY8x53ZNKZZL5UnYKZ7wsYBz+FHdb4OotUwqJEcfGHsiBQ7IPVgmyP1 qKY/j0pRb4kuJJ9D5/LkLO8O9/gPt/73EIIR6kHkuxq66GdB/UxIw+CaydHVSOyvAt Cy5XuRqnKqH1LsPqG/+A+/mJ0qP5PQ+Vc60a+1QE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68198: crash: fix crashkernel resource shrink Date: Tue, 16 Dec 2025 14:54:27 +0100 Message-ID: <2025121627-CVE-2025-68198-2638@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3879; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CwDk6NsM7qanhCkAwsqiEAdyLGDzyTz7r7yBwKGgMnY=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOKZPbzrTLpy/zm3a3KHzi93mHZi09vijc8ZNW/J9Xf 27qz5kU1xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT4frNMD/y4vXHFt2n/72J LtFv8Fe+/PTRxCCGBTOUNBhFrWQFg/0uq9+Lto2YcKtGDgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: crash: fix crashkernel resource shrink When crashkernel is configured with a high reservation, shrinking its value below the low crashkernel reservation causes two issues: 1. Invalid crashkernel resource objects 2. Kernel crash if crashkernel shrinking is done twice For example, with crashkernel=200M,high, the kernel reserves 200MB of high memory and some default low memory (say 256MB). The reservation appears as: cat /proc/iomem | grep -i crash af000000-beffffff : Crash kernel 433000000-43f7fffff : Crash kernel If crashkernel is then shrunk to 50MB (echo 52428800 > /sys/kernel/kexec_crash_size), /proc/iomem still shows 256MB reserved: af000000-beffffff : Crash kernel Instead, it should show 50MB: af000000-b21fffff : Crash kernel Further shrinking crashkernel to 40MB causes a kernel crash with the following trace (x86): BUG: kernel NULL pointer dereference, address: 0000000000000038 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI Call Trace: ? __die_body.cold+0x19/0x27 ? page_fault_oops+0x15a/0x2f0 ? search_module_extables+0x19/0x60 ? search_bpf_extables+0x5f/0x80 ? exc_page_fault+0x7e/0x180 ? asm_exc_page_fault+0x26/0x30 ? __release_resource+0xd/0xb0 release_resource+0x26/0x40 __crash_shrink_memory+0xe5/0x110 crash_shrink_memory+0x12a/0x190 kexec_crash_size_store+0x41/0x80 kernfs_fop_write_iter+0x141/0x1f0 vfs_write+0x294/0x460 ksys_write+0x6d/0xf0 This happens because __crash_shrink_memory()/kernel/crash_core.c incorrectly updates the crashk_res resource object even when crashk_low_res should be updated. Fix this by ensuring the correct crashkernel resource object is updated when shrinking crashkernel memory. The Linux kernel CVE team has assigned CVE-2025-68198 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 16c6006af4d4e70ecef93977a5314409d931020b and fixed in 6.6.118 with commit f01f9c348d76d40bf104a94449e3ce4057fdefee Issue introduced in 6.5 with commit 16c6006af4d4e70ecef93977a5314409d931020b and fixed in 6.12.59 with commit f89c5e7077f63e45e8ba5a77b7cf0803130367e6 Issue introduced in 6.5 with commit 16c6006af4d4e70ecef93977a5314409d931020b and fixed in 6.17.9 with commit a2bd247f8c6c5ac3f0ba823a2fffd77bb9cdf618 Issue introduced in 6.5 with commit 16c6006af4d4e70ecef93977a5314409d931020b and fixed in 6.18 with commit 00fbff75c5acb4755f06f08bd1071879c63940c5 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-68198 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: kernel/crash_core.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f01f9c348d76d40bf104a94449e3ce4057fdefee https://git.kernel.org/stable/c/f89c5e7077f63e45e8ba5a77b7cf0803130367e6 https://git.kernel.org/stable/c/a2bd247f8c6c5ac3f0ba823a2fffd77bb9cdf618 https://git.kernel.org/stable/c/00fbff75c5acb4755f06f08bd1071879c63940c5