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 450682E5B1D for ; Wed, 1 Oct 2025 11:55: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=1759319741; cv=none; b=XsyQhw8wd1O2S/ZV+QTYQOMjK+/IwDobPN/eKlV3/LrfnlDDGTxRc3h/lHmDiIKgk48ifMl2mdeHnTQsxu1V3cpwIGDVXNdtIrrXKZ+fOsgdsHvPvjBK06wg9zrh89Se0egSTNLT1IM/wl8i2/MaQID2Y4lGj4z+LpJNYWBGjGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319741; c=relaxed/simple; bh=DeYY3qwYjxuXBUgoGdK0yJ+cqwRONk2iiU+bQmFyItg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rumLtePCqfTY195nWdqYbFoNIFB1ScI8sUoSKQb6dRmdiCEAxWGyTsvUe41DI6D4LAHrJFHQPIji9t5dAPB3bQLEqZveIA54XaOytgaTJMjY6vhRF6sKMceGwEQ5dBzyBtroJiGsdSHXlLYS/dBSSSVWqaWki0r3rZ1utCfad4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yKAZ9+s3; 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="yKAZ9+s3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBDC8C4CEF4; Wed, 1 Oct 2025 11:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319741; bh=DeYY3qwYjxuXBUgoGdK0yJ+cqwRONk2iiU+bQmFyItg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yKAZ9+s3t5bC8YafBEJsfOwvjRj9CQFJd6riuFYMhjgmO/8ii4qLbnelZIzAfTPbh zWDAKE0CjAofVV0ZCpEFOYnc8BKlFaDxAls83j/0rotrMbLiZ3KuMtsvLKMxNVLRji q7dFkFQr10QaIpVBnDxgiJcHxrXiL84GbWLF28Uo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50446: ARC: mm: fix leakage of memory allocated for PTE Date: Wed, 1 Oct 2025 13:45:16 +0200 Message-ID: <2025100115-CVE-2022-50446-94be@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3030; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lGv9jQdp5YgZeTqgKiNGCl4RTJkAC6xtRETEAqGbs1c=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3Rbwnek2L0/T09Zc0m3bbY85McVmtLontu4oXnn8TH mZ9Qf1vRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkzY1hwbw3sseOXfgtqyTA bfE5552YuZBzL8P8yr0X4gTS9n0U0pFW2bEhYL7Ul+i3AA== 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: ARC: mm: fix leakage of memory allocated for PTE Since commit d9820ff ("ARC: mm: switch pgtable_t back to struct page *") a memory leakage problem occurs. Memory allocated for page table entries not released during process termination. This issue can be reproduced by a small program that allocates a large amount of memory. After several runs, you'll see that the amount of free memory has reduced and will continue to reduce after each run. All ARC CPUs are effected by this issue. The issue was introduced since the kernel stable release v5.15-rc1. As described in commit d9820ff after switch pgtable_t back to struct page *, a pointer to "struct page" and appropriate functions are used to allocate and free a memory page for PTEs, but the pmd_pgtable macro hasn't changed and returns the direct virtual address from the PMD (PGD) entry. Than this address used as a parameter in the __pte_free() and as a result this function couldn't release memory page allocated for PTEs. Fix this issue by changing the pmd_pgtable macro and returning pointer to struct page. The Linux kernel CVE team has assigned CVE-2022-50446 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit d9820ff76f95fa26d33e412254a89cd65b23142d and fixed in 5.15.77 with commit 14009ada5712649589ab4ad0441b811780ea8773 Issue introduced in 5.15 with commit d9820ff76f95fa26d33e412254a89cd65b23142d and fixed in 6.0.7 with commit d83a69966e8b6ae9dd447f3ac704c0223bceb7f7 Issue introduced in 5.15 with commit d9820ff76f95fa26d33e412254a89cd65b23142d and fixed in 6.1 with commit 4fd9df10cb7a9289fbd22d669f9f98164d95a1ce 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-2022-50446 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/arc/include/asm/pgtable-levels.h 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/14009ada5712649589ab4ad0441b811780ea8773 https://git.kernel.org/stable/c/d83a69966e8b6ae9dd447f3ac704c0223bceb7f7 https://git.kernel.org/stable/c/4fd9df10cb7a9289fbd22d669f9f98164d95a1ce