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 376082DC783 for ; Mon, 15 Sep 2025 14:25:01 +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=1757946301; cv=none; b=hFTwedadRrCC30mNeArdesT8nE2HAC/B9V4I8v3nXp+s/8aycV1gCLx1Y98nC8PgAuSzDlRVvP6sbCozcYvc0lmmQ2eG9QTKEkhnihzIh0gzVgC6M0RGFqdie8YAA3v3s7JvPeOEiVr7RH4ct3NZvEClDA7taBbRs1xRpuMFjp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946301; c=relaxed/simple; bh=JCjt2kIyqf0M/6iPPynFobsvCA6ESqvuv+G3pzaZlpo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HBhIC66lXwxBsxlZn4XFGGnhqGxwbHUgyPz0hxJS7h9sMg6hftNMZPait6PqDs8cZ+NARv+GVkiqDombyl1lpSAJJVw/79RHhhqvAyZWGYdYIxibWm9y7OMcu6Ep+mtPW9C0PoCqMrS9Tl4g6usOhvoG8vxdOsdQVUWzbN1G4kw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fAL8iFex; 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="fAL8iFex" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CDF4C4CEF1; Mon, 15 Sep 2025 14:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946301; bh=JCjt2kIyqf0M/6iPPynFobsvCA6ESqvuv+G3pzaZlpo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fAL8iFexphQmmzwevnL1zWbZokFXdoNBvOzz8s5Xrp5SKsy4Z7rZKBrBIR1vlizNf bS0hGWDKkyfSMg/fYYHk0Atz7ZxIRtXsmmegAj9JT/d7BnQDWtjRHGacxKxmTOUTKn /JX/z5HWTd1lYizW65QaXf0vJfElNFnJ3qwH0AQk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50267: mmc: rtsx_pci: fix return value check of mmc_add_host() Date: Mon, 15 Sep 2025 16:21:09 +0200 Message-ID: <2025091504-CVE-2022-50267-2de9@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=2573; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Id8O+vH77nZgCPWRLc5EIKqAeaT0bW04F40u08oUHSY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFC68PB3xxffmGtf7fW+j5+fY6p3K8JzxZH+7ZZ6Tj dfytkuWHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRef0MCxrPK9tohd5eOEXf quhApbp//OxpXxkW7J4Zz7M9KPzQad2qgyXxBaq/Xoc7AgA= 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: mmc: rtsx_pci: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path, beside, runtime PM also needs be disabled. The Linux kernel CVE team has assigned CVE-2022-50267 to this issue. Affected and fixed versions =========================== Issue introduced in 3.8 with commit ff984e57d36e8ac468849a144a36f1c11f88b61c and fixed in 5.15.86 with commit 30dc645461dfc63e52b3af8ee4a98e17bf14bacf Issue introduced in 3.8 with commit ff984e57d36e8ac468849a144a36f1c11f88b61c and fixed in 6.0.16 with commit 5cd4e04eccaec140da6fa04db056a76282ee6852 Issue introduced in 3.8 with commit ff984e57d36e8ac468849a144a36f1c11f88b61c and fixed in 6.1.2 with commit ffa9b2a79e3e959683efbad3f6db937eca9d38f5 Issue introduced in 3.8 with commit ff984e57d36e8ac468849a144a36f1c11f88b61c and fixed in 6.2 with commit 0c87db77423a282b3b38b8a6daf057b822680516 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-50267 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: drivers/mmc/host/rtsx_pci_sdmmc.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/30dc645461dfc63e52b3af8ee4a98e17bf14bacf https://git.kernel.org/stable/c/5cd4e04eccaec140da6fa04db056a76282ee6852 https://git.kernel.org/stable/c/ffa9b2a79e3e959683efbad3f6db937eca9d38f5 https://git.kernel.org/stable/c/0c87db77423a282b3b38b8a6daf057b822680516