Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4877185pjb; Mon, 27 Jul 2020 07:24:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ/5eMtzXXfZyLWyM0FMOhmM2qFG6aLKvm27A90amdtbxxc819IjRBSdpQxaUk3ngTjyCW X-Received: by 2002:a17:906:a4b:: with SMTP id x11mr3480170ejf.83.1595859862628; Mon, 27 Jul 2020 07:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859862; cv=none; d=google.com; s=arc-20160816; b=0u8Zpzv+tWtUFGAnvgZMjiCYcIhXR1SLGEtoQ3jMeykF3Ptm9d9jZOi/hOfufbk0EJ 220baJpz14kp4V0A1MidlKjJHYtLOmbijQEJ8I+v6sWteGGEfia/SlhL2fmtzLVwAc1f NMbvbdyDfWDhEWbQIpSSoiO9zG0619RnLYe63lWg+b2iXRHxgRqOd6Mfe7/OLQWjw5Bq LWBG3DW7wr9Ai6q/pOnVz65L8EeQjeQE3nq+aK05ehMC4xUG5etVwDWHh7Tk75HgNecT bKEycaIbVCfbSeqcWIAL3jzHEU2R5wib7eYOM5gIMFSnV9pwQiZxF0TZ8EbNlhBGSaF+ FeKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3u0PhFyp8cvL2QkiHoL6pxk/7v8pusgEE1KgNZuHGI8=; b=xb1+fpOf7PhN1eQBXgtyx/zTkuoWzRKr9SVjBp3HuL/ajCXR6KWVgD+lXYccLkq3A/ mAodKYd0YCM6hly0yFi+E6K2suLA57KYqrEAIb4jNPrlgNncuBAaxRTWgkZykE/PjKcU rL00lRESbgrr5mEOm3e9d7O1Zm02FR/h9hAIba4fYJAEU4IyLS0WYk1HYuTNpKqLt6u0 T5VKTNLu+krVU5V+fyLRm8ezCVqD+rVbE3urcpIo6Px+jXZ+3ffKZLc5kBuXuq+/o4+a q8FK59+CSEpcLwa+477XFNjaudNeEfc2LE+pVxbUc+3kMdcQcNyoIE1Xpuds+lbBmbQ8 FZRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sNvkqHVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si5924398edr.225.2020.07.27.07.24.00; Mon, 27 Jul 2020 07:24:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sNvkqHVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731915AbgG0OWj (ORCPT + 99 others); Mon, 27 Jul 2020 10:22:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:51632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731941AbgG0OWi (ORCPT ); Mon, 27 Jul 2020 10:22:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 7D4C920FC3; Mon, 27 Jul 2020 14:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859757; bh=R8+WIDpS4H1RZTphd6Bf4R5UoARIqfO9mbE2RtfVX08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNvkqHVylglPa9ld6HIZ2Pa/oAm+OL0bmChssjZ0AxInivgNBdPgkKRaTkCBTRz5k VQc6Sp++ju+3QL8jGR2WTii9pDjG2gdCvzn/zGDEH6iUXTsRfMYVcBXlvGWpa4xNPB /cgLPf1ms67agj+VLOyXEaWuTDGtxuGDfMYv/wEs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+7ebc2e088af5e4c0c9fa@syzkaller.appspotmail.com, Sabrina Dubroca , Cong Wang , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 094/179] geneve: fix an uninitialized value in geneve_changelink() Date: Mon, 27 Jul 2020 16:04:29 +0200 Message-Id: <20200727134937.245178729@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Cong Wang [ Upstream commit 32818c075c54bb0cae44dd6f7ab00b01c52b8372 ] geneve_nl2info() sets 'df' conditionally, so we have to initialize it by copying the value from existing geneve device in geneve_changelink(). Fixes: 56c09de347e4 ("geneve: allow changing DF behavior after creation") Reported-by: syzbot+7ebc2e088af5e4c0c9fa@syzkaller.appspotmail.com Cc: Sabrina Dubroca Signed-off-by: Cong Wang Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 4661ef865807f..dec52b763d508 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1615,11 +1615,11 @@ static int geneve_changelink(struct net_device *dev, struct nlattr *tb[], struct netlink_ext_ack *extack) { struct geneve_dev *geneve = netdev_priv(dev); + enum ifla_geneve_df df = geneve->df; struct geneve_sock *gs4, *gs6; struct ip_tunnel_info info; bool metadata; bool use_udp6_rx_checksums; - enum ifla_geneve_df df; bool ttl_inherit; int err; -- 2.25.1