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 BF74319DF75 for ; Wed, 26 Feb 2025 01:57:47 +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=1740535067; cv=none; b=Hex2WWaEQXxGP3pJgHb5PFIQX3sGXt4N/6B1ZvNmWkGDQg3Za9Ypx5rLgoJqOvg9Ie2nz8VuzYeeT4Kxko2LKkVG4XEGabdh4g1Z/gfWNM6h62Wa0sXLtYPx/7fP4pPPoGeFlXHPX3UilhMMFUPoQ9q0se8wnidjebkppRJzjYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535067; c=relaxed/simple; bh=sG4bzv85J1tkd8R7sMAcyDNjw9NPhvq3pKCrtxq3dEw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=udjVTX2v/9AOO9wlyrKpGIvR+m/J5QmA7+7qPzlkFjdR1FxZz3sW/rqw2VqeLvjckQXG43NAg85vXOHo4NhGxShGYwDUBOgkU7E0loK26JCk3Ep+1XYuqzhakZM1LEEZiYmGRPBnssG6BJT4i4VXb5I2zke9AGy8Z1FMad3+BwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MLu0HzG0; 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="MLu0HzG0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39A31C4CEDD; Wed, 26 Feb 2025 01:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535067; bh=sG4bzv85J1tkd8R7sMAcyDNjw9NPhvq3pKCrtxq3dEw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MLu0HzG0bqssrOfBWkkohHiF3Gq3CF9nI27ze/5ML8jyDQhHxMeYJgjNoRIaW94Ng NRRA7BwLVHW4sDzB7mB/JfcuyX8cSPbPXJ0eEYkDIG6de/yit/V4qMRkFVG5i9arkG 0zP5VJd2BCDwMONCQx2STDwRvqXisbYVwchIPSnQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49061: net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link Date: Wed, 26 Feb 2025 02:54:26 +0100 Message-ID: <2025022653-CVE-2022-49061-01b6@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=3060; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sG4bzv85J1tkd8R7sMAcyDNjw9NPhvq3pKCrtxq3dEw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SgztvOtOFS/PnaEXs+VK0LHIz7vuPL0b5RnyUvDkT uszq6NfdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEClYzzC/qXBxtsfzjzvXh 7Gv7P07J3Pvi3DmGBdfvK/OYfeuzuXZg17+N+zU7KsWWRAIA 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: net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link When using a fixed-link, the altr_tse_pcs driver crashes due to null-pointer dereference as no phy_device is provided to tse_pcs_fix_mac_speed function. Fix this by adding a check for phy_dev before calling the tse_pcs_fix_mac_speed() function. Also clean up the tse_pcs_fix_mac_speed function a bit. There is no need to check for splitter_base and sgmii_adapter_base because the driver will fail if these 2 variables are not derived from the device tree. The Linux kernel CVE team has assigned CVE-2022-49061 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit fb3bbdb859891e6bc27fd1afb3a07319f82c2ee4 and fixed in 5.4.190 with commit 7e59fdf9547c4f948d1d917ec7ffa5fb5ac53bdb Issue introduced in 4.8 with commit fb3bbdb859891e6bc27fd1afb3a07319f82c2ee4 and fixed in 5.10.112 with commit 08d5e3e954537931c8da7428034808d202e98299 Issue introduced in 4.8 with commit fb3bbdb859891e6bc27fd1afb3a07319f82c2ee4 and fixed in 5.15.35 with commit 62a48383ebe2e159fd68425dd3e16d4c6bd6599a Issue introduced in 4.8 with commit fb3bbdb859891e6bc27fd1afb3a07319f82c2ee4 and fixed in 5.17.4 with commit 6c020f05253df04c3480b586fe188a3582740049 Issue introduced in 4.8 with commit fb3bbdb859891e6bc27fd1afb3a07319f82c2ee4 and fixed in 5.18 with commit a6aaa00324240967272b451bfa772547bd576ee6 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-2022-49061 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/stmicro/stmmac/altr_tse_pcs.c drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.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/7e59fdf9547c4f948d1d917ec7ffa5fb5ac53bdb https://git.kernel.org/stable/c/08d5e3e954537931c8da7428034808d202e98299 https://git.kernel.org/stable/c/62a48383ebe2e159fd68425dd3e16d4c6bd6599a https://git.kernel.org/stable/c/6c020f05253df04c3480b586fe188a3582740049 https://git.kernel.org/stable/c/a6aaa00324240967272b451bfa772547bd576ee6