Message ID | 20200810151814.637692808@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=uOiG=BU=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF751C433DF for <stable@archiver.kernel.org>; Mon, 10 Aug 2020 15:24:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AB7122CA1 for <stable@archiver.kernel.org>; Mon, 10 Aug 2020 15:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597073049; bh=0QbxLggjBKO58eoG4bJ9frg+oeij7hDqcORloJgxLIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nHjKmT4+JtTydQ++tmVytkNHoIe4qKtxv6cKdqD/BUuG+eOyE2pwobV9+DIQSaV4Z pOWSElaZcGTCzb2qHwlK+HAVtgtxBNiWYTBjDuGh5eYe/ISuvKJCUbpcIDV6EJ6YdN LgZW/RpHqvjORUtXYcsUFlcdrcT9dSFJXCxhKUJk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbgHJPYH (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 10 Aug 2020 11:24:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727877AbgHJPYG (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 10 Aug 2020 11:24:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 2276922BEA; Mon, 10 Aug 2020 15:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597073045; bh=0QbxLggjBKO58eoG4bJ9frg+oeij7hDqcORloJgxLIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y8BXiyGua1+WPPqqK7hPuwsRC79S7adDpra4YQWL0NNzzTGP05QViCWxoi9IR2hcv D71kRS2nEqu8wATcA0UjQzyuIaWYcTtBB7U4fnWSagAFVRcMPPM9+zoYYEiNFVIt1+ 01Xcsbwif7qAW42hd5PYSzi7AXtRpPDEZ0gaiais= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Julian Squires <julian@cipht.net>, Johannes Berg <johannes.berg@intel.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.7 48/79] cfg80211: check vendor command doit pointer before use Date: Mon, 10 Aug 2020 17:21:07 +0200 Message-Id: <20200810151814.637692808@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200810151812.114485777@linuxfoundation.org> References: <20200810151812.114485777@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7ae6b90e0d264..970f05c4150ea 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -13190,13 +13190,13 @@ static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info) if (!wdev_running(wdev)) return -ENETDOWN; } - - if (!vcmd->doit) - return -EOPNOTSUPP; } else { wdev = NULL; } + if (!vcmd->doit) + return -EOPNOTSUPP; + if (info->attrs[NL80211_ATTR_VENDOR_DATA]) { data = nla_data(info->attrs[NL80211_ATTR_VENDOR_DATA]); len = nla_len(info->attrs[NL80211_ATTR_VENDOR_DATA]);