[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161205.133611.650439526320620182.davem@davemloft.net>
Date: Mon, 05 Dec 2016 13:36:11 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: keescook@...omium.org
Cc: netdev@...r.kernel.org, mchong@...gle.com, i@...nker017.me,
kuznet@....inr.ac.ru, jmorris@...ei.org, yoshfuji@...ux-ipv6.org,
kaber@...sh.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: ping: check minimum size on ICMP header length
From: Kees Cook <keescook@...omium.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@...nker017.me>
> Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind")
> Cc: stable@...r.kernel.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists