Re: [PATCH net] net: phy: micrel: Fix potential null pointer dereference

From: Andrew Lunn
Date: Sat Mar 30 2024 - 12:53:19 EST


On Fri, Mar 29, 2024 at 09:16:31AM +0300, Aleksandr Mishin wrote:
> 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.
>
> Fixes: ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy")
> Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew