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 1A02D30C373 for ; Mon, 15 Sep 2025 14:08:22 +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=1757945302; cv=none; b=YoRbPjToOvLEw/VmykO+E1xhdtmUX/WHaCPszlCWnF++JeEObFajWgnNKJeEnbPIk3vUu9bGzbaiGc6vuMXD8rN/MbhcDpOjim9OOAu4H4GweX7K6oWypJ9z2L674YczhKrsXrUzCfjBo/s96jfGFtJkgB2tO9EydF1GnN3tcUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945302; c=relaxed/simple; bh=4bQOC27ieFxSqDEJwvW45mgIXL/YDZIaV4nElB4cgd8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p160fOxBF8hWxu6GRoY8D477AK0Gk27++6kEjxakCG/RrhXWf537mgnsEYMbXfdH2l5H7Tvo6DAvHZPXM9/rLzw2UtJ8oGNRQZdTn/zaPd58PuVF6yBucLXLhg/UWQgTDtq3tP9BkyueVjZg1/Ecc9qy8k4PdVJZdjoMqnh5l50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XrIp8YCe; 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="XrIp8YCe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3771AC4CEF5; Mon, 15 Sep 2025 14:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757945302; bh=4bQOC27ieFxSqDEJwvW45mgIXL/YDZIaV4nElB4cgd8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=XrIp8YCevRfQKARqLgMPwc8Pw19MleYCBftxCRky02cthsODCewoLed2gp2aV/PQe OEGDHX907Oa8OXovq7O9Gy3SV4UzcYW0WjyJuhEkJDOqWy6fYruL9iFNlgvJExTzSl 7W2BzuePlJT3OKpHf96MChtv5r8+brhKj8w6hOVc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50245: rapidio: fix possible UAF when kfifo_alloc() fails Date: Mon, 15 Sep 2025 16:01:53 +0200 Message-ID: <2025091548-CVE-2022-50245-57e4@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=3676; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dFQW9sW+7OGUG0X06l57tBBkmynQklejwrjpbunspcs=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknZHzufM/XO1ofv+KwbyufSkRsstAB/tMeYjvm3U89q t367YpKRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkooBhwfJNqeJsgkvsjluz mqXP7b83dZn2fob5IXc/nXzFs/nu89a7qqEH408u6mF+CAA= 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: rapidio: fix possible UAF when kfifo_alloc() fails If kfifo_alloc() fails in mport_cdev_open(), goto err_fifo and just free priv. But priv is still in the chdev->file_list, then list traversal may cause UAF. This fixes the following smatch warning: drivers/rapidio/devices/rio_mport_cdev.c:1930 mport_cdev_open() warn: '&priv->list' not removed from list The Linux kernel CVE team has assigned CVE-2022-50245 to this issue. Affected and fixed versions =========================== Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 4.9.337 with commit 2a6c75adf8192f07ddcdd4a1a13488c890a73919 Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 4.14.303 with commit 2dfd60724d271a6ab99f93f40f38f2ced1ddbb87 Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 4.19.270 with commit a253dde0403a153075ffb254f6f7b2635e49e97a Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.4.229 with commit 311b488405ac45af46756b1c8f1d27007b68b07e Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.10.163 with commit 5ee850645e42f541ce1ea8130c2b27cc495f965c Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 5.15.86 with commit 2f5cc7fd73fd6253cc71214f0dd499cc62feb469 Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.0.16 with commit 2ba06e57f933f0eac242e8b389433da1cc00d4d5 Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.1.2 with commit cb87af2c19c0993f6e21f75b963a5599c5a73e76 Issue introduced in 4.6 with commit e8de370188d098bb49483c287b44925957c3c9b6 and fixed in 6.2 with commit 02d7d89f816951e0862147d751b1150d67aaebdd 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-50245 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/rapidio/devices/rio_mport_cdev.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/2a6c75adf8192f07ddcdd4a1a13488c890a73919 https://git.kernel.org/stable/c/2dfd60724d271a6ab99f93f40f38f2ced1ddbb87 https://git.kernel.org/stable/c/a253dde0403a153075ffb254f6f7b2635e49e97a https://git.kernel.org/stable/c/311b488405ac45af46756b1c8f1d27007b68b07e https://git.kernel.org/stable/c/5ee850645e42f541ce1ea8130c2b27cc495f965c https://git.kernel.org/stable/c/2f5cc7fd73fd6253cc71214f0dd499cc62feb469 https://git.kernel.org/stable/c/2ba06e57f933f0eac242e8b389433da1cc00d4d5 https://git.kernel.org/stable/c/cb87af2c19c0993f6e21f75b963a5599c5a73e76 https://git.kernel.org/stable/c/02d7d89f816951e0862147d751b1150d67aaebdd