[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr30VVN=fmE8GpQ-hUv1bGVC=OxATpRpspruD2CPhKOnYQ@mail.gmail.com>
Date: Mon, 5 Dec 2016 12:35:47 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: Kees Cook <keescook@...omium.org>
Cc: "David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Min Chong <mchong@...gle.com>, Qidan He <i@...nker017.me>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Patrick McHardy <kaber@...sh.net>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: ping: check minimum size on ICMP header length
On Sat, Dec 3, 2016 at 9:58 AM, Kees Cook <keescook@...omium.org> wrote:
> - if (len > 0xFFFF)
> + if (len > 0xFFFF || len < icmph_len)
> return -EMSGSIZE;
EMSGSIZE usually means the message is too long. Maybe use EINVAL?
That's what the code will return if the passed-in ICMP header is
invalid (e.g., is not an echo request).
Powered by blists - more mailing lists