[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6d99c2c648337be7a00dbafb66fe6cd@codeaurora.org>
Date: Tue, 02 Feb 2021 17:57:10 -0700
From: subashab@...eaurora.org
To: Loic Poulain <loic.poulain@...aro.org>
Cc: kuba@...nel.org, davem@...emloft.net,
willemdebruijn.kernel@...il.com, netdev@...r.kernel.org,
stranche@...eaurora.org
Subject: Re: [PATCH net-next v2 2/2] net: qualcomm: rmnet: Fix rx_handler for
non-linear skbs
On 2021-02-02 09:16, Loic Poulain wrote:
> There is no guarantee that rmnet rx_handler is only fed with linear
> skbs, but current rmnet implementation does not check that, leading
> to crash in case of non linear skbs processed as linear ones.
>
> Fix that by ensuring skb linearization before processing.
>
> Signed-off-by: Loic Poulain <loic.poulain@...aro.org>
> ---
> v2: Add this patch to the series to prevent crash
>
> drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> index 3d7d3ab..2776c32 100644
> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> @@ -180,7 +180,7 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff
> **pskb)
> struct rmnet_port *port;
> struct net_device *dev;
>
> - if (!skb)
> + if (!skb || skb_linearize(skb))
> goto done;
>
> if (skb->pkt_type == PACKET_LOOPBACK)
Reviewed-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Powered by blists - more mailing lists