Commit d698e6a0 authored by Loic Poulain's avatar Loic Poulain Committed by Jakub Kicinski

net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

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: default avatarLoic Poulain <loic.poulain@linaro.org>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Reviewed-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Link: https://lore.kernel.org/r/1612428002-12333-2-git-send-email-loic.poulain@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a64566a2
...@@ -183,6 +183,11 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb) ...@@ -183,6 +183,11 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
if (!skb) if (!skb)
goto done; goto done;
if (skb_linearize(skb)) {
kfree_skb(skb);
goto done;
}
if (skb->pkt_type == PACKET_LOOPBACK) if (skb->pkt_type == PACKET_LOOPBACK)
return RX_HANDLER_PASS; return RX_HANDLER_PASS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment