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] [day] [month] [year] [list]
Message-ID: <20200414114352.16e6a279@carbon>
Date:   Tue, 14 Apr 2020 11:43:52 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     David Miller <davem@...emloft.net>
Cc:     sameehj@...zon.com, netdev@...r.kernel.org, bpf@...r.kernel.org,
        zorik@...zon.com, akiyano@...zon.com, gtzalik@...zon.com,
        toke@...hat.com, borkmann@...earbox.net,
        alexei.starovoitov@...il.com, john.fastabend@...il.com,
        alexander.duyck@...il.com, jeffrey.t.kirsher@...el.com,
        dsahern@...il.com, willemdebruijn.kernel@...il.com,
        ilias.apalodimas@...aro.org, lorenzo@...nel.org,
        saeedm@...lanox.com, brouer@...hat.com
Subject: Re: [PATCH RFC v2 30/33] xdp: clear grow memory in
 bpf_xdp_adjust_tail()

On Wed, 08 Apr 2020 14:49:14 -0700 (PDT)
David Miller <davem@...emloft.net> wrote:

> From: Jesper Dangaard Brouer <brouer@...hat.com>
> Date: Wed, 08 Apr 2020 13:53:06 +0200
> 
> > @@ -3445,6 +3445,11 @@ BPF_CALL_2(bpf_xdp_adjust_tail, struct xdp_buff *, xdp, int, offset)
> >  	if (unlikely(data_end < xdp->data + ETH_HLEN))
> >  		return -EINVAL;
> >  
> > +	/* Clear memory area on grow, can contain uninit kernel memory */
> > +	if (offset > 0) {
> > +		memset(xdp->data_end, 0, offset);
> > +	}  
> 
> Single statement basic blocks should elide curly braces.

Fixed

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ