summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWillem de Bruijn2018-12-23 18:52:18 +0100
committerGreg Kroah-Hartman2019-01-09 17:38:31 +0100
commit110c877da975bc133e23bc104526790bea4ced58 (patch)
tree029de7e2f3e4358fdc889fdd5ea59fd75ea02723 /net
parentibmveth: fix DMA unmap error in ibmveth_xmit_start error path (diff)
downloadkernel-qcow2-linux-110c877da975bc133e23bc104526790bea4ced58.tar.gz
kernel-qcow2-linux-110c877da975bc133e23bc104526790bea4ced58.tar.xz
kernel-qcow2-linux-110c877da975bc133e23bc104526790bea4ced58.zip
ieee802154: lowpan_header_create check must check daddr
[ Upstream commit 40c3ff6d5e0809505a067dd423c110c5658c478c ] Packet sockets may call dev_header_parse with NULL daddr. Make lowpan_header_ops.create fail. Fixes: 87a93e4eceb4 ("ieee802154: change needed headroom/tailroom") Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Alexander Aring <aring@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/6lowpan/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c
index ca53efa17be1..8bec827081cd 100644
--- a/net/ieee802154/6lowpan/tx.c
+++ b/net/ieee802154/6lowpan/tx.c
@@ -48,6 +48,9 @@ int lowpan_header_create(struct sk_buff *skb, struct net_device *ldev,
const struct ipv6hdr *hdr = ipv6_hdr(skb);
struct neighbour *n;
+ if (!daddr)
+ return -EINVAL;
+
/* TODO:
* if this package isn't ipv6 one, where should it be routed?
*/