Received: by 10.192.165.148 with SMTP id m20csp844560imm; Fri, 27 Apr 2018 08:24:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqOvqzKTGn4ybUvUgmA6Hdo2hInKThHOLshAT16rkQzJ50Y3UCf+zeVKNfDX+2i0U21pYq+ X-Received: by 10.98.171.16 with SMTP id p16mr2554517pff.211.1524842647582; Fri, 27 Apr 2018 08:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842647; cv=none; d=google.com; s=arc-20160816; b=gwgoYW2Ak8veYHWZNtkWJufaHJXB54sC4GzJTAalFBYfMKIYAqY9GfXdfXSvwODz52 I342paSt1cerVBOdL62Hpl7V4GKTl3f6+zD0+s90XHsso/UEJ/HR34AqDhgQ/+5R+1uz 3igpOExE7SBaTB+SX1JoEUFN68dVhjMaAO8TKk0ZGFBmR7kkmlE3qDA5XEbVnF66zYH0 kNMO2oQT8472tZ9U9x8CMK03pqsUCg0oLkE4m0epl+6lK4nihwTy3Ybb7D5OUqobriIu V80tfgzOfEYJCvj258kivvZjYTLyLEvyN1/Gnd/JE1nQ6nKWPISThe3jFx5J+l9B97j/ /soA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=/C3gNVrBDlieze9XzlayRZv9IqKvMvyWtxqpgDuZzbs=; b=X4lx3ouYGGmPlAu67dWzSzaYDcIphLJUdNuPbnHGuu9hz4sqDju6A6sP8rKD9GbL67 mH7yUfZyTGzeiAtwf1IkcQH/r3Mo72cdj0EcorV0pnB77hYmdzWXD7yZR4G/VZ72ZJK8 H7Lbom01NMis/5kTD/0TUlm8Tm0tejYn0zwczgHj4EfVW4BBjVuU3ygEtmxRvEDTRa+c jCdeelVtDN3GeSVA8xXFTgTA4pH/GStk8SCFrUQR4Y1qomelka+1oIFAu8vZlK70XSv1 EICvgIuvhR49upInXRmHE7wdRPaFN4Q2AYnF8InydtU5mGnMxjeETtDcT3kSypPY0Tkf kkTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12-v6si1423457plk.589.2018.04.27.08.23.53; Fri, 27 Apr 2018 08:24:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933368AbeD0OCf (ORCPT + 99 others); Fri, 27 Apr 2018 10:02:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:49216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932875AbeD0OCc (ORCPT ); Fri, 27 Apr 2018 10:02:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F8F421897; Fri, 27 Apr 2018 14:02:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F8F421897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , syzbot , David Ahern , "David S. Miller" Subject: [PATCH 4.4 46/50] ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy Date: Fri, 27 Apr 2018 15:58:48 +0200 Message-Id: <20180427135658.391226449@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135655.623669681@linuxfoundation.org> References: <20180427135655.623669681@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit aa8f8778493c85fff480cdf8b349b1e1dcb5f243 ] KMSAN reported use of uninit-value that I tracked to lack of proper size check on RTA_TABLE attribute. I also believe RTA_PREFSRC lacks a similar check. Fixes: 86872cb57925 ("[IPv6] route: FIB6 configuration using struct fib6_config") Fixes: c3968a857a6b ("ipv6: RTA_PREFSRC support for ipv6 route source address selection") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/route.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2711,6 +2711,7 @@ void rt6_mtu_change(struct net_device *d static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = { [RTA_GATEWAY] = { .len = sizeof(struct in6_addr) }, + [RTA_PREFSRC] = { .len = sizeof(struct in6_addr) }, [RTA_OIF] = { .type = NLA_U32 }, [RTA_IIF] = { .type = NLA_U32 }, [RTA_PRIORITY] = { .type = NLA_U32 }, @@ -2719,6 +2720,7 @@ static const struct nla_policy rtm_ipv6_ [RTA_PREF] = { .type = NLA_U8 }, [RTA_ENCAP_TYPE] = { .type = NLA_U16 }, [RTA_ENCAP] = { .type = NLA_NESTED }, + [RTA_TABLE] = { .type = NLA_U32 }, }; static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,