Skip to content

Commit

Permalink
net: qualcomm: rmnet: Skip processing loopback packets
Browse files Browse the repository at this point in the history
[ Upstream commit a07f388 ]

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: ceed73a ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sean Tranchetti authored and gregkh committed Oct 18, 2018
1 parent 3ab83c6 commit 3283c92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3283c92

Please sign in to comment.