From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52130C5CFC1 for ; Tue, 19 Jun 2018 13:15:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6F8720836 for ; Tue, 19 Jun 2018 13:15:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6F8720836 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757346AbeFSNPg (ORCPT ); Tue, 19 Jun 2018 09:15:36 -0400 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 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126] helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fVGTr-0000gW-BQ; Tue, 19 Jun 2018 14:15:31 +0100 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> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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