Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp236063pxy; Thu, 22 Apr 2021 00:31:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwygP6RT8lt1xv/Y9rImbzDSPviR2QSyMvtFNds11bpbW+02y8Xeg0MIHvTkJ+1+K+Dehd2 X-Received: by 2002:a17:907:3f93:: with SMTP id hr19mr1958696ejc.76.1619076663136; Thu, 22 Apr 2021 00:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619076663; cv=none; d=google.com; s=arc-20160816; b=y3V1N/9QIfD/ij2/R/JqEd5ETBLq+MM2TvQSo38coOTfH4rGGjGbm2NfBmKKZ+GF6A 1ne154fx67CkMCps9oxaDRKB4MrEFiZHVCDoIicn5rMyK01nwpR2gsTFSyVGVvinK7Ez rwbjvhquD5w7+a/ZgMui2qUv06tiNbCj5rrTIeoAlEaz3edw/tYB5MinU9aMVjNeBpzh a4hdpY80OGGELLc20fE3uYF+dnSkKM55SA53X39kB3gnBXUgL/zhSk0WniiTQMXnk4fw 5sjcZdE1RctmMllAPt1nvFBoNmdCT2ZUJ07f7KD7KSMN3Nn4bJA3jOpUPZ22tdEGwVBQ WZ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=oIW+nvV7g8uuFXS5Li+7k1cw1v41jSUACUG+uDWH11I=; b=0QT1ChF1FbrigK8iUwtgGScxt15Os1RuYc1yMvmwZocvIuX+p6P9I9gyfyO3L7jS73 ucA9yZKdWy8vZfA9itmo0Gxv7t4o/jtc2BEFPji6ciazcQmFJWMKwocSR2c2/biQ7TnZ MGurGcTP6IJBBXVO4to/+L3ZpS1Nb4ZSN6gWgCCbcuQv+HRZrHhIeCXb3SrEwapjCdPI 3ag9ZyTQwASycz0WpfdmQlB0JhLcucy/NALEU8gG21NJIjmu+L4ey/bd0RN9Fb0dev0U kTHeL2gjXwCsIhSMPwHXa5hi1oexGG1ahLcy0ayd3Q94LH9v+MP+jDw9eHA6H1gUqbnl 8X6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=Mbewete0; 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 l11si1545484edb.511.2021.04.22.00.30.39; Thu, 22 Apr 2021 00:31:03 -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=@xs4all.nl header.s=s2 header.b=Mbewete0; 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 S230325AbhDVHaS (ORCPT + 99 others); Thu, 22 Apr 2021 03:30:18 -0400 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:42003 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhDVHaR (ORCPT ); Thu, 22 Apr 2021 03:30:17 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id ZTmLlpai0vTEDZTmOlXxbz; Thu, 22 Apr 2021 09:29:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1619076581; bh=oIW+nvV7g8uuFXS5Li+7k1cw1v41jSUACUG+uDWH11I=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=Mbewete0KCFnfijnv2trCYBYiZ3rNTJtDA+cLKOGgvPvOOqfvr5SRLEVtbiOfNIY+ PtiUW27sV7+R6xyQn3SteKjLeQayDSTTMZBwLrlb75tt47ww/OaVofB7rmNzDoGXMb +eV5m0NWyFDHBCEOm7A6jh41m8KQgSsm30K4KzQwVSgcFz2AdHOvyftRRoUqUT30uu DzAOj7bRuTGg+emjALCzI0Xmw8XMBYplVEsdtEC6i2/WCcW+OssoW4sgW7u2D8CE+g LuiOtdU2DA4FiIBjWnR7iorS2swDRCn7Mnvwc3nZkCyJ9DczEz8xOfOcCR3oF5tCim 6YhP52qnBWvBA== Subject: Re: [PATCH 073/190] Revert "media: rcar_drif: fix a memory disclosure" To: Geert Uytterhoeven , Laurent Pinchart Cc: Greg Kroah-Hartman , Linux Kernel Mailing List , Kangjie Lu , Mauro Carvalho Chehab , Fabrizio Castro , Linux-Renesas , =?UTF-8?Q?Niklas_S=c3=b6derlund?= References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-74-gregkh@linuxfoundation.org> From: Hans Verkuil Message-ID: Date: Thu, 22 Apr 2021 09:29:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfOukMg71tIcGr++cpAbnyngrNb3arbuVJgPCPNjgT8tTvtTZdAR0IqHgNlmRweQWHjbJsENSJiQwaV+PORNmg4lJakV66J8q0ARdnsvrZ6tDhD6OcpwH e8O4RkZD78uneJg8Zc9V7sqCKFJjKRxXBE5J2BWEDqLAuGgmSOzzebZHsxVOCscUHswP8xKJKEGMXeEI1rE/eMTVq3IEx6mlzX0YDAkNyh3Fog4ZxczG0UM4 jd5E7WZ5YGo7HFtNvlzwmJOo6s9woQWcpxRPS4VLhDfF+/IhWfxm8SS5AE1wxvWWQFIkhUCi7K8TqZdWC/2/hpAzUC/45pg/PUcPT4F9y78pjTSSrfH39CBa Cg8BpoCIrDmhpjHfWMyr919l8SvfIvM5hJ0om8UVREZ0KUEgwrwW1OF1dWTDTU7JkxDBAKNx/izepMQg/ISEhFlFBS6eOMuhAwTLmmqQlO0kjUYLuVsw4ltv pciFheaBTZwgG///eJwsFX/BqDu4/iZvbYkWCb8YwmBs4vMZ8O+es9Um4gk= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/04/2021 08:57, Geert Uytterhoeven wrote: > Hi Laurent, > > On Wed, Apr 21, 2021 at 11:22 PM Laurent Pinchart > wrote: >> On Wed, Apr 21, 2021 at 08:58:22PM +0200, Geert Uytterhoeven wrote: >>> On Wed, Apr 21, 2021 at 3:06 PM Greg Kroah-Hartman wrote: >>>> This reverts commit d39083234c60519724c6ed59509a2129fd2aed41. >>>> >>>> Commits from @umn.edu addresses have been found to be submitted in "bad >>>> faith" to try to test the kernel community's ability to review "known >>>> malicious" changes. The result of these submissions can be found in a >>>> paper published at the 42nd IEEE Symposium on Security and Privacy >>>> entitled, "Open Source Insecurity: Stealthily Introducing >>>> Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University >>>> of Minnesota) and Kangjie Lu (University of Minnesota). >>>> >>>> Because of this, all submissions from this group must be reverted from >>>> the kernel tree and will need to be re-reviewed again to determine if >>>> they actually are a valid fix. Until that work is complete, remove this >>>> change to ensure that no problems are being introduced into the >>>> codebase. >>>> >>>> Cc: Kangjie Lu >>>> Cc: Geert Uytterhoeven >>>> Cc: Hans Verkuil >>>> Cc: Mauro Carvalho Chehab >>>> Signed-off-by: Greg Kroah-Hartman >>> >>> Upon a second look, I still see nothing wrong with the original commit. >>> However, as I'm no v4l expert, I'd like to defer to the experts for final >>> judgement. >> >> It seems fine to me, but it also seems unneeded, as the V4L2 core clears >> the whole f->fmt union before calling this operation. The revert will >> this improve performance very slightly. > > Hmm, that means very recent commit f12b81e47f48940a ("media: core > headers: fix kernel-doc warnings") is not fully correct, as it added > kerneldoc stating this is the responsibility of the driver: > > + * @reserved: drivers and applications must zero this array Actually, it is the V4L2 core used by the driver that zeroes this. So drivers don't need to do this, it's done for them. It used to be the responsibility of the driver itself, but this was all moved to the core framework a long time ago since, duh!, drivers always forgot this :-) > > Anyway, it doesn't look like this umn.edu patch introduced a bug. I haven't seen any bugs introduced by the media patches from umn.edu. Regards, Hans > >>>> --- a/drivers/media/platform/rcar_drif.c >>>> +++ b/drivers/media/platform/rcar_drif.c >>>> @@ -915,7 +915,6 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv, >>>> { >>>> struct rcar_drif_sdr *sdr = video_drvdata(file); >>>> >>>> - memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved)); >>>> f->fmt.sdr.pixelformat = sdr->fmt->pixelformat; >>>> f->fmt.sdr.buffersize = sdr->fmt->buffersize; > > Gr{oetje,eeting}s, > > Geert >