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 000791E49B for ; Mon, 21 Oct 2024 12:16:30 +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=1729512991; cv=none; b=iMUd53Cb9l6F+9hWzZJAfCjqXxdDX3ACQPMuZHe3jf+W+o9psTA36z3KL/lBhI4tj3FjVqwS14Wc2Gp9LCsUMeE3KW94VM9SH1BhcTxiLjhr2ed4dxhNZzYbHQdzaD5/o/caJdSQ+UhOECl85LUozPlAKL9xb6lV3OTgBMFodL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729512991; c=relaxed/simple; bh=fZ4xmTfa3388YOLkU/oMJosOkYlKrK+Q2YOr536eAQw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UGg5UYQPfHW9EMlFCzZ++zrr0Q0o4wyRHvbkfgn+T4NkWJSBXNV34LXAqXOCXCs/yAAgKEWcxbLQ9fyDhSg//UYkq497Buigf5eRCa0UOa3JiX7TUw45UPaA5brUZtrigTqHAJyPYjXDt0r4RHhGEUVMo4/E79aP8ykr5LH+uQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zMSdv49s; 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="zMSdv49s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC63C4CEC3; Mon, 21 Oct 2024 12:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729512990; bh=fZ4xmTfa3388YOLkU/oMJosOkYlKrK+Q2YOr536eAQw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zMSdv49s38PKL5U4y82IiemiEVYl7Kl3V5lNRrdcNobTZDrxUn/zGPqj3jt2+T3It omtZVRKvRSdB0UkOOUiDdd/cPuRSpVr1Y/j9J8Q9GiQ/kKBBdO0F9uSOhOIVDuPMZ6 xP5czWbppQQsT6q/q9TPBxYnbHOwqDpJ9o054iwY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-47724: wifi: ath11k: use work queue to process beacon tx event Date: Mon, 21 Oct 2024 14:16:03 +0200 Message-ID: <2024102103-CVE-2024-47724-c771@gregkh> X-Mailer: git-send-email 2.47.0 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=3193; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fZ4xmTfa3388YOLkU/oMJosOkYlKrK+Q2YOr536eAQw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlibizLzzB8TDqhXbxIvfpRkN7RqtWsJsw88+qNzESXN TSYyfp2xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQk5zDM0y05cH1bTM/N9bpV N1kL/hacdfnkwrBgL8fV3X+WX34050Jl4A3BUP6KvK3mAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: wifi: ath11k: use work queue to process beacon tx event Commit 3a415daa3e8b ("wifi: ath11k: add P2P IE in beacon template") from Feb 28, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/net/wireless/ath/ath11k/wmi.c:1742 ath11k_wmi_p2p_go_bcn_ie() warn: sleeping in atomic context The reason is that ath11k_bcn_tx_status_event() will directly call might sleep function ath11k_wmi_cmd_send() during RCU read-side critical sections. The call trace is like: ath11k_bcn_tx_status_event() -> rcu_read_lock() -> ath11k_mac_bcn_tx_event() -> ath11k_mac_setup_bcn_tmpl() …… -> ath11k_wmi_bcn_tmpl() -> ath11k_wmi_cmd_send() -> rcu_read_unlock() Commit 886433a98425 ("ath11k: add support for BSS color change") added the ath11k_mac_bcn_tx_event(), commit 01e782c89108 ("ath11k: fix warning of RCU usage for ath11k_mac_get_arvif_by_vdev_id()") added the RCU lock to avoid warning but also introduced this BUG. Use work queue to avoid directly calling ath11k_mac_bcn_tx_event() during RCU critical sections. No need to worry about the deletion of vif because cancel_work_sync() will drop the work if it doesn't start or block vif deletion until the running work is done. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 The Linux kernel CVE team has assigned CVE-2024-47724 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit 3a415daa3e8b and fixed in 6.10.13 with commit dbd51da69dda Issue introduced in 6.10 with commit 3a415daa3e8b and fixed in 6.11.2 with commit 6db232905e09 Issue introduced in 6.10 with commit 3a415daa3e8b and fixed in 6.12-rc1 with commit 177b49dbf9c1 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-47724 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/net/wireless/ath/ath11k/core.h drivers/net/wireless/ath/ath11k/mac.c drivers/net/wireless/ath/ath11k/wmi.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/dbd51da69dda1137723b8f66460bf99a9dac8dd2 https://git.kernel.org/stable/c/6db232905e094e64abff1f18249905d068285e09 https://git.kernel.org/stable/c/177b49dbf9c1d8f9f25a22ffafa416fc2c8aa6a3