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 25DF02563F for ; Wed, 28 Feb 2024 08:17:13 +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=1709108233; cv=none; b=QIke3ByLCHEOzrabdLra/da/0uYK3wHvDS25liWraxu2dGyijyYEhtfCHOkFFZnU2UlrPTkzrZAM4t3zJjBSteSfV++H2eYUXARVxX46JhP2j2bgGuWCx2pfWHrQ7Ulzf7tbaSoYnznIghwm3DY9d3lJ7uYw+pVADPjNY5d5qeM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108233; c=relaxed/simple; bh=R8LHGoidB4s14ykvuNuyylMOaxd2xw85i93yzOEl9QI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h1goCg2Qk0UP2mJ8N8xz5nMfOwZZoIqbmwbmrmxc27e4V7pHCXqKf9LfAgfaVMfL40DHpPOWYFQtcoCKA9lQL0NRqGlIzBaXdVtqxpOzW4FSn0Ve4p26oSb8iF3qa4oXQ4UYWpZ5jvp470xtTxwskXIHEixri8i38xhXgL1HP1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TnMyFGka; 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="TnMyFGka" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8AE2C433C7; Wed, 28 Feb 2024 08:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108233; bh=R8LHGoidB4s14ykvuNuyylMOaxd2xw85i93yzOEl9QI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TnMyFGka00ev2xBD2mOkCKryfCHQLih5E17y0SXjsUt9oLsdl8q5lfJZSRTfB4drw 2A4PMbgjVqAodlDY3pAPNjuEeypMtFg7j3lTdyArOxilDZoVhqdpX81ghBKyd00Asg Gkc+f0zmMkA9vXv1WCqZse4RV1rPdNfVFe14so7Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47027: mt76: mt7921: fix kernel crash when the firmware fails to download Date: Wed, 28 Feb 2024 09:15:15 +0100 Message-ID: <2024022834-CVE-2021-47027-4a56@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=4410; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qOPx/BdThlk1Nhz2macJ4vQOX0LAU4ZH+DaLVZF+jOY=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3Xme9+DxhifNbu2TDJzEXva6b3djt8/xlZMnja+wic gZXXTIPdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE/okxLJjHMvXZp6InsZmf 7/m9/l06bfGnjFUMc/h+L3mxRWSd07fZe/uv274W5+8+yQkA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: mt76: mt7921: fix kernel crash when the firmware fails to download Fix kernel crash when the firmware is missing or fails to download. [ 9.444758] kernel BUG at drivers/pci/msi.c:375! [ 9.449363] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 9.501033] pstate: a0400009 (NzCv daif +PAN -UAO) [ 9.505814] pc : free_msi_irqs+0x180/0x184 [ 9.509897] lr : free_msi_irqs+0x40/0x184 [ 9.513893] sp : ffffffc015193870 [ 9.517194] x29: ffffffc015193870 x28: 00000000f0e94fa2 [ 9.522492] x27: 0000000000000acd x26: 000000000000009a [ 9.527790] x25: ffffffc0152cee58 x24: ffffffdbb383e0d8 [ 9.533087] x23: ffffffdbb38628d0 x22: 0000000000040200 [ 9.538384] x21: ffffff8cf7de7318 x20: ffffff8cd65a2480 [ 9.543681] x19: ffffff8cf7de7000 x18: 0000000000000000 [ 9.548979] x17: ffffff8cf9ca03b4 x16: ffffffdc13ad9a34 [ 9.554277] x15: 0000000000000000 x14: 0000000000080800 [ 9.559575] x13: ffffff8cd65a2980 x12: 0000000000000000 [ 9.564873] x11: ffffff8cfa45d820 x10: ffffff8cfa45d6d0 [ 9.570171] x9 : 0000000000000040 x8 : ffffff8ccef1b780 [ 9.575469] x7 : aaaaaaaaaaaaaaaa x6 : 0000000000000000 [ 9.580766] x5 : ffffffdc13824900 x4 : ffffff8ccefe0000 [ 9.586063] x3 : 0000000000000000 x2 : 0000000000000000 [ 9.591362] x1 : 0000000000000125 x0 : ffffff8ccefe0000 [ 9.596660] Call trace: [ 9.599095] free_msi_irqs+0x180/0x184 [ 9.602831] pci_disable_msi+0x100/0x130 [ 9.606740] pci_free_irq_vectors+0x24/0x30 [ 9.610915] mt7921_pci_probe+0xbc/0x250 [mt7921e] [ 9.615693] pci_device_probe+0xd4/0x14c [ 9.619604] really_probe+0x134/0x2ec [ 9.623252] driver_probe_device+0x64/0xfc [ 9.627335] device_driver_attach+0x4c/0x6c [ 9.631506] __driver_attach+0xac/0xc0 [ 9.635243] bus_for_each_dev+0x8c/0xd4 [ 9.639066] driver_attach+0x2c/0x38 [ 9.642628] bus_add_driver+0xfc/0x1d0 [ 9.646365] driver_register+0x64/0xf8 [ 9.650101] __pci_register_driver+0x6c/0x7c [ 9.654360] init_module+0x28/0xfdc [mt7921e] [ 9.658704] do_one_initcall+0x13c/0x2d0 [ 9.662615] do_init_module+0x58/0x1e8 [ 9.666351] load_module+0xd80/0xeb4 [ 9.669912] __arm64_sys_finit_module+0xa8/0xe0 [ 9.674430] el0_svc_common+0xa4/0x16c [ 9.678168] el0_svc_compat_handler+0x2c/0x40 [ 9.682511] el0_svc_compat+0x8/0x10 [ 9.686076] Code: a94257f6 f9400bf7 a8c47bfd d65f03c0 (d4210000) [ 9.692155] ---[ end trace 7621f966afbf0a29 ]--- [ 9.697385] Kernel panic - not syncing: Fatal exception [ 9.702599] SMP: stopping secondary CPUs [ 9.706549] Kernel Offset: 0x1c03600000 from 0xffffffc010000000 [ 9.712456] PHYS_OFFSET: 0xfffffff440000000 [ 9.716625] CPU features: 0x080026,2a80aa18 [ 9.720795] Memory Limit: none The Linux kernel CVE team has assigned CVE-2021-47027 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 5c14a5f944b9 and fixed in 5.12.4 with commit a46b536cd60c Issue introduced in 5.12 with commit 5c14a5f944b9 and fixed in 5.13 with commit e230f0c44f01 Please see https://www.kernel.org or 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-47027 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.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/a46b536cd60c0dbd4bf767c62a8774dec52bf099 https://git.kernel.org/stable/c/e230f0c44f011f3270680a506b19b7e84c5e8923