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 9FB771494A2 for ; Wed, 3 Apr 2024 14:57:03 +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=1712156223; cv=none; b=SQFwBZR/zn21ppR1b6l5lIGOJJ/V76KBnv3HdMqF5jzx9Y31lH2RQQkA36cp4YEe6xrJ9uhQ8R576YoLBGw8nVhq8HqVVwhIXF3RkwFggOY+vN4DV/mXi2zbryQk8tdoDkcAgTR2aly6ee4CWteAhtaNzTIQix5Soox+q85ykWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156223; c=relaxed/simple; bh=LAK73qGb0xEJsFYRLfCM+QJ0GIj9ndNLLGFLWt3tIbU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cFcpaKmY82CVPkvTwrxk/bOCK/i04BQFV+6FwGwPFInCFaaP43W68TiSwXGZo9Oa5pTiLZ4SPRkcgOO42Jxdd9cQ42v9kjrDTZj0lGkcfEfoP+qk16laM1bvHnQ6I4AJDEUJcBhL1b/N8DYPFYhGWhX+KnS3CXsrSv+iDAbh3Rw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d/B16BcA; 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="d/B16BcA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28C24C433F1; Wed, 3 Apr 2024 14:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712156223; bh=LAK73qGb0xEJsFYRLfCM+QJ0GIj9ndNLLGFLWt3tIbU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=d/B16BcAZUad9C+4JDdDs/uRFgi0fND76idxNSaPgceEbRolPE15zXSI4gL59PskH AHCQC0xKQ5eMEv+YT2FN5Wae/r4jXbCh92ltqWEt97uuhgXtZhv+N7yyi6mTB4X35p NFkgQDLDCX7JxjWWoxghjpE0bUlfa5l2/9hndWTc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26709: powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach Date: Wed, 3 Apr 2024 16:56:00 +0200 Message-ID: <2024040341-CVE-2024-26709-19b4@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=3047; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LAK73qGb0xEJsFYRLfCM+QJ0GIj9ndNLLGFLWt3tIbU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm8uW8NmuLb3Q5c1zi45ILMcz/vYltZ5wUydxWt3KfIt 4d/nTunI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYikMMwPzgqLcVwHee5U/qG ym5T4sLOMgW9YJintX2Sleb/lpCe1WukjlcmzU06PGELAA== 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/iommu: Fix the missing iommu_group_put() during platform domain attach The function spapr_tce_platform_iommu_attach_dev() is missing to call iommu_group_put() when the domain is already set. This refcount leak shows up with BUG_ON() during DLPAR remove operation as: KernelBug: Kernel bug in state 'None': kernel BUG at arch/powerpc/platforms/pseries/iommu.c:100! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_016) hv:phyp pSeries NIP: c0000000000ff4d4 LR: c0000000000ff4cc CTR: 0000000000000000 REGS: c0000013aed5f840 TRAP: 0700 Tainted: G I (6.8.0-rc3-autotest-g99bd3cb0d12e) MSR: 8000000000029033 CR: 44002402 XER: 20040000 CFAR: c000000000a0d170 IRQMASK: 0 ... NIP iommu_reconfig_notifier+0x94/0x200 LR iommu_reconfig_notifier+0x8c/0x200 Call Trace: iommu_reconfig_notifier+0x8c/0x200 (unreliable) notifier_call_chain+0xb8/0x19c blocking_notifier_call_chain+0x64/0x98 of_reconfig_notify+0x44/0xdc of_detach_node+0x78/0xb0 ofdt_write.part.0+0x86c/0xbb8 proc_reg_write+0xf4/0x150 vfs_write+0xf8/0x488 ksys_write+0x84/0x140 system_call_exception+0x138/0x330 system_call_vectored_common+0x15c/0x2ec The patch adds the missing iommu_group_put() call. The Linux kernel CVE team has assigned CVE-2024-26709 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit a8ca9fc9134c and fixed in 6.7.6 with commit c90fdea9cac9 Issue introduced in 6.7 with commit a8ca9fc9134c and fixed in 6.8 with commit 0846dd77c834 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-26709 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/kernel/iommu.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/c90fdea9cac9eb419fc266e75d625cb60c8f7f6c https://git.kernel.org/stable/c/0846dd77c8349ec92ca0079c9c71d130f34cb192