summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Tranchetti <stranche@codeaurora.org>2018-10-02 18:52:01 -0600
committerDavid S. Miller <davem@davemloft.net>2018-10-02 22:16:00 -0700
commita07f388e2cde2be74b263f85df6f672fea0305a1 (patch)
treeb0c64e299e6466fffcb0d6e486f6f6ba6f81f63b
parent45ec318578c0c22a11f5b9927d064418e1ab1905 (diff)
net: qualcomm: rmnet: Skip processing loopback packets
RMNET RX handler was processing invalid packets that were originally sent on the real device and were looped back via dev_loopback_xmit(). This was detected using syzkaller. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Sean Tranchetti <stranche@codeaurora.org> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 7fd86d40a337..6908b26feb9e 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -189,6 +189,9 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
if (!skb)
goto done;
+ if (skb->pkt_type == PACKET_LOOPBACK)
+ return RX_HANDLER_PASS;
+
dev = skb->dev;
port = rmnet_get_port(dev);