diff options
| author | Daniel Borkmann <[email protected]> | 2014-01-06 00:45:50 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-01-06 01:25:24 +0000 |
| commit | 965801e1eb624154fe5e9dc5d2ff0b7f1951a11c (patch) | |
| tree | ba08d2d9cde29f57f77b466fee04fdf1f071d2e8 /drivers/net/xen-netback/interface.c | |
| parent | fec: Revert "fec: Do not assume that PHY reset is active low" (diff) | |
| download | kernel-965801e1eb624154fe5e9dc5d2ff0b7f1951a11c.tar.gz kernel-965801e1eb624154fe5e9dc5d2ff0b7f1951a11c.zip | |
net: 6lowpan: fix lowpan_header_create non-compression memcpy call
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 <[email protected]>
Cc: Alexander Smirnov <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: Werner Almesberger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
