CVE-2024-35891: net: phy: micrel: Fix potential null pointer dereference
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: phy: micrel: Fix potential null pointer dereference
In lan8814_get_sig_rx() and lan8814_get_sig_tx() ptp_parse_header() may return NULL as ptp_header due to abnormal packet type or corrupted packet. Fix this bug by adding ptp_header check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
The Linux kernel CVE team has assigned CVE-2024-35891 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.18 with commit ece19502834d and fixed in 6.1.85 with commit 10608161696c Issue introduced in 5.18 with commit ece19502834d and fixed in 6.6.26 with commit 95c1016a2d92 Issue introduced in 5.18 with commit ece19502834d and fixed in 6.8.5 with commit 49767b0df276 Issue introduced in 5.18 with commit ece19502834d and fixed in 6.9 with commit 96c155943a70
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-35891
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/phy/micrel.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/10608161696c2768f53426642f78a42bcaaa53e8 https://git.kernel.org/stable/c/95c1016a2d92c4c28a9d1b6d09859c00b19c0ea4 https://git.kernel.org/stable/c/49767b0df276f12e3e7184601e09ee7430e252dc https://git.kernel.org/stable/c/96c155943a703f0655c0c4cab540f67055960e91