Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp851147imu; Fri, 11 Jan 2019 10:07:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN5H6JYKWDUQN7j1bZ6HLvMu0tn5h2XJfI8NIG/TujF3Odqn/zehpFlq8oYuHwaIn+ZvSNVD X-Received: by 2002:a63:e40c:: with SMTP id a12mr14386419pgi.28.1547230065953; Fri, 11 Jan 2019 10:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547230065; cv=none; d=google.com; s=arc-20160816; b=gtzNXMF3IRjctKZWISJQNnggawDTcW1uAORmWxskD0HYC91NSOL0c33Ux4O4pBKuM6 LYCIPJ0zUAtJWwIh00f7RH3oLxPZ5w79gn/JNUoSYLYQUpqxBPB7K4Rs1+GqdsKqUexb iYjw3kPNROGQXtseAIZORuQkUhHxTPxF/K+odXfbYzHlBvSrNvhmwKv8eD/AHAtbHbzt +4Xg/4yN3E+IF/3YulMPLMvF7xmIoY/zrKn0j7fftTxE4FrhJSxXUI/WdxJl+p20/OVs IM61q+oVYALd1vQnzFCquXlMcmllpatPvppwjEgZpFzGUv5+S8JYGgV7MRks+Eq37oUr NwCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CXveB5Kuf22vwTvPGnwts/Gvz39KtGpF6F87TAjNGbg=; b=wN4B8MNU6v8s+VmP0WX5gJPG5AQ3Ej1ovKxZ0dHFXy8ojDJEEkY6dbX65V3Oym0TYe Mx1i2kqKeJ3V61hInkK1g4FKVHljz3BD/KAmnX3Zkgv+ttzDe0Y3Wbd1Bu3LGbDjsPAh WmuQSnE2/wtxblbdP1VKy6GTr3u6Y+FE9XYa3MCPsZhUGfxcYUasjFy2rfJtuXFEdeaU eWc/KdN7Wb+stHEthnsAw6H045qFBDkxRfmatvCfBX67pSwfzh+5kYJMUP01R3E3ZuKK pJOo6YIhjyZWWj1p6s21XBWy5dTEmRuz3Ywdu68u73lwRmNEOotpS97sfutRZRTlcAHY Mudw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AwwH9OgB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si71245182pgk.341.2019.01.11.10.07.30; Fri, 11 Jan 2019 10:07:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AwwH9OgB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387777AbfAKOQ7 (ORCPT + 99 others); Fri, 11 Jan 2019 09:16:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:33260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387740AbfAKOQ4 (ORCPT ); Fri, 11 Jan 2019 09:16:56 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62E1721783; Fri, 11 Jan 2019 14:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216215; bh=saKEvZEKF3KL8z9IlyNDy3vdJwlv80m06CPIezkhRVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AwwH9OgBIMwEUyakMbVppLMNy025H8Dl/9bTUo9Dl5wtknyY5pJibu7AZQMyXXLfX 54QgYjlqNySuNPOcMMH0IZXTS2GjRgVBG8rkyjw4uakZjlVEhwQH+Qvxr2JYrIjH3d 54ko1jW138/sMeF7XsC4IRqYjqXQSmTVEQwtvb1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Willem de Bruijn , Alexander Aring , "David S. Miller" Subject: [PATCH 4.4 18/88] ieee802154: lowpan_header_create check must check daddr Date: Fri, 11 Jan 2019 15:07:47 +0100 Message-Id: <20190111131048.835006301@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131045.137499039@linuxfoundation.org> References: <20190111131045.137499039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Willem de Bruijn [ 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 Acked-by: Alexander Aring Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ieee802154/6lowpan/tx.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/ieee802154/6lowpan/tx.c +++ b/net/ieee802154/6lowpan/tx.c @@ -55,6 +55,9 @@ int lowpan_header_create(struct sk_buff const u8 *daddr = _daddr; struct lowpan_addr_info *info; + if (!daddr) + return -EINVAL; + /* TODO: * if this package isn't ipv6 one, where should it be routed? */