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: <CA+mtBx9p0rzey8DQufgFY_+NpyFCTSDitL78533KHF+sbbyKYw@mail.gmail.com>
Date:	Wed, 18 Feb 2015 07:28:07 -0800
From:	Tom Herbert <therbert@...gle.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: Initialize all members in skb_gro_remcsum_init()

On Wed, Feb 18, 2015 at 2:38 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> skb_gro_remcsum_init() initializes the gro_remcsum.delta member only,
> leading to compiler warnings about a possibly uninitialized
> gro_remcsum.offset member:
>
> drivers/net/vxlan.c: In function ‘vxlan_gro_receive’:
> drivers/net/vxlan.c:602: warning: ‘grc.offset’ may be used uninitialized in this function
> net/ipv4/fou.c: In function ‘gue_gro_receive’:
> net/ipv4/fou.c:262: warning: ‘grc.offset’ may be used uninitialized in this function
>
> While these are harmless for now:
>   - skb_gro_remcsum_process() sets offset before changing delta,
>   - skb_gro_remcsum_cleanup() checks if delta is non-zero before
>     accessing offset,
> it's safer to let the initialization function initialize all members.
>

Acked-by: Tom Herbert <therbert@...gle.com>

> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
>  include/linux/netdevice.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 5897b4ea5a3f9e0f..429d1790a27e85f3 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -2342,6 +2342,7 @@ struct gro_remcsum {
>
>  static inline void skb_gro_remcsum_init(struct gro_remcsum *grc)
>  {
> +       grc->offset = 0;
>         grc->delta = 0;
>  }
>
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ