linux/net/ieee802154
Daniel Borkmann 965801e1eb 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: 44331fe2aa ("IEEE802.15.4: 6LoWPAN basic support")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05 20:25:24 -05:00
..
6lowpan.c net: 6lowpan: fix lowpan_header_create non-compression memcpy call 2014-01-05 20:25:24 -05:00
6lowpan.h 6lowpan: lowpan_uncompress_addr with address_mode 2013-08-20 13:23:12 -07:00
af802154.h
af_ieee802154.c ieee802154: free skb buffer if dev isn't running 2011-06-30 16:18:09 +04:00
dgram.c inet: prevent leakage of uninitialized memory to user in recv syscalls 2013-11-18 15:12:03 -05:00
ieee802154.h genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
Kconfig net/ieee802154: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:00 -08:00
Makefile IEEE802.15.4: 6LoWPAN basic support 2011-08-24 19:36:06 -07:00
netlink.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
nl_policy.c ieee802154: add LIST_PHY command support 2009-11-06 14:31:22 +03:00
nl-mac.c genetlink: make multicast groups const, prevent abuse 2013-11-19 16:39:06 -05:00
nl-phy.c ieee802154: use genl_register_family_with_ops() 2013-11-14 17:10:40 -05:00
raw.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
wpan-class.c net: ieee802154: convert class code to use dev_groups 2013-07-26 18:05:18 -07:00