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 EB3DC524D7 for ; Wed, 22 May 2024 08:20:26 +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=1716366027; cv=none; b=fK6brNFYKu89Spd8ZviMYhNvxmNeW7Zi/zq4trXA58HDvkQfVQA4qHn5k7x/pfCsxSEqGWw7YKePyfrq8N8wavsgl2F+HWpvFCEzRjHzzarl2YB2dG8l2NHTF5/6IpsSz+3T7Bwtl5v5zFOMH+FRBiEetDxMd1G2VTIkCxbwTGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716366027; c=relaxed/simple; bh=yD4N4CPfgNIPVrRhQIWCGMW4e9Vc4TUm0+P6lNXRcBE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aGlM81+NMWqB5Gx74W+XURBLPTK/wnjIHOfBG8FIHDwsbEvDpzLWkFZKBs4lF+TZm+87Ifzsi1fXEmskSItik9bJPDf+qXeoTL1F8nzMnkz7D0TIVFvb8vk42OZ5N+qqrHxutoeVJPkh12f92Tm6v8n9f45u392Bi8ctnBDlkr0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=svUlLqk/; 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="svUlLqk/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73784C2BD11; Wed, 22 May 2024 08:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716366026; bh=yD4N4CPfgNIPVrRhQIWCGMW4e9Vc4TUm0+P6lNXRcBE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=svUlLqk/qY+n6wZ75qXIXRW8EWIx9PJAjCLHvAxYbdQWcLngphdWtfrGLqNgRcbYM r2vv6m1L/NBxOJMVk6pkNqIOGOCdUVhH6ToLENX7kxuWh/gHJpEVIows2a6kidLbqL ewsCH8qydpg/t7hNkS19wfzsi1qUphf9U3k3dO0c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47494: cfg80211: fix management registrations locking Date: Wed, 22 May 2024 10:19:54 +0200 Message-ID: <2024052241-CVE-2021-47494-d0d7@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=2443; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yD4N4CPfgNIPVrRhQIWCGMW4e9Vc4TUm0+P6lNXRcBE=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm+q+Zpi5t/TN48U2RuWWpNgF+TyPPrX/+FLand0LLq0 K5YJ5aOjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIjynDgt1TnxXvsPNiWHfe c84r5mlmr3S1mxgW7N1RtZ77cEf4Oc+UllXH+Bq3aV0MBgA= 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: cfg80211: fix management registrations locking The management registrations locking was broken, the list was locked for each wdev, but cfg80211_mgmt_registrations_update() iterated it without holding all the correct spinlocks, causing list corruption. Rather than trying to fix it with fine-grained locking, just move the lock to the wiphy/rdev (still need the list on each wdev), we already need to hold the wdev lock to change it, so there's no contention on the lock in any case. This trivially fixes the bug since we hold one wdev's lock already, and now will hold the lock that protects all lists. The Linux kernel CVE team has assigned CVE-2021-47494 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 6cd536fe62ef and fixed in 5.10.77 with commit 4c22227e39c7 Issue introduced in 5.8 with commit 6cd536fe62ef and fixed in 5.14.16 with commit 3c897f39b71f Issue introduced in 5.8 with commit 6cd536fe62ef and fixed in 5.15 with commit 09b1d5dc6ce1 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-47494 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: include/net/cfg80211.h net/wireless/core.c net/wireless/core.h net/wireless/mlme.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/4c22227e39c7a0b4dab55617ee8d34d171fab8d4 https://git.kernel.org/stable/c/3c897f39b71fe68f90599f6a45b5f7bf5618420e https://git.kernel.org/stable/c/09b1d5dc6ce1c9151777f6c4e128a59457704c97