lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200801194846.dxmvg5fmg67nuhwy@ast-mbp.dhcp.thefacebook.com>
Date:   Sat, 1 Aug 2020 12:48:46 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     Christian Brauner <christian.brauner@...ntu.com>,
        Christoph Hellwig <hch@....de>, davem@...emloft.net,
        kuba@...nel.org, ast@...nel.org, netdev@...r.kernel.org,
        bpf@...r.kernel.org, Rodrigo Madera <rodrigo.madera@...il.com>
Subject: Re: [PATCH net] net/bpfilter: initialize pos in
 __bpfilter_process_sockopt

On Fri, Jul 31, 2020 at 02:07:42AM +0200, Daniel Borkmann wrote:
> On 7/30/20 6:13 PM, Christian Brauner wrote:
> > On Thu, Jul 30, 2020 at 06:09:00PM +0200, Christoph Hellwig wrote:
> > > __bpfilter_process_sockopt never initialized the pos variable passed to
> > > the pipe write.  This has been mostly harmless in the past as pipes
> > > ignore the offset, but the switch to kernel_write no verified the
> > 
> > s/no/now/
> > 
> > > position, which can lead to a failure depending on the exact stack
> > > initialization patter.  Initialize the variable to zero to make
> > 
> > s/patter/pattern/
> > 
> > > rw_verify_area happy.
> > > 
> > > Fixes: 6955a76fbcd5 ("bpfilter: switch to kernel_write")
> > > Reported-by: Christian Brauner <christian.brauner@...ntu.com>
> > > Reported-by: Rodrigo Madera <rodrigo.madera@...il.com>
> > > Signed-off-by: Christoph Hellwig <hch@....de>
> > > Tested-by: Rodrigo Madera <rodrigo.madera@...il.com>
> > > ---
> > 
> > Thanks for tracking this down, Christoph! This fixes the logging issue
> > for me.
> > Tested-by: Christian Brauner <christian.brauner@...ntu.com>
> > Reviewed-by: Christian Brauner <christian.brauner@...ntu.com>
> 
> Applied to bpf & fixed up the typos in the commit msg, thanks everyone!

Daniel,
why is it necessary in bpf tree?

I fixed it already in bpf-next in commit a4fa458950b4 ("bpfilter: Initialize pos variable")
two weeks ago...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ