Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4668992pxa; Mon, 10 Aug 2020 15:12:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjvVeovObQID6wXTSRg1JoWXGe2Ha5cPplKkSNT/86JroOQORb6v3aJYvBLWUoMwM7Ur6m X-Received: by 2002:a05:6402:1a26:: with SMTP id be6mr22905038edb.162.1597097519839; Mon, 10 Aug 2020 15:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597097519; cv=none; d=google.com; s=arc-20160816; b=b+T/N0V/2G+UrVHPZM9jIDkyGVrCzjr0O4BYRd6G3KgxwbMy/ZEYLOnoVUcdm7xYV0 EdMX5V/c9PrPsNZIay6mfTZoH5YAY1HsPN0eYVzfYg09TO9KptGWefvKhLiWrfL3T9NS oxl7JXFHJbJYJd9vIcgJm11OYlqAJML+Zr+lH3RYT2P4+6DzREYh/LDE4UWZ5Nt83GcN 4kxBwEf/qY8d6sm/nfEIsNljrjjYsoGqMP6LnCrvgbOMxLyu8R8HlxSb5Eemvay3M2JT y2Sq5ul+PAAsevOskDrJT/jaiaWe9oAZBQfkcIm/7cW5hXNT/p1+69bQdiBbBcgvkBYg a4Bg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3ZbMbahrrNkhzXHol1Zr0zVJbIcJ6vrUXkY246I6Gww=; b=tMeM1JmL9dU3LFXX9+gLV0Bc5wGNfHdVmtYYHj1tOBvl8mKeWHT6uWWAD1W9TJI1HF u3K8MwQRA2uOLobWiAYbBCawnLIsHYlvYG8Qp6R79EP39093sF3gb+o1v62Yemx1IR8E iWduGHvT+/GsermAYatmouuVGdAG9yq+pjuJ36EX5KefT4yITdIjLjEuxPJ7ATOWLc9v 4MYR+6WcGxjwwrsdkccNRk2OKnohsf6oTT/42dbIeQp5A+HPNVtCkSwmn2aiz947SFX+ kvEPbhOo5VX3kC6UXCcux4v5e/mWNnIGnS0ndE1PwgXcGNTkfdQpTlXEf5N+v6dpR3JX +yGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=elE8gXGF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si13611320edl.132.2020.08.10.15.11.36; Mon, 10 Aug 2020 15:11:59 -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=@gmail.com header.s=20161025 header.b=elE8gXGF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726946AbgHJWJG (ORCPT + 99 others); Mon, 10 Aug 2020 18:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbgHJWJF (ORCPT ); Mon, 10 Aug 2020 18:09:05 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72359C06174A; Mon, 10 Aug 2020 15:09:05 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id n129so4275028qkd.6; Mon, 10 Aug 2020 15:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3ZbMbahrrNkhzXHol1Zr0zVJbIcJ6vrUXkY246I6Gww=; b=elE8gXGFCgxGb+WPV22Nwena1f+CuNWdGDIMre+3IYPlJ/dgFxnsv/Nif8jf/9So9g Jfq6u/NSq38DCrgFyDUCnVrtGGmwME440my9SPaB2eKBvqacSCkWOroSb302H/A+6/NC aFFqf3hnQoBHQs4bfAIRRTwhGKzSgh+tqHkZiR1s4ZRMDUflziWLspPza1JmWtc5x5BH hu4Tzumv1CTdCpFez/JNDr9TK5nh5chZTSr0bzMdsoAMlEO6Hm717BFu50YmP2Huc7uT O71KhjXh8z3c2xG1Y5UMQPdQCh0Jh59+6yuOQHl1iV7kGHoV8J8a70s1YKxmLmGKTxYf aS6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3ZbMbahrrNkhzXHol1Zr0zVJbIcJ6vrUXkY246I6Gww=; b=OcvAAcLl0mlJOdi1rKzwVqmE7GxWv8GsQ/Q+Qkx8NWsCOB7Y1Jh3JhQ39jHc4vok+H 2llg+c07Q8zbOrQX7HmAe1vVZbtY85+SVu3mUyMnfqTBHw4fZkCKd8CN6kyPMpIgu7oa t5iAJOISHQEE+ibJM6guczLk7dKawTaQC81uCNZeBUWt0AeMwS8IrIdlRh7OFxqbx2jn nu26/Zh7BWBEkNaSBsaQySKeO1mRW6q5gqATvH+AySZYBpEQx0QdxXHCH9RaQZ72TNhp klepKpiq0neJDTheQ40o3RTziTQEjcz+j+LXxcCfD0dAdzBRIhdjUi09NVacssmiG7bL WsJA== X-Gm-Message-State: AOAM533uIH4dDj6v3KkEgI7hVWLN70PsiybUjAZ2ANU+jTFJGcyH4Ld2 4J1lyvLxEUgffp3kf1HwlA== X-Received: by 2002:a37:bd46:: with SMTP id n67mr29206337qkf.190.1597097343411; Mon, 10 Aug 2020 15:09:03 -0700 (PDT) Received: from localhost.localdomain (146-115-88-66.s3894.c3-0.sbo-ubr1.sbo.ma.cable.rcncustomer.com. [146.115.88.66]) by smtp.gmail.com with ESMTPSA id w12sm14192544qkj.116.2020.08.10.15.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:09:02 -0700 (PDT) From: Peilin Ye To: Wensong Zhang , Simon Horman , Julian Anastasov Cc: Peilin Ye , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , Greg Kroah-Hartman , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org Subject: [Linux-kernel-mentees] [PATCH net] ipvs: Fix uninit-value in do_ip_vs_set_ctl() Date: Mon, 10 Aug 2020 18:07:03 -0400 Message-Id: <20200810220703.796718-1-yepeilin.cs@gmail.com> X-Mailer: git-send-email 2.25.1 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 do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is zero. Fix it. Reported-and-tested-by: syzbot+23b5f9e7caf61d9a3898@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=46ebfb92a8a812621a001ef04d90dfa459520fe2 Signed-off-by: Peilin Ye --- net/netfilter/ipvs/ip_vs_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 412656c34f20..c050b6a42786 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -2418,7 +2418,7 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) { struct net *net = sock_net(sk); int ret; - unsigned char arg[MAX_SET_ARGLEN]; + unsigned char arg[MAX_SET_ARGLEN] = {}; struct ip_vs_service_user *usvc_compat; struct ip_vs_service_user_kern usvc; struct ip_vs_service *svc; -- 2.25.1