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 F0E9A81AAB for ; Wed, 17 Apr 2024 10:30:29 +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=1713349830; cv=none; b=PbO/60U1ZyWo9gNUsuMGmkyjv9in99Sn8s/RNjC2inTPLaN6hR0GQaAbi11trjq0xVI53LK5zcQ64PKu6RCW2NsI0aDqGWB2CZ55AxdYhJx544S+SQlcJqUQoY9vElPNnx0OlZmCQv69LbApIIN6gtaWS0yy4mj/tPDbZAPB+zo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349830; c=relaxed/simple; bh=1qitd5LYFusyvQVUtDLzVCkWCDbn7eq66jfaY1wQsSY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QMTEimwHzynYoQJ1vNnuLF+dpIo195s5xgY43HcKM7gWovVHJpYlimBtXJvg9203tH6xIceSo1oRWdLrGZGT9ua2vgHwipUP/D/bqHxEWDlzoI2ZhAvQ/jSvp5ibEIJM91DbbRUOd7Vmz+bu0/Vr1lzwc7CyyC5Rxl7aXTX0TZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z5/VuKkh; 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="Z5/VuKkh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32B2EC2BD10; Wed, 17 Apr 2024 10:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713349829; bh=1qitd5LYFusyvQVUtDLzVCkWCDbn7eq66jfaY1wQsSY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Z5/VuKkh9O2uCIOBEtLjdNn4eLh5wbCpZlK62PyCVuab/OJ25GjphdW64IXMM3mzn ZrOVl4UBBfOQmv3IyjMIfqctN+ApKOrdBRHsrsb1tpcgAmrHkRA1idMDKeG3TNXsLr e+tm11jNKQvTOMmdYUrJUKvm38qaNsYymuLubj9I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26897: wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete Date: Wed, 17 Apr 2024 12:29:12 +0200 Message-ID: <2024041744-CVE-2024-26897-5382@gregkh> X-Mailer: git-send-email 2.44.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=3645; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1qitd5LYFusyvQVUtDLzVCkWCDbn7eq66jfaY1wQsSY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyS2KWNdpcfXUixebT+RdRCY6Mdz63lk6uCrDY/qOx7 rqeHBdjRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEO4lhwXXOddYV9wSTz/Me zvbR3VgWncCTzrBgivCWnm+t1n9LjRgbdz+6cMpii/MrAA== 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: wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete The ath9k_wmi_event_tasklet() used in ath9k_htc assumes that all the data structures have been fully initialised by the time it runs. However, because of the order in which things are initialised, this is not guaranteed to be the case, because the device is exposed to the USB subsystem before the ath9k driver initialisation is completed. We already committed a partial fix for this in commit: 8b3046abc99e ("ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()") However, that commit only aborted the WMI_TXSTATUS_EVENTID command in the event tasklet, pairing it with an "initialisation complete" bit in the TX struct. It seems syzbot managed to trigger the race for one of the other commands as well, so let's just move the existing synchronisation bit to cover the whole tasklet (setting it at the end of ath9k_htc_probe_device() instead of inside ath9k_tx_init()). The Linux kernel CVE team has assigned CVE-2024-26897 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.136 with commit 78c8397132dd and fixed in 5.10.214 with commit 1bc5461a21c5 Issue introduced in 5.15.17 with commit 735aefae7b68 and fixed in 5.15.153 with commit f8ff4b4df71e Issue introduced in 5.17 with commit 8b3046abc99e and fixed in 6.1.83 with commit 74d0639261dd Issue introduced in 5.17 with commit 8b3046abc99e and fixed in 6.6.23 with commit a015fbf698c8 Issue introduced in 5.17 with commit 8b3046abc99e and fixed in 6.7.11 with commit ac90e22e735b Issue introduced in 5.17 with commit 8b3046abc99e and fixed in 6.8.2 with commit 4afa0246656d Issue introduced in 5.17 with commit 8b3046abc99e and fixed in 6.9-rc1 with commit 24355fcb0d4c Issue introduced in 5.16.3 with commit 7bbc1a50a796 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-26897 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/ath9k/htc.h drivers/net/wireless/ath/ath9k/htc_drv_init.c drivers/net/wireless/ath/ath9k/htc_drv_txrx.c drivers/net/wireless/ath/ath9k/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/1bc5461a21c56a36e2a7d81e152b90ce019a3905 https://git.kernel.org/stable/c/f8ff4b4df71e87f609be0cc37d92e918107f9b90 https://git.kernel.org/stable/c/74d0639261dd795dce958d1b14815bdcbb48a715 https://git.kernel.org/stable/c/a015fbf698c8957aa5fbeefc5c59dd2cf3107298 https://git.kernel.org/stable/c/ac90e22e735bac44f74b5161fb096fbeb0ff8bc2 https://git.kernel.org/stable/c/4afa0246656d5680c8a4c3fb37ba6570c4ab819b https://git.kernel.org/stable/c/24355fcb0d4cbcb6ddda262596558e8cfba70f11