[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140105.202557.550937656683679021.davem@davemloft.net>
Date: Sun, 05 Jan 2014 20:25:57 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: netdev@...r.kernel.org, alex.bluesman.smirnov@...il.com,
dbaryshkov@...il.com, werner@...esberger.net
Subject: Re: [PATCH net] net: 6lowpan: fix lowpan_header_create
non-compression memcpy call
From: Daniel Borkmann <dborkman@...hat.com>
Date: Mon, 6 Jan 2014 01:45:50 +0100
> In function lowpan_header_create(), we invoke the following code
> construct:
>
> struct ipv6hdr *hdr;
> ...
> hdr = ipv6_hdr(skb);
> ...
> if (...)
> memcpy(hc06_ptr + 1, &hdr->flow_lbl[1], 2);
> else
> memcpy(hc06_ptr, &hdr, 4);
>
> Where the else path of the condition, that is, non-compression
> path, calls memcpy() with a pointer to struct ipv6hdr *hdr as
> source, thus two levels of indirection. This cannot be correct,
> and likely only one level of pointer was intended as source
> buffer for memcpy() here.
>
> Fixes: 44331fe2aa0d ("IEEE802.15.4: 6LoWPAN basic support")
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
Looks good, applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists