Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp120540pxa; Mon, 10 Aug 2020 20:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTMv5Yka74Sac/8O8lxMHAgMZou4ufDPxaMqLckL6rtD2On7QZ5Mua2pS18YyfYbfeS4eC X-Received: by 2002:a17:906:6d54:: with SMTP id a20mr25769748ejt.501.1597118321126; Mon, 10 Aug 2020 20:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597118321; cv=none; d=google.com; s=arc-20160816; b=ps7T5PD0l+yVGJZ8/mV3Zxi8fHqAaTQyVGTJ10okFquGdgAzsI3RRsOkB1R+1GP+54 TcfHjky0O4WDOdx6gobI83idCoHDS5dRMqYNmhpq/4D3553XlNiDvZ8910Pu0nvXlV0s qX372dfpPsKYcf/pxSarB6k2Sy1h56rOnyer3owJIn7UTkFJQnbJ8Pd77IzCb+lk5352 nab5oSmjGrXP/Yf3HeGbb7rWQshwUsOSZm+mZ8SyJXIQYHSrmrFnjrEXTpXOs8tM696D vixcU6Og6+9y4CaUAyrAzlc29SbqavPvDGMDKsQD1iStiIm/KKlUijJA2dO3t9YKUoBm tJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/Ej3O/P5forMr7lkh8Irj0X/aIJv290wNqPXSY+K8SQ=; b=GGtQFHr067YZp/eZtVV1lhMCVgUvdyrATuy5EivaemlXRL9mJzrrQmmI35ADVqZmqc RcRsUUodHxoy6SflJdzc/Qh/1JEgWGMWui6aQD04A3dX7+2RktikdseW8CvW0cpF4a99 LjnET2u9tG+ue9U9Z68ae0G5tccJPm7qlj3Y7/HNLI5v7RKjhcCoEKOxoAjQo4lAQPZg BLhe5hhfzWFbsYXXItyLXnVNeI9tP0GnOGuw2AKWIB+SlGTJi0P6D7R5vFhqZxgT4jRD p9Et5Z7vm8ntMkZsEAcay88NOvrxr+gnZ5LlWuvqzzA38CWOxzULXFPGtKn9BGADcX+r VuBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dy6m6mzp; 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 n9si11381167edo.79.2020.08.10.20.58.18; Mon, 10 Aug 2020 20:58:41 -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=Dy6m6mzp; 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 S1728246AbgHKD5c (ORCPT + 99 others); Mon, 10 Aug 2020 23:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728196AbgHKD5b (ORCPT ); Mon, 10 Aug 2020 23:57:31 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39A22C06174A; Mon, 10 Aug 2020 20:57:31 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id 77so9445547ilc.5; Mon, 10 Aug 2020 20:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/Ej3O/P5forMr7lkh8Irj0X/aIJv290wNqPXSY+K8SQ=; b=Dy6m6mzpsrA6AiUFbCE/bSjm0Ha27RRY29MhbJd/pIkrgoNaBTwHAWHseayvDnrnCA HwxjeaxYINZHazGU3LyZTfhUmoxozHW8eUuuTVJ2bChVO3S4jc5gnpGqdixrngOjOvZb pT0JrlO6rdHNLUXHOw+rGQRqzehZQ2t0HR9Ie3vLxrt+zMZ3FFs1DyT/jBuUMxkJfg6h cMxGGUnbb16zLxzIVzIFBfrt08riVQ01vqyYYEiqsVUQRbTPP4a+aQTdOpE7Um4t77vW SGhixNnowuHWYLNeYCXspG6tRjf8su5CFtSR4DePU5Ta+mGtOJLAs6rjesqLj0qHV7qj PU3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/Ej3O/P5forMr7lkh8Irj0X/aIJv290wNqPXSY+K8SQ=; b=T6WOTko7kXd2VZjt6DMoCG1kWM1ouXj1agzkqwbYfTHj/FPvG+a++w+38KVMsFyRiT tAw/v4nKiA5i0SqLNvaD053ffwN4YlyyofJYBFmYYHzzUpTnRU31EV7BavzKauzlSM+6 JlKZ+ktVGYOFpUIrnrc1Wg/xqJQ/CplWCxrAITweQiQYWiu8jZ3w4OunjEgnzeCtscIw 9+6CJxVTMopMOzEyovkSCl7D7TRhsty4FWyAhdO3htpTauHpSdS2xNJYG0WgBqFaGJ4X Tz0bvSvQTOVlXhemsVXA1hsyKyG2NmTfplMn6AWrNLsgt/CNfZcu0fThXQ051HmMYkJj QtVQ== X-Gm-Message-State: AOAM533Cxt3ntDeLP2DK2LoZ8GEqoA0/4xtAUNJ/NSbBxl7H+yDurM2Z bDf9kI2vxKMWl1sPvsR1TKnRX0KEc+2dcZ8AHtY= X-Received: by 2002:a92:bad5:: with SMTP id t82mr3521374ill.22.1597118250579; Mon, 10 Aug 2020 20:57:30 -0700 (PDT) MIME-Version: 1.0 References: <20200810220703.796718-1-yepeilin.cs@gmail.com> In-Reply-To: <20200810220703.796718-1-yepeilin.cs@gmail.com> From: Cong Wang Date: Mon, 10 Aug 2020 20:57:19 -0700 Message-ID: Subject: Re: [Linux-kernel-mentees] [PATCH net] ipvs: Fix uninit-value in do_ip_vs_set_ctl() To: Peilin Ye Cc: Wensong Zhang , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , Greg Kroah-Hartman , Linux Kernel Network Developers , lvs-devel@vger.kernel.org, NetFilter , coreteam@netfilter.org, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs , LKML 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 On Mon, Aug 10, 2020 at 3:10 PM Peilin Ye wrote: > > do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is > zero. Fix it. Which exact 'cmd' is it here? I _guess_ it is one of those uninitialized in set_arglen[], which is 0. But if that is the case, should it be initialized to sizeof(struct ip_vs_service_user) instead because ip_vs_copy_usvc_compat() is called anyway. Or, maybe we should just ban len==0 case. In either case, it does not look like you fix it correctly. Thanks.