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 BE15E1A3155 for ; Wed, 26 Feb 2025 01:57:29 +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=1740535049; cv=none; b=GGpilHcPa6BJYX5mcr94hsZbOcgoFt6U1bF1RcYWbDdEH2v6ozvVjZDxeQlLoseffuMx7ENK+WUUugRALTaR0/AdcEV+dJdwy9es0YzxSMBXK1f+HVj+SzSiY4fnjYVHb5ulr9lL61tp+WUreW/sDrBoXRDTJOskMFL4bOgTpkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535049; c=relaxed/simple; bh=xArgljv89VLnm1Qp/355lBzmK89OrhD5T5FGKAmKSS8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tZqGIg1aIgtw/89tF6I2C7fe3JshqigaMoP9zVU64YrvrkNMgEc8XrUofRnqcbAjdFQhA31Mlr6HFo6UTHe8kfiPJCtJ5gTDJix/JwWNLccqj16WsntoDrvqUBENmIfytxkkr/ueMQJKFCFAS4p3dRMjKFDOha6kgXpi2yO2WXY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=O87i2lSi; 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="O87i2lSi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90562C4CEE7; Wed, 26 Feb 2025 01:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535049; bh=xArgljv89VLnm1Qp/355lBzmK89OrhD5T5FGKAmKSS8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=O87i2lSiEcE/yI8rWLOmEaTkbE0xed8f4BAaGqwBtmD++gJDpcu0t0scO5yy2QdGH K8vrNVnKqD6qnV/P5RY59QjbZ/pzeR+FNaUQj0TC0tlgIIGEltoXx9jYm3rTIV/7V6 UOiBL3lN6hHRq2+813yBCpuZiiMO/k00Ly/OR58I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47653: media: davinci: vpif: fix use-after-free on driver unbind Date: Wed, 26 Feb 2025 02:54:04 +0100 Message-ID: <2025022649-CVE-2021-47653-2d4e@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=2811; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xArgljv89VLnm1Qp/355lBzmK89OrhD5T5FGKAmKSS8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SnSjb87drf9wmdRczZn3j55s2/Pupc2L93d22N9N+ Vrft4UhoSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAm8kWJYa6ofl/oDDZTzc79 oVproueaK24WYmaY71i33DD02u/KHzXL7+kxt/M13jhfAgA= 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: media: davinci: vpif: fix use-after-free on driver unbind The driver allocates and registers two platform device structures during probe, but the devices were never deregistered on driver unbind. This results in a use-after-free on driver unbind as the device structures were allocated using devres and would be freed by driver core when remove() returns. Fix this by adding the missing deregistration calls to the remove() callback and failing probe on registration errors. Note that the platform device structures must be freed using a proper release callback to avoid leaking associated resources like device names. The Linux kernel CVE team has assigned CVE-2021-47653 to this issue. Affected and fixed versions =========================== Issue introduced in 4.13 with commit 479f7a1181058689435baddc16a6a42e1a8ff0e8 and fixed in 5.15.54 with commit 6512c3c39cb6b573b791ce45365818a38b76afbe Issue introduced in 4.13 with commit 479f7a1181058689435baddc16a6a42e1a8ff0e8 and fixed in 5.16.19 with commit b5a3bb7f6f164eb6ee74ef4898dcd019b2063448 Issue introduced in 4.13 with commit 479f7a1181058689435baddc16a6a42e1a8ff0e8 and fixed in 5.17.2 with commit 9ffc602e14d7b9f7e7cb2f67e18dfef9ef8af676 Issue introduced in 4.13 with commit 479f7a1181058689435baddc16a6a42e1a8ff0e8 and fixed in 5.18 with commit 43acb728bbc40169d2e2425e84a80068270974be 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-2021-47653 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/media/platform/davinci/vpif.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/6512c3c39cb6b573b791ce45365818a38b76afbe https://git.kernel.org/stable/c/b5a3bb7f6f164eb6ee74ef4898dcd019b2063448 https://git.kernel.org/stable/c/9ffc602e14d7b9f7e7cb2f67e18dfef9ef8af676 https://git.kernel.org/stable/c/43acb728bbc40169d2e2425e84a80068270974be