From: Eric Dumazet <eric.dumazet@gmail.com>
To: Mike Maloney <maloneykernel@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net
Cc: Mike Maloney <maloney@google.com>
Subject: Re: [PATCH net] ipv6: fix udpv6 sendmsg crash caused by too small MTU
Date: Wed, 10 Jan 2018 10:56:47 -0800 [thread overview]
Message-ID: <1515610607.131759.27.camel@gmail.com> (raw)
In-Reply-To: <20180110174510.138752-1-maloneykernel@gmail.com>
On Wed, 2018-01-10 at 12:45 -0500, Mike Maloney wrote:
> From: Mike Maloney <maloney@google.com>
>
> The logic in __ip6_append_data() assumes that the MTU is at least large
> enough for the headers. A device's MTU may be adjusted after being
> added while sendmsg() is processing data, resulting in
> __ip6_append_data() seeing any MTU. For an mtu smaller than the size of
> the fragmentation header, the math results in a negative 'maxfraglen',
> which causes problems when refragmenting any previous skb in the
> skb_write_queue, leaving it possibly malformed.
>
> Instead sendmsg returns EINVAL when the mtu is calculated to be less
> than IPV6_MIN_MTU.
>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Mike Maloney <maloney@google.com>
>
>
Reviewed-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2018-01-10 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 17:45 [PATCH net] ipv6: fix udpv6 sendmsg crash caused by too small MTU Mike Maloney
2018-01-10 18:56 ` Eric Dumazet [this message]
2018-01-15 18:30 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2018-01-10 17:10 Mike Maloney
2018-01-10 17:21 ` Eric Dumazet
2018-01-10 17:43 ` Mike Maloney
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=1515610607.131759.27.camel@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=maloney@google.com \
--cc=maloneykernel@gmail.com \
--cc=netdev@vger.kernel.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.