Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3858131imu; Mon, 7 Jan 2019 10:45:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XAcoqRBu/vTUUKR39Y+RZvdR9oBWvpTAYK5ds8fnjYqQL6N+A8nFtEWOqetmyn5YdjEi3 X-Received: by 2002:a63:d818:: with SMTP id b24mr30283685pgh.174.1546886701863; Mon, 07 Jan 2019 10:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546886701; cv=none; d=google.com; s=arc-20160816; b=HoFwyhzIg1pzN6k58hDqmyqVL9OGzVJECP/jJGoE825a4O6h0AxrEE2V5nkL6K1tzH uCMEdFc+eH1HfnjWwOHYvN9yPraEILf54qaweoa2m6bQf06+3SAYgbs9p7H8xI/+ex8N XU52Avw5x7C1u1TFNlFPt8DLDjWRAeEVJo/cTaDAxpgf6EMdJHcGsVMt3q7vAiQ5j7t9 eXWSMQY/MHjtKTO2Mr1A9gaUQftZNmLAjeNdyWWl09ifkRyKuqMeuivQCqp65JtAxIHL ojCy9VGphD11IbrY0qVaLVXmL48FMgod3XBeu97mtR4fEkcqJQP2gytWM0XsqaEn5yz5 Gy4g== 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=sBxbpTHYJ4ugDbtkG3cfj+JfL7x+KwnwPWLkLNsr7LM=; b=ufE010y4eVFrjfJ8/CmXLgv6iYztTZzrXob6ct3a8nTaBf0hF/ib1w10Y6ko6NB7AF 9V9P3Q4lr4taIkINTfb8IpqhQbcePreGm/BcKKoNI9nlQV5OS1brAmKR8zU6aZiIJvsu J25cwJfXFL9c6Jb/4hS/kD0YYTF7n/qdgRyp4iB2d1dmpC94wDrvH/nyTggBh+XPn3LQ SIiRMwk0ydTdmLn7IhK3SyhTAELxAellFolvLrl4ecIIfJTReq6UYpq4ChXNEuvuiVqa 3X3ruHafDxgxq5khlpXYceh6HMeL9lhGne4jt0Huln0x1zfWzJ5kF3lKBBt8bQErReAT sqzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zw0jUCBF; 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 q5si6114715pgb.245.2019.01.07.10.44.46; Mon, 07 Jan 2019 10:45:01 -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=zw0jUCBF; 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 S1730636AbfAGNBf (ORCPT + 99 others); Mon, 7 Jan 2019 08:01:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:49024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729822AbfAGNBd (ORCPT ); Mon, 7 Jan 2019 08:01:33 -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 807F6206BB; Mon, 7 Jan 2019 13:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866093; bh=xDZR8CG5f1PaLhP5YYaK1DxJCIdZ//x9DQ0r3nmZOmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zw0jUCBFwsiODvwXaxT10fWQxHlSE4s+1nxie9DlJySav0JvCWYEpGkf2K/kPgw/J 3l42Rua6BKBrNz9cI1latZepIUeg47ls11iTvS1GQeAaR4+G4hT366FpMq9JsTQvAk iX3rs479xrk47Rax2enx8f7Ch9PPz1kRh9fOPQrA= 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.14 008/101] ieee802154: lowpan_header_create check must check daddr Date: Mon, 7 Jan 2019 13:31:56 +0100 Message-Id: <20190107105330.930065820@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@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.14-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 @@ -48,6 +48,9 @@ int lowpan_header_create(struct sk_buff 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? */