From: David Miller <davem@davemloft.net>
To: keescook@chromium.org
Cc: netdev@vger.kernel.org, mchong@google.com, i@flanker017.me,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: ping: check minimum size on ICMP header length
Date: Mon, 05 Dec 2016 13:36:11 -0500 (EST) [thread overview]
Message-ID: <20161205.133611.650439526320620182.davem@davemloft.net> (raw)
In-Reply-To: <20161205183438.GA133528@beast>
From: Kees Cook <keescook@chromium.org>
Date: Mon, 5 Dec 2016 10:34:38 -0800
> Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there
> was no check that the iovec contained enough bytes for an ICMP header,
> and the read loop would walk across neighboring stack contents. Since the
> iov_iter conversion, bad arguments are noticed, but the returned error is
> EFAULT. Returning EINVAL is a clearer error and also solves the problem
> prior to v3.19.
>
> This was found using trinity with KASAN on v3.18:
...
> CVE-2016-8399
>
> Reported-by: Qidan He <i@flanker017.me>
> Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind")
> Cc: stable@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2016-12-05 18:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 18:34 [PATCH v2] net: ping: check minimum size on ICMP header length Kees Cook
2016-12-05 18:36 ` 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=20161205.133611.650439526320620182.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=i@flanker017.me \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=keescook@chromium.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mchong@google.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 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).