From mboxrd@z Thu Jan 1 00:00:00 1970 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 4C73B216618 for ; Wed, 26 Feb 2025 02:14:33 +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=1740536073; cv=none; b=XyUKMo1SM7UFehMPUydaPgw58lnDbuiotRc7BopavRH/WPkxLUcdtpz0Hw0/ulGbi3tQdIChgECOJU1yjwS97WhcQMOPgIW+Ky51OBpSPA/4AXk48Ogd9EUuwh98m0/DoAz9RZssghObfETJLJqaHX6RkEi69du66ZLfC9UKkJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536073; c=relaxed/simple; bh=lIfRUL3IqiAGOEA/RA1pvNQ06tTn5jqKbg7t8OBWQCA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QooSB4fC284Q06gX84msuean0nNeLsFgZNndDCb1bQDxSavrGcktyD44blhRSirzEaJpkBxTKflI/g7aN7WxC3XcaQ7x+e+KaqBoNvRnouRQitOP6TexVLb9PqLQs81UW2sbMTxYxfmVw3x6otanSEkeveAxYqIZfBBwVdPb7Ko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Uw4tDOqe; 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="Uw4tDOqe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21B58C4CEDD; Wed, 26 Feb 2025 02:14:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536073; bh=lIfRUL3IqiAGOEA/RA1pvNQ06tTn5jqKbg7t8OBWQCA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Uw4tDOqeGCVGVz/ydFZcjMP2OA5CXzJuksoLkBZB5/O50KsK39Vf7Q/aoZ/KlN7xw E24x2iEkg7n9DD4V+KvBB0YB3ZzSvZAV4HublkvKwBrKhTsUOVpvGmvItbtnH4TbTN sQrX2He8PKAR09tb++8Amf7hy+GTqVJiw+NJom9I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49455: misc: ocxl: fix possible double free in ocxl_file_register_afu Date: Wed, 26 Feb 2025 03:12:09 +0100 Message-ID: <2025022600-CVE-2022-49455-a338@gregkh> X-Mailer: git-send-email 2.48.1 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=2912; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lIfRUL3IqiAGOEA/RA1pvNQ06tTn5jqKbg7t8OBWQCA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yn+4Xrk/sX1PncpbhqiYGBmfDUfP1i8M+Ln5q+u3x Rsfr6jL7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJdF1mmB8z7/ziPLU1tz/G ei/6mHWJR3PCucsMC6ZNeW63Q/sXu0l/3hSf8wEOsTIxcQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: misc: ocxl: fix possible double free in ocxl_file_register_afu info_release() will be called in device_unregister() when info->dev's reference count is 0. So there is no need to call ocxl_afu_put() and kfree() again. Fix this by adding free_minor() and return to err_unregister error path. The Linux kernel CVE team has assigned CVE-2022-49455 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.4.198 with commit de65c32ace9aa70d51facc61ba986607075e3a25 Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.10.121 with commit ee89d8dee55ab4b3b8ad8b70866b2841ba334767 Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.15.46 with commit 8fb674216835e1f0c143762696d645facebb4685 Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.17.14 with commit 252768d32e92c1214aeebb5fec0844ca479bcf5c Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.18.3 with commit 9e9087cf34ee69f4e95d146ac29385d6e367a97b Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.19 with commit 950cf957fe34d40d63dfa3bf3968210430b6491e 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-49455 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/misc/ocxl/file.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/de65c32ace9aa70d51facc61ba986607075e3a25 https://git.kernel.org/stable/c/ee89d8dee55ab4b3b8ad8b70866b2841ba334767 https://git.kernel.org/stable/c/8fb674216835e1f0c143762696d645facebb4685 https://git.kernel.org/stable/c/252768d32e92c1214aeebb5fec0844ca479bcf5c https://git.kernel.org/stable/c/9e9087cf34ee69f4e95d146ac29385d6e367a97b https://git.kernel.org/stable/c/950cf957fe34d40d63dfa3bf3968210430b6491e