From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap1.codethink.co.uk ([176.9.8.82]:54974 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756893AbeFSNPe (ORCPT ); Tue, 19 Jun 2018 09:15:34 -0400 Message-ID: <1529414130.2289.295.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 24/24] net: metrics: add proper netlink validation From: Ben Hutchings To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Eric Dumazet , syzbot , David Ahern , "David S. Miller" Date: Tue, 19 Jun 2018 14:15:30 +0100 In-Reply-To: <20180612164817.877152473@linuxfoundation.org> References: <20180612164816.587001852@linuxfoundation.org> <20180612164817.877152473@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On Tue, 2018-06-12 at 18:52 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Eric Dumazet > > [ Upstream commit 5b5e7a0de2bbf2a1afcd9f49e940010e9fb80d53 ] [...] > --- a/net/ipv4/fib_semantics.c > +++ b/net/ipv4/fib_semantics.c > @@ -979,6 +979,8 @@ fib_convert_metrics(struct fib_info *fi, >   if (val == TCP_CA_UNSPEC) >   return -EINVAL; >   } else { > + if (nla_len(nla) != sizeof(u32)) > + return false; For 4.4 and 4.9, the return value on error needs to be -EINVAL. Ben. >   val = nla_get_u32(nla); >   } >   if (type == RTAX_ADVMSS && val > 65535 - 40) -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom