All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Sean Tranchetti <stranche@codeaurora.org>,
	Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subject: [PATCH net 1/3] net: qualcomm: rmnet: Skip processing loopback packets
Date: Tue,  2 Oct 2018 18:52:01 -0600	[thread overview]
Message-ID: <1538527923-29562-2-git-send-email-subashab@codeaurora.org> (raw)
In-Reply-To: <1538527923-29562-1-git-send-email-subashab@codeaurora.org>

From: Sean Tranchetti <stranche@codeaurora.org>

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>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 7fd86d4..6908b26 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);
 
-- 
1.9.1

  reply	other threads:[~2018-10-03  7:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  0:52 [PATCH net 0/3] net: qualcomm: rmnet: Updates 2018-10-02 Subash Abhinov Kasiviswanathan
2018-10-03  0:52 ` Subash Abhinov Kasiviswanathan [this message]
2018-10-03  0:52 ` [PATCH net 2/3] net: qualcomm: rmnet: Fix incorrect allocation flag in transmit Subash Abhinov Kasiviswanathan
2018-10-03  0:52 ` [PATCH net 3/3] net: qualcomm: rmnet: Fix incorrect allocation flag in receive path Subash Abhinov Kasiviswanathan
2018-10-03  5:17 ` [PATCH net 0/3] net: qualcomm: rmnet: Updates 2018-10-02 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538527923-29562-2-git-send-email-subashab@codeaurora.org \
    --to=subashab@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stranche@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.