Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1489849ybx; Thu, 31 Oct 2019 11:20:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSW8x41MDTtGVEerScO0MsFU8REblXHiOQGp1YD2D3ea61KtzpMZnmeXJnckVE76gbaLO3 X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr5591814eje.87.1572546011109; Thu, 31 Oct 2019 11:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572546011; cv=none; d=google.com; s=arc-20160816; b=gzulFoYrlFe+HHEh3ws+RAyoFcOONM4q9vonsAPFGB6P4QHDCIGrCZYlxJKttMMOGk K0JXo9YGWv+32bh34dTzFWRRzEnZmuZMAVxg53B1UsqThoFaJB4Bdx75yNTcCdibuH1o oB6Q2pddN+nKCbfqKzC2tfadbch54s3EWKevjQXyNQNumyQ1WeeAtOjieMDIzG+fSQPe wqO5hqyaZhyEDwoqNYwBsisnyB4sDux6KaKkzL+PLOOxBzVsIg8PuZf2kwTHg9hloLX7 U1cpqtBTQ0FDTBJm99rEJ9K6Wps1XSzf7ImxocOyngAZRYm9uXWDWh0ZwxaPK/hLwDwC YTkg== 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:date:cc:to:from:subject :message-id; bh=tFD38Fdz4rnq6Crsg6p7wfrp++LdyTBpVJY52/z971o=; b=A4l7YEsS8dOuNdBtdQxFiHOoRVVbWO/aRoSTqunwRfmtAJEO4iTLxQILF/8NxN7nJb wmAhnY7c8KZvMwlCVJSzvs0c2rlOmttd+xBpEaDUAmq7mFElVbisixmit3XBJqBV2LOj A3706QdnwER93sQdQvX/LblvnCJpL98/RAYJmK12k6A6ZHEaM9UbDV6UkA44s4wFExWJ IH6n5pcIz4YhNqJCRbRB0cVhLzVLvJoIbRW/ocrA5jdlvRIZqeBMYzyfLM+3kdm8qmQK 2WL7laIaj2ljtoSpHFnRYru7LnVMn8O1GteId0Fa2X0NfDGQaEAqJknKDAaF/+Bk0D9e jpHw== 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 3si5497702edw.274.2019.10.31.11.19.46; Thu, 31 Oct 2019 11:20:11 -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 S1729254AbfJaSQx (ORCPT + 99 others); Thu, 31 Oct 2019 14:16:53 -0400 Received: from smtprelay0231.hostedemail.com ([216.40.44.231]:40826 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726602AbfJaSQw (ORCPT ); Thu, 31 Oct 2019 14:16:52 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 354811822563C; Thu, 31 Oct 2019 18:16:51 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1537:1561:1593:1594:1711:1714:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3622:3865:3866:3867:3871:4321:5007:6742:7903:9108:10004:10400:11232:11658:11914:12297:12740:12760:12895:13069:13311:13357:13439:14659:21060:21080:21627:30054:30075:30091,0,RBL:47.151.135.224:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:162,LUA_SUMMARY:none X-HE-Tag: sea16_75aca35dfcc57 X-Filterd-Recvd-Size: 1678 Received: from XPS-9350.home (unknown [47.151.135.224]) (Authenticated sender: joe@perches.com) by omf14.hostedemail.com (Postfix) with ESMTPA; Thu, 31 Oct 2019 18:16:48 +0000 (UTC) Message-ID: <734ef2833e4e4e7bded92e9d964bc2415aadf3c4.camel@perches.com> Subject: Re: [PATCH] fbdev: potential information leak in do_fb_ioctl() From: Joe Perches To: Andrea Righi , "Eric W. Biederman" Cc: Dan Carpenter , Bartlomiej Zolnierkiewicz , Daniel Vetter , Sam Ravnborg , Maarten Lankhorst , Peter Rosin , Gerd Hoffmann , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, security@kernel.org, Kees Cook , Julia Lawall Date: Thu, 31 Oct 2019 11:16:39 -0700 In-Reply-To: <20191030201201.GA3209@xps-13> References: <20191029182320.GA17569@mwanda> <87zhhjjryk.fsf@x220.int.ebiederm.org> <20191030074321.GD2656@xps-13> <87r22ujaqq.fsf@x220.int.ebiederm.org> <20191030201201.GA3209@xps-13> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-10-30 at 21:12 +0100, Andrea Righi wrote: > Then memset() + memcpy() is probably the best option, > since copying all those fields one by one looks quite ugly to me... A memset of an automatic before a memcpy to the same automatic is unnecessary.