From mboxrd@z Thu Jan 1 00:00:00 1970 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 2DD2C19DF8B for ; Wed, 26 Feb 2025 01:57:26 +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=1740535047; cv=none; b=DUcY4RkyMEOw3Cg6bmIOafY+JQ2gEJUd5Jo4ULj586vwnjtajd4RWR2rf8xCmp8rSP4k02eIgB3JhxSDpVpu9qBmSA0XFZOB8WZGhgZZAZscrHcYFQy5NvuEUWh5lfNUDUQTJ25eiIBbc8+Q3Shptqa9PUKidfxj24chMKnrlNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535047; c=relaxed/simple; bh=aUMSrC4Q6qjNF2sOBI/kyfnhTk8T3c6jjzwAEcEPrU8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ib4yAtcm2sIktotgn33up8lkjiKJgRCBEO9Mx1twJmRuh1hEJYasunkuON8QgOKgAUt697653UZc7rzkICv+36Y2tIjk5/NaGj/oXbiv2MiUjLzv/5o3o7YGgExKZx12GIhUzo2Hbqdi2y/FASOvrGfxq33bJBBXc30NhO4Xleg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yJRkUGWw; 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="yJRkUGWw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A31ECC4CEDD; Wed, 26 Feb 2025 01:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535046; bh=aUMSrC4Q6qjNF2sOBI/kyfnhTk8T3c6jjzwAEcEPrU8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yJRkUGWwOQl2cWU1dnf1oFZoInug/gNZF3Xwz+I60Dx+3mWNU1tB/M523t+JEAQmZ q8Pu5A1nE2fFWI5USqv/CQLXwfB0EGNPh2qg7Yz7BKuXIF2OpdOlelZDGbod/m/ds7 cQYlsjjE6cwjFkKd2fT0duwRpM5Dd42QVQGz+tIw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47631: ARM: davinci: da850-evm: Avoid NULL pointer dereference Date: Wed, 26 Feb 2025 02:53:42 +0100 Message-ID: <2025022643-CVE-2021-47631-bcc8@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=3981; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=aUMSrC4Q6qjNF2sOBI/kyfnhTk8T3c6jjzwAEcEPrU8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7StQZP2xf3cF6a45u1HKPhyZJqiaSWo+ZONzMjsnaW 4fOP7+uI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYyk5lhfvSywJMM5om5qrGO V9cslJg9I/HMFoYFpxrZVq2c5rPP2JqHQ9Bim+reqJf6AA== 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: ARM: davinci: da850-evm: Avoid NULL pointer dereference With newer versions of GCC, there is a panic in da850_evm_config_emac() when booting multi_v5_defconfig in QEMU under the palmetto-bmc machine: Unable to handle kernel NULL pointer dereference at virtual address 00000020 pgd = (ptrval) [00000020] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.0 #1 Hardware name: Generic DT based system PC is at da850_evm_config_emac+0x1c/0x120 LR is at do_one_initcall+0x50/0x1e0 The emac_pdata pointer in soc_info is NULL because davinci_soc_info only gets populated on davinci machines but da850_evm_config_emac() is called on all machines via device_initcall(). Move the rmii_en assignment below the machine check so that it is only dereferenced when running on a supported SoC. The Linux kernel CVE team has assigned CVE-2021-47631 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 4.9.311 with commit c06f476e5b74bcabb8c4a2fba55864a37e62843b Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 4.14.276 with commit a12b356d45cbb6e8a1b718d1436b3d6239a862f3 Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 4.19.239 with commit c64e2ed5cc376e137e572babfd2edc38b2cfb61b Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 5.4.190 with commit 89931d4762572aaee6edbe5673d41f8082de110f Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 5.10.112 with commit 0a312ec66a03133d28570f07bc52749ccfef54da Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 5.15.35 with commit 0940795c6834fbe7705acc5c3d4b2f7a5f67527a Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 5.17.4 with commit c5628533a3ece64235d04fe11ec44d2be99e423d Issue introduced in 2.6.33 with commit bae105879f2f2404155da6f50b3636193d228a62 and fixed in 5.18 with commit 83a1cde5c74bfb44b49cb2a940d044bb2380f4ea 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-2021-47631 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: arch/arm/mach-davinci/board-da850-evm.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/c06f476e5b74bcabb8c4a2fba55864a37e62843b https://git.kernel.org/stable/c/a12b356d45cbb6e8a1b718d1436b3d6239a862f3 https://git.kernel.org/stable/c/c64e2ed5cc376e137e572babfd2edc38b2cfb61b https://git.kernel.org/stable/c/89931d4762572aaee6edbe5673d41f8082de110f https://git.kernel.org/stable/c/0a312ec66a03133d28570f07bc52749ccfef54da https://git.kernel.org/stable/c/0940795c6834fbe7705acc5c3d4b2f7a5f67527a https://git.kernel.org/stable/c/c5628533a3ece64235d04fe11ec44d2be99e423d https://git.kernel.org/stable/c/83a1cde5c74bfb44b49cb2a940d044bb2380f4ea