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 A6CD1269CE1 for ; Fri, 9 May 2025 06:46: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=1746773161; cv=none; b=oj38SfopfsDXBpoRJYqGXB9Rayrogs6ZTSheuTMtP7HKqmIWZqw6o9bc/OJI7HlRkup3+kD+2mmD+gfDkqmFEkDKG/yROHXp8dOVz5ZgEpsJ5/3/ujegekJCTDYqfzEnNJPyxaWMG6FwHbpaVoATvxdTYkIs85IOl/79W3tH4gk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746773161; c=relaxed/simple; bh=SQp/aoWh13gT1WAs6vnaH7HYT/Ll/E5/XmKqMhNb9nw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nhR1dMonesmjgL1xbka92Us3UsAWBLq+SIuLgasDDz9QSSmpTLaDe8VCR5nj6r1ahDxp+7eulmAq0UAsXtgQ4bo0HpwRaX+INTYpixlGJhYyg/4Jy68as+tDNk/zOyRpcENPr2TFKeLwKXCXEaosbkuYa8BklH+tgXW5kaaMnic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0D7nNAk6; 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="0D7nNAk6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24119C4CEE4; Fri, 9 May 2025 06:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746773161; bh=SQp/aoWh13gT1WAs6vnaH7HYT/Ll/E5/XmKqMhNb9nw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0D7nNAk6kfC2JZBGcbwnb/sgkZaWd6BxusMwCjTYzum8pBAm+nmjMXMj0/7wsTDc4 buH5leOOSltzIqDC6C+teSC7h0cAAIsCUGotR2KjwyC8kV7aMMwrE3JBosdjIwJ2UW d40xqVrAoThu0wsIG7ISQiq4BnGqevT3zoUA21Uw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37887: pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result Date: Fri, 9 May 2025 08:45:54 +0200 Message-ID: <2025050946-CVE-2025-37887-cbe7@gregkh> X-Mailer: git-send-email 2.49.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=2876; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DHb9wLCfS2IbSqLy7FuZWLopfM8q9K5Ln1DdSbWS9Jg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmyS2ZxBLhKT3thsjKJPXBpau1LEQ/bSG3PsM+r968/q jjd1edCRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExklyrD/Nzb6/hVp/1c7Wt2 Ye+z9GVyF3pW/2OYzVanaTLFbLJQ+bag4D9ZvAZVa6c/AQA= 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: pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result If the FW doesn't support the PDS_CORE_CMD_FW_CONTROL command the driver might at the least print garbage and at the worst crash when the user runs the "devlink dev info" devlink command. This happens because the stack variable fw_list is not 0 initialized which results in fw_list.num_fw_slots being a garbage value from the stack. Then the driver tries to access fw_list.fw_names[i] with i >= ARRAY_SIZE and runs off the end of the array. Fix this by initializing the fw_list and by not failing completely if the devcmd fails because other useful information is printed via devlink dev info even if the devcmd fails. The Linux kernel CVE team has assigned CVE-2025-37887 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 45d76f492938cdc27ddadc16e1e75103f4cfbf56 and fixed in 6.6.89 with commit cdd784c96fe2e5edbf0ed9b3e96fe776e8092385 Issue introduced in 6.4 with commit 45d76f492938cdc27ddadc16e1e75103f4cfbf56 and fixed in 6.12.26 with commit 6702f5c6b22deaa95bf84f526148174a160a02cb Issue introduced in 6.4 with commit 45d76f492938cdc27ddadc16e1e75103f4cfbf56 and fixed in 6.14.5 with commit 12a4651a80dbe4589a84e26785fbbe1ed4d043b7 Issue introduced in 6.4 with commit 45d76f492938cdc27ddadc16e1e75103f4cfbf56 and fixed in 6.15-rc4 with commit 2567daad69cd1107fc0ec29b1615f110d7cf7385 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-2025-37887 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/ethernet/amd/pds_core/devlink.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/cdd784c96fe2e5edbf0ed9b3e96fe776e8092385 https://git.kernel.org/stable/c/6702f5c6b22deaa95bf84f526148174a160a02cb https://git.kernel.org/stable/c/12a4651a80dbe4589a84e26785fbbe1ed4d043b7 https://git.kernel.org/stable/c/2567daad69cd1107fc0ec29b1615f110d7cf7385