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 2C12B212B32 for ; Wed, 26 Feb 2025 02:12:51 +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=1740535971; cv=none; b=UHR6UdSoj8VictXgUiFu881DT6YomAhrsQsFIKVLUYKGt9ZYXoZk3vudscAqx2yAErd0AO1SaeIfnm3Qburtr0wtxdd8Sbahj2aVJ1tb4Ix6cazUMCF9jVFakTTU2ILtu1Y7RJd7vOsPotY19UJ1zZb1F5wt9DfcVOsbsefEeBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535971; c=relaxed/simple; bh=Rl9gEvoTlH4uOKftXmoQ8a6kXhxbhaY0EzEpPgBvR4w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qxxS1OsqICYhlHmInIR8gSzyyicU22UKUNWk6kxoTv9R7xrO2fwGuJyvkhawTAqYEqU4LnkSIQgqiJwNElv20SdNmAOuKrfjDPXfiwdGR2nVd0FdB9pwOuiVAP7d0rRuXfUqI/79FHcN5hhSAw7O7O1iU8dOPxfy8DfWyob7ybs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BTLJYXie; 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="BTLJYXie" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED573C4CEDD; Wed, 26 Feb 2025 02:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535971; bh=Rl9gEvoTlH4uOKftXmoQ8a6kXhxbhaY0EzEpPgBvR4w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BTLJYXiexn1xA8XTCZBiNgXVVFviwVM6gDJMq6sdxjLVr9Shc7t5dDy7UrUTuX90P fYJr4iNW7XaWsFCw3mVtUQ1+J6hvEVxCJHJRdB/iR1GlPisWTxIHyeOW3XK9MRmMB2 Bdu541zCPcLTlxpnJVsbOSuLg9LSXNXAcKMjfr8Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49315: drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() Date: Wed, 26 Feb 2025 03:09:49 +0100 Message-ID: <2025022636-CVE-2022-49315-4e45@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=3440; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Rl9gEvoTlH4uOKftXmoQ8a6kXhxbhaY0EzEpPgBvR4w=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yh+si3nOUWN+YdpFs6odP2QXJK6+WCMhx8PRrF2wP Hvr3fPiHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARPj6G+W450lpr2lot0ncc Oispp9Jjv/jqH4b5uRuzfe83ZOv7PSrvPNOvKFrx7IsvAA== 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: drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() There is a deadlock in rtllib_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | rtllib_send_beacon() rtllib_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | rtllib_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold ieee->beacon_lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need ieee->beacon_lock in position (2) of thread 2. As a result, rtllib_beacons_stop() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_irqsave(), which could let timer handler to obtain the needed lock. The Linux kernel CVE team has assigned CVE-2022-49315 to this issue. Affected and fixed versions =========================== Fixed in 4.9.318 with commit 4681129fda9e8555392eaaadb239ec6a6e2b3e12 Fixed in 4.14.283 with commit 381045dc64d23a2229c47c5524c06bfc33d34446 Fixed in 4.19.247 with commit 08bacf871c019163ccd1389d0bc957a43324967a Fixed in 5.4.198 with commit 64b05fa212c7e4d057676e8b7e7120c6eb2f615b Fixed in 5.10.122 with commit 0f69d7d5e918aa43423d86bd17ddb11b1b5e8ada Fixed in 5.15.47 with commit fef451f0fbbe85dbd2962b18379d02e2965610db Fixed in 5.17.15 with commit 46c861009bf437a18417df24cea0d181741b7d72 Fixed in 5.18.4 with commit ffd4c4d5293e4985092ea45ba21cad9326e2e434 Fixed in 5.19 with commit 9b6bdbd9337de3917945847bde262a34a87a6303 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-49315 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/staging/rtl8192e/rtllib_softmac.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/4681129fda9e8555392eaaadb239ec6a6e2b3e12 https://git.kernel.org/stable/c/381045dc64d23a2229c47c5524c06bfc33d34446 https://git.kernel.org/stable/c/08bacf871c019163ccd1389d0bc957a43324967a https://git.kernel.org/stable/c/64b05fa212c7e4d057676e8b7e7120c6eb2f615b https://git.kernel.org/stable/c/0f69d7d5e918aa43423d86bd17ddb11b1b5e8ada https://git.kernel.org/stable/c/fef451f0fbbe85dbd2962b18379d02e2965610db https://git.kernel.org/stable/c/46c861009bf437a18417df24cea0d181741b7d72 https://git.kernel.org/stable/c/ffd4c4d5293e4985092ea45ba21cad9326e2e434 https://git.kernel.org/stable/c/9b6bdbd9337de3917945847bde262a34a87a6303