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 F28E513B787 for ; Wed, 17 Apr 2024 10:15:01 +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=1713348902; cv=none; b=bOurgSuuzkZLsJC4c51e5fjbp4mi4ysXyjuE+kNnfzvm+CA+pW8hEBtedVErtzFaVKBFEx2W0YTZebq2lKiXWvxZFcanG2p6mTxViZAXP5RvbDJj8wVJFs2zhGBZuKzdCo74LsOMwUdjL1lxcf6ln6b+2Qkhf7c6mLglhOJu5Y8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713348902; c=relaxed/simple; bh=vhpjrsWbjiMtp9pZoDeXYNuL0DqNiyLZo/iMYdI67+I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YGejMDHExEYt60Suci8OR0k3gmfbRuCvzQUbHD8kv2cEYu6sVYYyE5EaEWOra+FtNeSAzan5jdlSNkTAOz0Pl4Od9FMRglobayxNg8/tStLkfeQmrZeeyx2OeqW8BevKSZtTRMu5qHSr2Ls5Q67npr9nRWrOLfCr8MIgfmghN9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s55M81O6; 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="s55M81O6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24FC8C072AA; Wed, 17 Apr 2024 10:15:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713348901; bh=vhpjrsWbjiMtp9pZoDeXYNuL0DqNiyLZo/iMYdI67+I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=s55M81O6Yd/4tnndPMyu9IR+GttHPe6DvHouh4rZOPqkywR1x6kJ/OAAHaBjDOLt8 dPE0jXEYI5FFOZRQdssGfiBUGkAuYngbSupSQqqbgeKQvyoz4oy1lP5WSh7QSgIACL zdHZg9+UtGVZHnE74pjz0HWpYC26m2EifR8FTb/I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26847: powerpc/rtas: use correct function name for resetting TCE tables Date: Wed, 17 Apr 2024 12:14:54 +0200 Message-ID: <2024041753-CVE-2024-26847-953f@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=3707; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vhpjrsWbjiMtp9pZoDeXYNuL0DqNiyLZo/iMYdI67+I=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyC2WVy/OmvtmntHrdA06Rw3laG7S5tGf/DE1/c/gFX +fdmW2rOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi7o8Y5mmE64ZHKfBciC8Q 4Lk7/VZUgIfiR4YF2x+t1lhVk7JArer7s1PxytFPbzxUAwA= 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: powerpc/rtas: use correct function name for resetting TCE tables The PAPR spec spells the function name as "ibm,reset-pe-dma-windows" but in practice firmware uses the singular form: "ibm,reset-pe-dma-window" in the device tree. Since we have the wrong spelling in the RTAS function table, reverse lookups (token -> name) fail and warn: unexpected failed lookup for token 86 WARNING: CPU: 1 PID: 545 at arch/powerpc/kernel/rtas.c:659 __do_enter_rtas_trace+0x2a4/0x2b4 CPU: 1 PID: 545 Comm: systemd-udevd Not tainted 6.8.0-rc4 #30 Hardware name: IBM,9105-22A POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NL1060_028) hv:phyp pSeries NIP [c0000000000417f0] __do_enter_rtas_trace+0x2a4/0x2b4 LR [c0000000000417ec] __do_enter_rtas_trace+0x2a0/0x2b4 Call Trace: __do_enter_rtas_trace+0x2a0/0x2b4 (unreliable) rtas_call+0x1f8/0x3e0 enable_ddw.constprop.0+0x4d0/0xc84 dma_iommu_dma_supported+0xe8/0x24c dma_set_mask+0x5c/0xd8 mlx5_pci_init.constprop.0+0xf0/0x46c [mlx5_core] probe_one+0xfc/0x32c [mlx5_core] local_pci_probe+0x68/0x12c pci_call_probe+0x68/0x1ec pci_device_probe+0xbc/0x1a8 really_probe+0x104/0x570 __driver_probe_device+0xb8/0x224 driver_probe_device+0x54/0x130 __driver_attach+0x158/0x2b0 bus_for_each_dev+0xa8/0x120 driver_attach+0x34/0x48 bus_add_driver+0x174/0x304 driver_register+0x8c/0x1c4 __pci_register_driver+0x68/0x7c mlx5_init+0xb8/0x118 [mlx5_core] do_one_initcall+0x60/0x388 do_init_module+0x7c/0x2a4 init_module_from_file+0xb4/0x108 idempotent_init_module+0x184/0x34c sys_finit_module+0x90/0x114 And oopses are possible when lockdep is enabled or the RTAS tracepoints are active, since those paths dereference the result of the lookup. Use the correct spelling to match firmware's behavior, adjusting the related constants to match. The Linux kernel CVE team has assigned CVE-2024-26847 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit 8252b88294d2 and fixed in 6.6.21 with commit 6b6282d56b14 Issue introduced in 6.3 with commit 8252b88294d2 and fixed in 6.7.9 with commit dd63817baf33 Issue introduced in 6.3 with commit 8252b88294d2 and fixed in 6.8 with commit fad87dbd4815 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-26847 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/powerpc/include/asm/rtas.h arch/powerpc/kernel/rtas.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/6b6282d56b14879124416a23837af9bd52ae2dfb https://git.kernel.org/stable/c/dd63817baf334888289877ab1db1d866af2a6479 https://git.kernel.org/stable/c/fad87dbd48156ab940538f052f1820f4b6ed2819