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 748211581F3 for ; Fri, 3 May 2024 17:46:51 +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=1714758411; cv=none; b=PcODxpTXTvYKnjryoFYq+/QACcXlj7aV4DN+d3RG05kls5g72T0zJRc1IiQF47W/+dGVjHwg1ST3wlghDGQ693VCm8RF1XY/iJFKiLO+FVSluiPLwKJmklYW6FL9/p4zAsqMBts9SPiO/5i8IUhbYDcj3SQYBBSHDDMZeCf+Xy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758411; c=relaxed/simple; bh=J9D0hYRpM0BFk/EZMMufDNtgkGRoIrQSGKQqHf7b8So=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BUyckmx3u53wrX7aoYuUT1nvpkwVYTG0kiiwxeqAub8rgfA+NO5yu9WKAg1L+Lfi9HSNPbWxqmlyNi+sAH8S7+QS8skCz7STw7H0s7W7foDil3+1GbTviJWv56HWnZHSIP8QBY4m7F6ZE/OwpY2ToOtbQ2IMkphrRUMODJZy28o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S5N2Wsf6; 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="S5N2Wsf6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0B11C116B1; Fri, 3 May 2024 17:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714758411; bh=J9D0hYRpM0BFk/EZMMufDNtgkGRoIrQSGKQqHf7b8So=; h=From:To:Cc:Subject:Date:Reply-to:From; b=S5N2Wsf6Qjpxwobpu++iP8dieuyzNLHBI6LMM/MU92rUtm0rwQ09GeIFYqlpUAYjK qcC+uIJTa81zB4ZNMz4mQI9VkGaXZcXTlxFVjYFFFpZGBa+Ri7TQgmdcdFMVcmbDFA a5kXYbxWd/Rm2YfziqJhpSuK27VbLn0jPGIFvoEI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48705: wifi: mt76: mt7921e: fix crash in chip reset fail Date: Fri, 3 May 2024 19:46:01 +0200 Message-ID: <2024050351-CVE-2022-48705-a5c4@gregkh> X-Mailer: git-send-email 2.45.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=3200; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=J9D0hYRpM0BFk/EZMMufDNtgkGRoIrQSGKQqHf7b8So=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmmSud/9trsU1uWspYtbMmHNXtPHJyyrrZ7e3jHP/sVb Rnf7rFzdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEtIoZ5pdqqnkfjdG/zfH+ Q8t/y2iz4DkeuxnmB+7Xv2LN0mO08WW5QpD5iuVC62fwAgA= 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: mt76: mt7921e: fix crash in chip reset fail In case of drv own fail in reset, we may need to run mac_reset several times. The sequence would trigger system crash as the log below. Because we do not re-enable/schedule "tx_napi" before disable it again, the process would keep waiting for state change in napi_diable(). To avoid the problem and keep status synchronize for each run, goto final resource handling if drv own failed. [ 5857.353423] mt7921e 0000:3b:00.0: driver own failed [ 5858.433427] mt7921e 0000:3b:00.0: Timeout for driver own [ 5859.633430] mt7921e 0000:3b:00.0: driver own failed [ 5859.633444] ------------[ cut here ]------------ [ 5859.633446] WARNING: CPU: 6 at kernel/kthread.c:659 kthread_park+0x11d [ 5859.633717] Workqueue: mt76 mt7921_mac_reset_work [mt7921_common] [ 5859.633728] RIP: 0010:kthread_park+0x11d/0x150 [ 5859.633736] RSP: 0018:ffff8881b676fc68 EFLAGS: 00010202 ...... [ 5859.633766] Call Trace: [ 5859.633768] [ 5859.633771] mt7921e_mac_reset+0x176/0x6f0 [mt7921e] [ 5859.633778] mt7921_mac_reset_work+0x184/0x3a0 [mt7921_common] [ 5859.633785] ? mt7921_mac_set_timing+0x520/0x520 [mt7921_common] [ 5859.633794] ? __kasan_check_read+0x11/0x20 [ 5859.633802] process_one_work+0x7ee/0x1320 [ 5859.633810] worker_thread+0x53c/0x1240 [ 5859.633818] kthread+0x2b8/0x370 [ 5859.633824] ? process_one_work+0x1320/0x1320 [ 5859.633828] ? kthread_complete_and_exit+0x30/0x30 [ 5859.633834] ret_from_fork+0x1f/0x30 [ 5859.633842] The Linux kernel CVE team has assigned CVE-2022-48705 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 0efaf31dec57 and fixed in 5.19.9 with commit f7f3001723e3 Issue introduced in 5.17 with commit 0efaf31dec57 and fixed in 6.0 with commit fa3fbe640378 Issue introduced in 5.16.3 with commit cdb39e251f86 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-48705 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/mt7921/pci_mac.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/f7f3001723e337568017e8617974f29bc8b2f595 https://git.kernel.org/stable/c/fa3fbe64037839f448dc569212bafc5a495d8219