Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154606; b=2E/Y1l5GmM9ElUlu3Z20+kPsYXWz0kt27CoKQELUkz1Z6oj/Ai7j/5SxMB8c2Aeg4lmX QbgeULmwWNR1VrcFrDUszWD74PN+R2G8MblzcMm3V63rDjTlOpE0PwoZ0DrAh87Y2Em/6 3TNRd1YoMah7pqlVftSPCKE4IPaYUEkCT5nQTmOo4jqjc28Yw1IL6EH6msOcHfRInIZ4g 7l6sF9bhC+uVN3/g7zVJktKlNpqyKC8WZ0mLVmUUcT1Zsd0fwRM8ElXR9n4VI2Hu9XM8q ip8ViH8S2WS9sPbTkALKJvT5LlIRIEWiSdKFuvk3Lv7USYI4M6l5eGEufYwg7LNWBNw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154606; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=LN2tbhMkFi5CW7PzdtqsinzZ8c4n5hx4yrjpac9RDH0=; b=SCZs1aRSS32zli+8aLhHXmozTBoDIw6EMgJoHOKKK1gX/XiYU68i/0w1s40Dw0i9STZa unCesqe0QIrU4vsxu8pcElMzTrVbA/58l+wJ1QoUxqchSsZMWk3owKAOsBf79i4V63lks o4a6zqdv1PYK6rnt1q0noF1LoMiZ0SQQVkMgspmvosIdVglB0YQc63OnNi16yF/wLv4TB sI361xyFBRgt8aDD99C4g/49dRqNA+TR+mMeJMBSVrzKPSb1b2S83zrfiwbGsBbIFL8Nv mFCJzZZcuOMIqTShbbxZ+oMzGMG3OSU20dXyW5r7Rx5lG+Mn/xzZ3EDWHSYI86WCNVw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OuE9IIYv; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F179606A51F for ; Fri, 20 Nov 2026 06:03:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=OuE9IIYv Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8771F000C6; Fri, 20 Nov 2026 06:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154606; bh=LN2tbhMkFi5CW7PzdtqsinzZ8c4n5hx4yrjpac9RDH0=; h=From:To:Cc:Subject:Date:Reply-To; b=OuE9IIYvnTTNWh/O9+HflUFDuo+Lyj3n2AL8I34EfwCy3a18hHN00ieD10ZHtLg2K IDS/PbVgRJFDRJXQg6uM0lC7DYjO3HLmGSaDwYPPS6JRBz5DERsKoO/RCbw3Vu2/aP NDbwr3dg0Eg4Rq+qnEg81bsYe0U8v10MHWx+ODRo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99795: cxl/features: Ensure that count is set before access to ent[] __counted_by() Date: Fri, 20 Nov 2026 06:53:01 +0100 Message-ID: <2026112037-CVE-2026-99795-76e6@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3079; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=y2fX9zBLmDfygjI8dCjQb1E7NMg3PKonB/OlFvOWIvM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/7691r1yvXSrKnJ8occ/mdXn+y5LoDW9atc3W//OcH apRb/CxI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZy5CTDgklPl4R+nLnvuZSA 7Z0y8723amaVOzDM990TrbmzYHL2Kt3POTcqGSafYPRvAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: cxl/features: Ensure that count is set before access to ent[] __counted_by() get_supported_features() assigns entries->num_features only after the memcpy() loop that fills entries->ent[] has already run. Since ent[] is __counted_by(num_features), the compiler's bounds instrumentation sees a 0-length array during that loop and FORTIFY_SOURCE trips on the memcpy. Set @num_features right after allocation, before any write into ent[], so the bound is correct for the whole lifetime of the array. This was found via a fortify panic: memcpy: detected buffer overflow: 384 byte write of buffer size 0 WARNING: lib/string_helpers.c:1035 at __fortify_report+0x54/0xa0 kernel BUG at lib/string_helpers.c:1043! Call trace: __fortify_panic+0x10/0x18 get_supported_features.isra.0+0x4a0/0x4d0 [cxl_core] devm_cxl_setup_features+0x84/0x120 [cxl_core] cxl_pci_probe+0x254/0x5e0 [cxl_pci] Same class of bug, same fix shape as commit 6c9d2e87df40 ("cxl/fwctl: Fix __fortify_panic"), which fixed the analogous issue in cxlctl_get_supported_features() but missed this one. [ dj: Fixed up title typo per Jonathan. ] The Linux kernel CVE team has assigned CVE-2026-99795 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit f0e6a2329bf9d44138be2163370ae9537cbdaf74 and fixed in 6.18.64 with commit 63714fa4033b51ce615be6f083be0b19847d0d1e Issue introduced in 6.15 with commit f0e6a2329bf9d44138be2163370ae9537cbdaf74 and fixed in 7.3.5 with commit deb8b87c027db150de626a5808f648b1e52d90a1 Issue introduced in 6.15 with commit f0e6a2329bf9d44138be2163370ae9537cbdaf74 and fixed in 7.4-rc1 with commit c1031c2474f73261d8d5e4deef2b5dc20fb964f5 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-2026-99795 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/cxl/core/features.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/63714fa4033b51ce615be6f083be0b19847d0d1e https://git.kernel.org/stable/c/deb8b87c027db150de626a5808f648b1e52d90a1 https://git.kernel.org/stable/c/c1031c2474f73261d8d5e4deef2b5dc20fb964f5