From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, willemb@google.com
Subject: Re: [PATCH net] flow_dissector: properly cap thoff field
Date: Thu, 18 Jan 2018 16:26:26 -0500 (EST) [thread overview]
Message-ID: <20180118.162626.1790594555030528090.davem@davemloft.net> (raw)
In-Reply-To: <1516227673.3606.16.camel@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 17 Jan 2018 14:21:13 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> syzbot reported yet another crash [1] that is caused by
> insufficient validation of DODGY packets.
>
> Two bugs are happening here to trigger the crash.
>
> 1) Flow dissection leaves with incorrect thoff field.
>
> 2) skb_probe_transport_header() sets transport header to this invalid
> thoff, even if pointing after skb valid data.
>
> 3) qdisc_pkt_len_init() reads out-of-bound data because it
> trusts tcp_hdrlen(skb)
>
> Possible fixes :
>
> - Full flow dissector validation before injecting bad DODGY packets in
> the stack.
> This approach was attempted here : https://patchwork.ozlabs.org/patch/
> 861874/
>
> - Have more robust functions in the core.
> This might be needed anyway for stable versions.
>
> This patch fixes the flow dissection issue.
>
> [1]
...
> Fixes: 34fad54c2537 ("net: __skb_flow_dissect() must cap its return value")
> Fixes: a6e544b0a88b ("flow_dissector: Jump to exit code in __skb_flow_dissect")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Willem de Bruijn <willemb@google.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
Applied and queued up for -stable, thanks Eric.
prev parent reply other threads:[~2018-01-18 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 22:21 [PATCH net] flow_dissector: properly cap thoff field Eric Dumazet
2018-01-18 3:59 ` Jason Wang
2018-01-18 21:26 ` 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=20180118.162626.1790594555030528090.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
/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;
as well as URLs for NNTP newsgroup(s).