Received: by 10.192.165.148 with SMTP id m20csp794241imm; Fri, 27 Apr 2018 07:37:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrForXT/qjzfyKHHC9V1TGm6UvKF4A2ykeDpHTKyQwvcm43WYsPgzteBT7svBUQEnaCgTQK X-Received: by 10.98.226.17 with SMTP id a17mr2415453pfi.126.1524839859664; Fri, 27 Apr 2018 07:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524839859; cv=none; d=google.com; s=arc-20160816; b=J1RnaXSUpf04BmEgLf9xD5fehOxYUZBk6ZCn5Gwgw0pkM1AXwqrE5xoIe9lX2iXouo 4z5fVKLr+4N6v+ZDudmHzPYl8fQ3IEjZW9JkPQGszaLG5zB9TqzJAs3/vlukrud3ThEI Kx+hVF2dtU69B8LeGcivvgHPBelem62L7wXUKF6NG8roUIiBbVsSjtUb5PSqEjyi/EHx qNWvbg1fLtMSV4IiRHEDQ3b26hpzEiSq9SjsOrCqfN7penYM11Ld4EHDV4DyV98iQkSn WX/hbf3Ahi3AaZjLwlH7LJQo3JDgNBHT4L5FbGxH9Oa5qzv6M058v0gUNK+iiYGC3ky9 FUig== 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=29LUj9zvGdzIRJK+oAn4TwC6a4U2PNJ0vsBjbi+PKJs=; b=mujxDa3Pn4Otx20O/2GfgZ0WtoRNg4cFNP7AY1NHGdDoBxvtw/gC03ip2ird5BJ2gK /6exA/EFtLdmcTvRgdmM57C47lUX5w6B+635qAolJK2++hyFE9MxlSPxYYnEvzKLd5AC q7f4yuA2S5UEQ8Wj8zNgdIx5b8et3HRazz3O5lJNUp2eQIG+Y0YDRcOdUqBLNPFcXbb8 X40GU3Ed9m7Q80uCn4aAL7icxEp/L1vp3ixN6C2QQvUTaykImaf5fcwqaV4nhjAp3dDn nldGSBFUKuxZsEiNKK1AGauWDf9aGNLh0+3xpp4ts8ntmv9eJ6PVa7Uew1XbYqQdECmb ZKpQ== 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 l3-v6si1367451pld.96.2018.04.27.07.37.25; Fri, 27 Apr 2018 07:37:39 -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 S934757AbeD0OgY (ORCPT + 99 others); Fri, 27 Apr 2018 10:36:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934698AbeD0OJg (ORCPT ); Fri, 27 Apr 2018 10:09:36 -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 17B7221864; Fri, 27 Apr 2018 14:09:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17B7221864 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.16 10/81] ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy Date: Fri, 27 Apr 2018 15:58:12 +0200 Message-Id: <20180427135743.784254497@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135743.216853156@linuxfoundation.org> References: <20180427135743.216853156@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.16-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 @@ -3862,6 +3862,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 }, @@ -3873,6 +3874,7 @@ static const struct nla_policy rtm_ipv6_ [RTA_EXPIRES] = { .type = NLA_U32 }, [RTA_UID] = { .type = NLA_U32 }, [RTA_MARK] = { .type = NLA_U32 }, + [RTA_TABLE] = { .type = NLA_U32 }, }; static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,