diff options
author | Sean Tranchetti <stranche@codeaurora.org> | 2018-10-03 03:52:01 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-03 08:16:00 +0300 |
commit | a07f388e2cde2be74b263f85df6f672fea0305a1 (patch) | |
tree | b0c64e299e6466fffcb0d6e486f6f6ba6f81f63b /drivers/net/ethernet/qualcomm/rmnet | |
parent | 45ec318578c0c22a11f5b9927d064418e1ab1905 (diff) | |
download | linux-a07f388e2cde2be74b263f85df6f672fea0305a1.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/rmnet')
-rw-r--r-- | drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 |
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); |