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 DB3FB433DD for ; Tue, 21 May 2024 14:20:54 +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=1716301254; cv=none; b=eqTVESXL8q9ZFc0F1K7Gj/FkQmcNLJHxzS9qvhZ4/53kTMw6bXWcd3L/Eem99dx5lTCL98ISsGYed5R6xLWvEEcc1rlD7vlWWjFEX+EAfHKfjSQBVfEJDhsg98f4m3sCPH1wyP6AlrCA3Uh96KnBkOOADVDjQjDAxBIn+PobdM8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301254; c=relaxed/simple; bh=17/M1KrzMeFcpvhu3IjrAsx5ACr4JWQqgxCNDebtTyA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MttTXVoxZl6UpygqsRRfEEhrwgGQose7b/zokqVYGuCUCJeH8Bmpye5PYMUhRB+8e0ua7E8s2QwcYmCgRnOkwYOVRl/CCyAMzwkldlyWOdkKc0jsZqoypxPBDN2P4Jf3EjlQgFKoiA3VIRCre86rnrcI2wWDOZ52M10HbyPctPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Sfq4tDvL; 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="Sfq4tDvL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 122E9C2BD11; Tue, 21 May 2024 14:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716301254; bh=17/M1KrzMeFcpvhu3IjrAsx5ACr4JWQqgxCNDebtTyA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Sfq4tDvLdV7MRHUYLC7hz+y7NKJIf3kh7/Cr1Q9IxbLnXZHpj4iqo04RQGMEgtOkq I40I0E2/4CWkiGO5WayhdvtlzyWgOgrRuCa+U2yIr8ugAd5grf8I8rItk5IGOZDApZ Th9Kf4Vq6IWfhVid1PZXwlBjKzs+ZdzUVDFMi0rU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47225: mac80211: fix deadlock in AP/VLAN handling Date: Tue, 21 May 2024 16:19:39 +0200 Message-ID: <2024052137-CVE-2021-47225-550b@gregkh> X-Mailer: git-send-email 2.45.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=2388; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=17/M1KrzMeFcpvhu3IjrAsx5ACr4JWQqgxCNDebtTyA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+ayv5tFfV/Mth3apR5BhUd7hP5XGkRN5Lzimz1q5MX zlX+hFfRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEqYZhQUfYyy8FFcJXTnFN /1HpdmbHT8vPwQzzbPkc9ktlbVDKTpdX6lTvm1+1P+4PAA== 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: mac80211: fix deadlock in AP/VLAN handling Syzbot reports that when you have AP_VLAN interfaces that are up and close the AP interface they belong to, we get a deadlock. No surprise - since we dev_close() them with the wiphy mutex held, which goes back into the netdev notifier in cfg80211 and tries to acquire the wiphy mutex there. To fix this, we need to do two things: 1) prevent changing iftype while AP_VLANs are up, we can't easily fix this case since cfg80211 already calls us with the wiphy mutex held, but change_interface() is relatively rare in drivers anyway, so changing iftype isn't used much (and userspace has to fall back to down/change/up anyway) 2) pull the dev_close() loop over VLANs out of the wiphy mutex section in the normal stop case The Linux kernel CVE team has assigned CVE-2021-47225 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit a05829a7222e and fixed in 5.12.13 with commit 8043903fcb72 Issue introduced in 5.12 with commit a05829a7222e and fixed in 5.13 with commit d5befb224edb 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-47225 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: net/mac80211/iface.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/8043903fcb72f545c52e3ec74d6fd82ef79ce7c5 https://git.kernel.org/stable/c/d5befb224edbe53056c2c18999d630dafb4a08b9