From: David Miller <davem@davemloft.net>
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, sd@queasysnail.net, pabeni@redhat.com
Subject: Re: [PATCH net] macsec: drop skb sk before calling gro_cells_receive
Date: Thu, 26 Sep 2019 09:25:59 +0200 (CEST) [thread overview]
Message-ID: <20190926.092559.1616198841008311134.davem@davemloft.net> (raw)
In-Reply-To: <36f492a4977192dc4bc22a8c3bbfaf496ed89328.1569229366.git.lucien.xin@gmail.com>
From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 23 Sep 2019 17:02:46 +0800
> Fei Liu reported a crash when doing netperf on a topo of macsec
> dev over veth:
...
> The issue was caused by skb's true_size changed without its sk's
> sk_wmem_alloc increased in tcp/skb_gro_receive(). Later when the
> skb is being freed and the skb's truesize is subtracted from its
> sk's sk_wmem_alloc in tcp_wfree(), underflow occurs.
>
> macsec is calling gro_cells_receive() to receive a packet, which
> actually requires skb->sk to be NULL. However when macsec dev is
> over veth, it's possible the skb->sk is still set if the skb was
> not unshared or expanded from the peer veth.
>
> ip_rcv() is calling skb_orphan() to drop the skb's sk for tproxy,
> but it is too late for macsec's calling gro_cells_receive(). So
> fix it by dropping the skb's sk earlier on rx path of macsec.
>
> Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices")
> Reported-by: Xiumei Mu <xmu@redhat.com>
> Reported-by: Fei Liu <feliu@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Applied and queued up for -stable, thank you.
prev parent reply other threads:[~2019-09-26 7:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 9:02 [PATCH net] macsec: drop skb sk before calling gro_cells_receive Xin Long
2019-09-26 7:25 ` David Miller [this message]
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=20190926.092559.1616198841008311134.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox