[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba453200-429c-4828-b4b3-6df8b7cfb134@kernel.org>
Date: Wed, 2 Apr 2025 15:19:39 +0300
From: Roger Quadros <rogerq@...nel.org>
To: Meghana Malladi <m-malladi@...com>, dan.carpenter@...aro.org,
pabeni@...hat.com, kuba@...nel.org, edumazet@...gle.com,
davem@...emloft.net, andrew+netdev@...n.ch
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
namcao@...utronix.de, javier.carrasco.cruz@...il.com, diogo.ivo@...mens.com,
horms@...nel.org, jacob.e.keller@...el.com, john.fastabend@...il.com,
hawk@...nel.org, daniel@...earbox.net, ast@...nel.org, srk@...com,
Vignesh Raghavendra <vigneshr@...com>, danishanwar@...com
Subject: Re: [PATCH net v3 2/3] net: ti: icssg-prueth: Fix possible NULL
pointer dereference inside emac_xmit_xdp_frame()
On 28/03/2025 12:24, Meghana Malladi wrote:
> There is an error check inside emac_xmit_xdp_frame() function which
> is called when the driver wants to transmit XDP frame, to check if
> the allocated tx descriptor is NULL, if true to exit and return
> ICSSG_XDP_CONSUMED implying failure in transmission.
>
> In this case trying to free a descriptor which is NULL will result
> in kernel crash due to NULL pointer dereference. Fix this error handling
> and increase netdev tx_dropped stats in the caller of this function
> if the function returns ICSSG_XDP_CONSUMED.
>
> Fixes: 62aa3246f462 ("net: ti: icssg-prueth: Add XDP support")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/all/70d8dd76-0c76-42fc-8611-9884937c82f5@stanley.mountain/
> Signed-off-by: Meghana Malladi <m-malladi@...com>
> Reviewed-by: Simon Horman <horms@...nel.org>
Reviewed-by: Roger Quadros <rogerq@...nel.org>
Powered by blists - more mailing lists