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 6AF5518B464 for ; Thu, 6 Mar 2025 16: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=1741277673; cv=none; b=X3NXv3G/mHQ9pGH2d63sMp7ybw12G6msZVzA1GJclnoIDKE3tZDXlD8Sw+LwGZ8OGmOmvtNIY4/YVE8rv0LcJkMxb3sUtE6d7SiwrSXIkJDvGYwF453tI1b7CO1m/GJsq9PclwkiALZUL42tPXYO51x6k0IkubVBp6fyTaU8K2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741277673; c=relaxed/simple; bh=JamUUI0v3C16/KPwywt8vaTSRT4I3MP1cd+H818h1GQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bIci0SDhwA/Tc356wjNxPPWHBuiSJNsGb5iVm7lTBUCElXU1Q1SYJsouwByQ7+PExCKrN0Cog49MJnTVfGkEsS60gdCkONabWYcSKItMn4bqJcdFtBawDSGPE5SZGtmRikc15ZcKIL7IBgAmq3OYoxNuQL7trVObmqUgXVVDpOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KNqRabEG; 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="KNqRabEG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC68DC4CEE0; Thu, 6 Mar 2025 16:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741277673; bh=JamUUI0v3C16/KPwywt8vaTSRT4I3MP1cd+H818h1GQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KNqRabEGpgpbmcQFdtchalCvvQBIXHOSTozSpqlaUbPVIHtnwHa1zmEvtJtVD1t4g VqH3enI7BaxoTFNz4a9H1W5gFm1yCMCPUK1Lx/MZTwAdP/19xrbpMGOXtDIqXRqPlj DjBwvFrEMNKsg43Dh3pLkL//uHWliNMwHRP7kbp8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58079: media: uvcvideo: Fix crash during unbind if gpio unit is in use Date: Thu, 6 Mar 2025 17:14:12 +0100 Message-ID: <2025030609-CVE-2024-58079-f973@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=2972; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JamUUI0v3C16/KPwywt8vaTSRT4I3MP1cd+H818h1GQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknT15M7vo59+uZ8OAZ6kezJoRXeRr9lFF/w/aa3c6Qo 2r5t9cLO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiDO8Z5srHxdR47Wbd/vnR xx9GnasFOfQLDBgWLNZederi6j3fKozj2JcXTpWLS2quAQA= 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: uvcvideo: Fix crash during unbind if gpio unit is in use We used the wrong device for the device managed functions. We used the usb device, when we should be using the interface device. If we unbind the driver from the usb interface, the cleanup functions are never called. In our case, the IRQ is never disabled. If an IRQ is triggered, it will try to access memory sections that are already free, causing an OOPS. We cannot use the function devm_request_threaded_irq here. The devm_* clean functions may be called after the main structure is released by uvc_delete. Luckily this bug has small impact, as it is only affected by devices with gpio units and the user has to unbind the device, a disconnect will not trigger this error. The Linux kernel CVE team has assigned CVE-2024-58079 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 2886477ff98740cc3333cf785e4de0b1ff3d7a28 and fixed in 6.6.78 with commit 0b5e0445bc8384c18bd35cb9fe87f6258c6271d9 Issue introduced in 5.12 with commit 2886477ff98740cc3333cf785e4de0b1ff3d7a28 and fixed in 6.12.14 with commit d2eac8b14ac690aa73052aa6d4ba69005715367e Issue introduced in 5.12 with commit 2886477ff98740cc3333cf785e4de0b1ff3d7a28 and fixed in 6.13.3 with commit 5d2e65cbe53d0141ed095cf31c2dcf3d8668c11d Issue introduced in 5.12 with commit 2886477ff98740cc3333cf785e4de0b1ff3d7a28 and fixed in 6.14-rc1 with commit a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5 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-2024-58079 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/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvcvideo.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/0b5e0445bc8384c18bd35cb9fe87f6258c6271d9 https://git.kernel.org/stable/c/d2eac8b14ac690aa73052aa6d4ba69005715367e https://git.kernel.org/stable/c/5d2e65cbe53d0141ed095cf31c2dcf3d8668c11d https://git.kernel.org/stable/c/a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5