Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3926517imm; Mon, 8 Oct 2018 11:48:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV617J6PNd4DM6xMd662Td3p7n2hS5mQrjmiLh4tpyksi4msjbuO0aCfOJFnQYWG1pON2QkbK X-Received: by 2002:a17:902:9893:: with SMTP id s19-v6mr25117294plp.130.1539024521447; Mon, 08 Oct 2018 11:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024521; cv=none; d=google.com; s=arc-20160816; b=lvOFk1b9/2GGljOc4C5bhWB2mMfPgA+sKB1bXIbEOfRV/9msFsS165mZ8avccYhq4Y Pr4YuUGXXpQM1JFxYuooqDS0+SETGrc1MhgT/dIv+U1fuh3UWYnuQVbHq3uHjnRa39Zj +spoh9GBf6e4rdcgj9RwHFqnLnISUq+nWSZhkQ9c12K3o5+EB5mFzB50wTiKeTUBDH3x NC+ZVUoPK0F346jo5N+aKz1L5GoYnh3F54FM8nPJ5EGp8agh++5ZS6a7D2yh7b/LsEVf S2b7AhRaTTdjpQDf3RXVzf6HmoJWGOjFIJ6SvDQ5tDYkTzwJ1/l1mL54HGgJ2X3sCSXW DFLA== 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=S4jachahUOzuFvxkQA0mvg6Ipve57QIIDKDXLf09RPY=; b=Y996Z+lM3MvIvHr62mSnZVlBQgJsF3r7hVuWIHSXbwmfOeiERfnoz5KZ6fkmhr8ZwE Cf0d0bgAg3v4dhoRMPY9axGt/h6+l0fDS5ACG/+07tPLJPkV1raxE5oAcAn84haPJd/D cDzmWosRfeEdCaCk6pLmnijli6Abz83L7RRyf4hyde/DHLU3ov7fKNYOZOueELXDoeOW 73d3O3q7x3FNEIaN836nEdzE2wLpuw8XMsCJd8GJof8XArDPmRF/aYhfEk86vx6o83Ho ugKkA820OAtzVdNgzpny4LmZX8SyhJpsm228lw4cOygwSolLMX5E/npzcVKhwUe185cw DB9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q06ijYGo; 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 h131-v6si15816166pgc.122.2018.10.08.11.48.26; Mon, 08 Oct 2018 11:48:41 -0700 (PDT) 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=q06ijYGo; 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 S1731642AbeJICBZ (ORCPT + 99 others); Mon, 8 Oct 2018 22:01:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:50428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727452AbeJICBY (ORCPT ); Mon, 8 Oct 2018 22:01:24 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 BD0422087D; Mon, 8 Oct 2018 18:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024498; bh=uIDavJ/YnjZWxxgUNJvi470ez5NkSV4NNc7+THh+Yyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q06ijYGoB4reNYxiIJ+gR1P2OY7GEfcbNx1MR58jlKesbplUCKPwZ4YmyrVpvHJY1 +F5urJsWRuxadYzN0VpUjaqHq0bGDOaBoGARys9n4Aew4ZgYEQLMhn3WXjO+E8gXGa CtkxDEuaniu/VTWPXrJ8FYwja9lrK18KUs4FFyuM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arunk Khandavalli , Jouni Malinen , Johannes Berg , Sasha Levin Subject: [PATCH 4.18 037/168] cfg80211: nl80211_update_ft_ies() to validate NL80211_ATTR_IE Date: Mon, 8 Oct 2018 20:30:17 +0200 Message-Id: <20181008175621.456005756@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arunk Khandavalli [ Upstream commit 4f0223bfe9c3e62d8f45a85f1ef1b18a8a263ef9 ] nl80211_update_ft_ies() tried to validate NL80211_ATTR_IE with is_valid_ie_attr() before dereferencing it, but that helper function returns true in case of NULL pointer (i.e., attribute not included). This can result to dereferencing a NULL pointer. Fix that by explicitly checking that NL80211_ATTR_IE is included. Fixes: 355199e02b83 ("cfg80211: Extend support for IEEE 802.11r Fast BSS Transition") Signed-off-by: Arunk Khandavalli Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -12099,6 +12099,7 @@ static int nl80211_update_ft_ies(struct return -EOPNOTSUPP; if (!info->attrs[NL80211_ATTR_MDID] || + !info->attrs[NL80211_ATTR_IE] || !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) return -EINVAL;