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: <CALx6S36S-npOnqa0U4KZTRNXNihH-cFzW3S6ZowtW_0_L4Ck2A@mail.gmail.com>
Date:	Thu, 25 Jun 2015 09:07:44 -0700
From:	Tom Herbert <tom@...bertland.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Jiri Pirko <jiri@...nulli.us>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] flow_dissector: Pre-initialize ip_proto in __skb_flow_dissect()

On Thu, Jun 25, 2015 at 6:10 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> net/core/flow_dissector.c: In function ‘__skb_flow_dissect’:
> net/core/flow_dissector.c:132: warning: ‘ip_proto’ may be used uninitialized in this function
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
> This may be a false positive, but the state machine in
> __skb_flow_dissect() is a bit hard to follow.
> As I believe it is controlled by a packet received from the network, the
> only safe thing to do is to pre-initialize ip_proto.
> ---
>  net/core/flow_dissector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 476e5dda59e19822..2a834c6179b9973e 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -129,7 +129,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
>         struct flow_dissector_key_ports *key_ports;
>         struct flow_dissector_key_tags *key_tags;
>         struct flow_dissector_key_keyid *key_keyid;
> -       u8 ip_proto;
> +       u8 ip_proto = 0;
>
>         if (!data) {
>                 data = skb->data;
> --
> 1.9.1
>

Acked-by: Tom Herbert <tom@...bertland.com>
--
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