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  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]
Date:   Tue, 13 Oct 2020 18:38:55 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     netdev@...r.kernel.org,
        syzbot+4a2c52677a8a1aa283cb@...kaller.appspotmail.com,
        Xie He <xie.he.0141@...il.com>,
        William Tu <u9012063@...il.com>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [Patch net v3] ip_gre: set dev->hard_header_len and
 dev->needed_headroom properly

On Mon, 12 Oct 2020 16:17:21 -0700 Cong Wang wrote:
> GRE tunnel has its own header_ops, ipgre_header_ops, and sets it
> conditionally. When it is set, it assumes the outer IP header is
> already created before ipgre_xmit().
> 
> This is not true when we send packets through a raw packet socket,
> where L2 headers are supposed to be constructed by user. Packet
> socket calls dev_validate_header() to validate the header. But
> GRE tunnel does not set dev->hard_header_len, so that check can
> be simply bypassed, therefore uninit memory could be passed down
> to ipgre_xmit(). Similar for dev->needed_headroom.
> 
> dev->hard_header_len is supposed to be the length of the header
> created by dev->header_ops->create(), so it should be used whenever
> header_ops is set, and dev->needed_headroom should be used when it
> is not set.
> 
> Reported-and-tested-by: syzbot+4a2c52677a8a1aa283cb@...kaller.appspotmail.com
> Cc: Xie He <xie.he.0141@...il.com>
> Cc: William Tu <u9012063@...il.com>
> Acked-by: Willem de Bruijn <willemb@...gle.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>

Applied, thank you!

Powered by blists - more mailing lists