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 8148A314D21 for ; Wed, 24 Dec 2025 10:58:44 +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=1766573924; cv=none; b=OmNiQIFSPsTee1QsI81Cw1jVKCB04IFHA8rF0dFhmt1qGoMBivjG6ZKaZSXZlM51UbZJcrfoHy9YIajL/+/qFEMAPYEDCSRJStyRahP5MKUT5rd/SRsPOfq3d3IoamLCABOOjnXTBKVeZa8VwXLchgtMQql21ihlx/Bel36Sf4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766573924; c=relaxed/simple; bh=JibTyrfaiorqCo8YEQ+Gt32dqNoU8L6PtaNIo734vNA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rqn5tohfrQpLFDIkfKDYUyUHtUBZFJu6a5UYkMWQvgBALMc+mbNCuqMKPiJIOb70QwPRJk+JGMmax19iETSbjfzE9guSOz/ERyZPI9fAHWQ58pRK1I3PdK//kk3xmjoopoQIkqzN5Ok7bDtIGhhP9fSyW7ozzBNpmQRa7aUxx2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SUjbI0cs; 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="SUjbI0cs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09074C4CEFB; Wed, 24 Dec 2025 10:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766573924; bh=JibTyrfaiorqCo8YEQ+Gt32dqNoU8L6PtaNIo734vNA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=SUjbI0cscTy8X0Mz+3Nz8YLEFYQs5c+NfJmFgx2xeeH6dN8cbInzQIj76BE3wni0i eTsh146OsyfDucinp8KWXTkLOeZVkNJRLWwcBR15hb87ScUnEsDBbBsyGR108IacZy 2tM7DB78dkAU13TGXGuYFybVAz22SQG2JcO0A+wY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53989: arm64: mm: fix VA-range sanity check Date: Wed, 24 Dec 2025 11:56:33 +0100 Message-ID: <2025122423-CVE-2023-53989-1b3b@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=3853; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ItEBMi6fJRMSK9DWLzlZK3cmygGHoROKPMy3zXjqOcs=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnex67vNvx8a9nKA1aWwT45Z1vfWbnY39zYlcwfUjhN/ nGx06zXHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRW18ZFpxvUk7Z/GNK4L17 zLabpuRIhMZNNmeYp7XFafniDTr/l7QvOHj2uxevdE5uEwA= 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: arm64: mm: fix VA-range sanity check Both create_mapping_noalloc() and update_mapping_prot() sanity-check their 'virt' parameter, but the check itself doesn't make much sense. The condition used today appears to be a historical accident. The sanity-check condition: if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { [ ... warning here ... ] return; } ... can only be true for the KASAN shadow region or the module region, and there's no reason to exclude these specifically for creating and updateing mappings. When arm64 support was first upstreamed in commit: c1cc1552616d0f35 ("arm64: MMU initialisation") ... the condition was: if (virt < VMALLOC_START) { [ ... warning here ... ] return; } At the time, VMALLOC_START was the lowest kernel address, and this was checking whether 'virt' would be translated via TTBR1. Subsequently in commit: 14c127c957c1c607 ("arm64: mm: Flip kernel VA space") ... the condition was changed to: if ((virt >= VA_START) && (virt < VMALLOC_START)) { [ ... warning here ... ] return; } This appear to have been a thinko. The commit moved the linear map to the bottom of the kernel address space, with VMALLOC_START being at the halfway point. The old condition would warn for changes to the linear map below this, and at the time VA_START was the end of the linear map. Subsequently we cleaned up the naming of VA_START in commit: 77ad4ce69321abbe ("arm64: memory: rename VA_START to PAGE_END") ... keeping the erroneous condition as: if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { [ ... warning here ... ] return; } Correct the condition to check against the start of the TTBR1 address space, which is currently PAGE_OFFSET. This simplifies the logic, and more clearly matches the "outside kernel range" message in the warning. The Linux kernel CVE team has assigned CVE-2023-53989 to this issue. Affected and fixed versions =========================== Fixed in 5.4.251 with commit 9d8d3df71516ec3236d8d93ff029d251377ba4b1 Fixed in 5.10.188 with commit 32020fc2a8373d3de35ae6d029d5969a42651e7a Fixed in 5.15.150 with commit 621619f626cbe702ddbdc54117f3868b8ebd8129 Fixed in 6.4.7 with commit b03c7fcc5ed854d0e1b27e9abf12428bfa751a37 Fixed in 6.5 with commit ab9b4008092c86dc12497af155a0901cc1156999 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-2023-53989 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: arch/arm64/mm/mmu.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/9d8d3df71516ec3236d8d93ff029d251377ba4b1 https://git.kernel.org/stable/c/32020fc2a8373d3de35ae6d029d5969a42651e7a https://git.kernel.org/stable/c/621619f626cbe702ddbdc54117f3868b8ebd8129 https://git.kernel.org/stable/c/b03c7fcc5ed854d0e1b27e9abf12428bfa751a37 https://git.kernel.org/stable/c/ab9b4008092c86dc12497af155a0901cc1156999