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 720B31A314C for ; Wed, 26 Feb 2025 01:58:24 +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=1740535104; cv=none; b=NxHv4S0fZxYrwEGWmv7xbwd3aER6J+tdiGp1A+LG6R/DlcF7ZAVHEIBhqr2UWzk/Yp2IxJDlwEUiZFMo6DD9JoDDxwhzT7jH3ZYduFD7ek/XnLVuszDduJHcdmv9mvQ5GKH4JbpNGl7huYk4JJnLNo5rub8nqUkKDXl1laBv9zM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535104; c=relaxed/simple; bh=EA9qt3/Gi1uR85+EMjfahglKphYGrOMENolHxa2qveg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KF/9skiAPxRk9cDWWiak2792kN5yFDghk6bLR5EXhcMF8vwalmKQFjrpYIWWGGiIr/NIl2kqvpxhsmNrpKNyh9VxjW3x0V1B+jr9I7QQlSRzlkDatt21234S/j/H9WvD5Ijnpo+Vtjgth/+BIU+jK4zXrKrWYiFn1+UmUtA2hoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FRKrLbf2; 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="FRKrLbf2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42D7DC4CEDD; Wed, 26 Feb 2025 01:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535104; bh=EA9qt3/Gi1uR85+EMjfahglKphYGrOMENolHxa2qveg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FRKrLbf2yz+kIlRiKXXLJh3xjMj4t623rEFEebE7lx7Rot8VwayJl9iRG6XDHLug+ 1NBKxxNoHGRP0WyB5EWWHqqwINnJcS+V+BP7CvbtHeBLhM8egJWG9nBpuqYKVPxIQ6 u8hNIyR+FAZOLtvigZKOpfT6TgIUW5rCzvGRcbpk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49112: mt76: fix monitor mode crash with sdio driver Date: Wed, 26 Feb 2025 02:55:17 +0100 Message-ID: <2025022602-CVE-2022-49112-3f57@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=2959; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EA9qt3/Gi1uR85+EMjfahglKphYGrOMENolHxa2qveg=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Sqwcsu4zbtsfYxoVuerlZxWep0l8Z1usUq6rPXDqt MttWm3dEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNxvsiwoFn/hn2b4uQJj75/ OOjnXxF0/8DpewzzDKN+HJxhcJRx6XTpNr//WzMyg1tWAQA= 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: mt76: fix monitor mode crash with sdio driver mt7921s driver may receive frames with fragment buffers. If there is a CTS packet received in monitor mode, the payload is 10 bytes only and need 6 bytes header padding after RXD buffer. However, only RXD in the first linear buffer, if we pull buffer size RXD-size+6 bytes with skb_pull(), that would trigger "BUG_ON(skb->len < skb->data_len)" in __skb_pull(). To avoid the nonlinear buffer issue, enlarge the RXD size from 128 to 256 to make sure all MCU operation in linear buffer. [ 52.007562] kernel BUG at include/linux/skbuff.h:2313! [ 52.007578] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 52.007987] pc : skb_pull+0x48/0x4c [ 52.008015] lr : mt7921_queue_rx_skb+0x494/0x890 [mt7921_common] [ 52.008361] Call trace: [ 52.008377] skb_pull+0x48/0x4c [ 52.008400] mt76s_net_worker+0x134/0x1b0 [mt76_sdio 35339a92c6eb7d4bbcc806a1d22f56365565135c] [ 52.008431] __mt76_worker_fn+0xe8/0x170 [mt76 ef716597d11a77150bc07e3fdd68eeb0f9b56917] [ 52.008449] kthread+0x148/0x3ac [ 52.008466] ret_from_fork+0x10/0x30 The Linux kernel CVE team has assigned CVE-2022-49112 to this issue. Affected and fixed versions =========================== Fixed in 5.15.34 with commit 13946d5a68efd11dd6af2f6ef4c908f6b00158a5 Fixed in 5.16.20 with commit c37b4cab3d97ef64b206fca4d9daabd9aff7356e Fixed in 5.17.3 with commit 95e2af01669c7a3cb7a933cefa06361f9db15059 Fixed in 5.18 with commit 123bc712b1de0805f9d683687e17b1ec2aba0b68 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-49112 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/mediatek/mt76/mt76.h 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/13946d5a68efd11dd6af2f6ef4c908f6b00158a5 https://git.kernel.org/stable/c/c37b4cab3d97ef64b206fca4d9daabd9aff7356e https://git.kernel.org/stable/c/95e2af01669c7a3cb7a933cefa06361f9db15059 https://git.kernel.org/stable/c/123bc712b1de0805f9d683687e17b1ec2aba0b68