From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v2] netfilter: properly initialize xt_table_info structure Date: Thu, 31 May 2018 12:11:47 +0200 Message-ID: <20180531101147.GA26342@kroah.com> References: <20180517100908.GA3150@kroah.com> <20180517132012.GA29160@kroah.com> <20180518092756.odlyvxcpgbuistqq@breakpoint.cc> <20180526145449.GA10379@kroah.com> <20180531082436.ffd6gkbuk6xpm47y@breakpoint.cc> <20180531085116.GA17729@kroah.com> <20180531090758.gwvbzpd4iu74yakj@breakpoint.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: peter pi , Jan Engelhardt , Eric Dumazet , Greg Hackmann , Pablo Neira Ayuso , Jozsef Kadlecsik , Michal Kubecek , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org To: Florian Westphal Return-path: Content-Disposition: inline In-Reply-To: <20180531090758.gwvbzpd4iu74yakj@breakpoint.cc> Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org On Thu, May 31, 2018 at 11:07:58AM +0200, Florian Westphal wrote: > Greg Kroah-Hartman wrote: > > On Thu, May 31, 2018 at 10:24:36AM +0200, Florian Westphal wrote: > > > peter pi wrote: > > > > Hi Greg, I applied this patch on 4.4 and tested it on my Pixel 2, it seems > > > > the problem still exists, > > > > > > What is the problem exactly? > > > > The problem is that kernel data is being sent to userspace due to an > > uncleared buffer that was allocated and then copied to userspace. This > > can be reproduced by dumping the current set of iptables rules. Peter > > had an example reproducing script that he used to specifically show > > this. Peter, can you provide that? > > > > I thought that initializing this buffer to zero would solve the problem, > > but I guess I cleared the wrong buffer :( > > Never mind, this test was on 4.4 not 4.14. > > But even on 4.14 i don't see how zeroing a buffer that will > be filled via copy_from_user would help. It should be copy_to_user() :)