Received: by 10.192.165.148 with SMTP id m20csp759612imm; Fri, 27 Apr 2018 07:06:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqovGGmXSIKSUsMRBI7VdgP5588sRWlAF9PyreQIP0EN5LdPnc1eFEZ3hJsG+x2Jel28UjC X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr2412202pls.88.1524838002168; Fri, 27 Apr 2018 07:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524838002; cv=none; d=google.com; s=arc-20160816; b=jaiyQQVIcf/wxRhLxS0C0dl8wecxcvnaofAJwQNIXNsSzcCTLgELxMGMDQ/rQQKDae Qa3fxESbiXle98tK8orGCUDigTjtxU8p4W2GWDUmZn5lyWWRe/o113JVG5RZQ9xUp8FA RNMKnwmHxddKOCyRf/mbEt8NyY8ESDDsLqCoc5BLmoKGVSQxQyFpo+seFM6IPH0XTICL GWko74ag+Nb5Zig7klCN9nSZmyhRo0If0MAnIcl7euMx+O7XYR2ThGRBc1Ao8wx/IT2I HWL2SDaVF/bo5AhKsIfocYHx2dDdHptyr0o0T7b2uGsiPdjyEX+bwAO47gqRbE4WrS29 jejw== 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=A2wa7AdGOveQw6iTPLTjqZ6bun4Q/h/j0V84mApgbaI=; b=lzEgv5VumVO/zO1W2ffDq97fYN3UYzVl6ZMW2ApmbrSZ2EdOvy9DvCzSVlsPy3kIQa AhAFdeqqqXrcBM79L3VrXfmC/bNba4jfQW0Z/iD1L39j5UtRK6dJ4nTzKwMI4DQWtNr4 JOngYa12PluV2LP2TgdQymsmmHQXiFn49w17Vx7PL2UIsaO7HZClc/yrafEX4ZTyBgE0 SDpKN19QRrsZCljY3dWYkzmt6Lp+vmxvWwaxtpZLtQhcfxTh63Um6+gfs1atGtEkVJx/ IvhUc0coNWb0JCiZCh6cM6Xsprzl/RuHOqw6qP55K4CaagcuDj5MzroXCIAtwe6Ae+97 xZ6w== 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 33-v6si1329799plu.385.2018.04.27.07.06.27; Fri, 27 Apr 2018 07:06:42 -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 S933897AbeD0OFU (ORCPT + 99 others); Fri, 27 Apr 2018 10:05:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:51538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933840AbeD0OFS (ORCPT ); Fri, 27 Apr 2018 10:05:18 -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 2321621890; Fri, 27 Apr 2018 14:05:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2321621890 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.9 67/74] ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy Date: Fri, 27 Apr 2018 15:58:57 +0200 Message-Id: <20180427135712.717204643@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@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.9-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 @@ -2811,6 +2811,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 }, @@ -2820,6 +2821,7 @@ static const struct nla_policy rtm_ipv6_ [RTA_ENCAP_TYPE] = { .type = NLA_U16 }, [RTA_ENCAP] = { .type = NLA_NESTED }, [RTA_EXPIRES] = { .type = NLA_U32 }, + [RTA_TABLE] = { .type = NLA_U32 }, }; static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,