From patchwork Fri Apr 20 06:11:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Dasari X-Patchwork-Id: 10351835 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 76B18602B7 for ; Fri, 20 Apr 2018 06:12:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66C002860B for ; Fri, 20 Apr 2018 06:12:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AF4228615; Fri, 20 Apr 2018 06:12:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D93E02860B for ; Fri, 20 Apr 2018 06:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753449AbeDTGL6 (ORCPT ); Fri, 20 Apr 2018 02:11:58 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46874 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbeDTGL5 (ORCPT ); Fri, 20 Apr 2018 02:11:57 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F316660C64; Fri, 20 Apr 2018 06:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524204717; bh=TDAubE/NE2KAuQ34SBxZf1WXu4phiW2JIkI/4MSkm/k=; h=From:To:Cc:Subject:Date:From; b=B7YDw9XsaZr9sxdS+ObwXrmk93jsXJir8Vtlj36JAWKtiR/sIJMynS1gLKG0b4o8E q9m9RH9Woziq/fJ8XrEoET/JCdBDoTnGsNYHQ/wTjj/1ttnd/zEQj7ZeCuU7K5XRoC ja/f1fYYEJSDsLCEcdoI25kZdWxtLqjbyA7TWg2k= Received: from dasaris-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dasaris@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1A4B26081C; Fri, 20 Apr 2018 06:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524204716; bh=TDAubE/NE2KAuQ34SBxZf1WXu4phiW2JIkI/4MSkm/k=; h=From:To:Cc:Subject:Date:From; b=FEKce+Tux1zU7Z4sLrEPm/Dsa58LX+Yp4Hp84cAKG0aTWbw+qIcK20b6mUIBcyPdx MQDVH+dQRYvqvamn0PDNRr7XugbT4OCG4ty2pmC7X86ey0bMsrgS2Z1zcJcbIIl98j BK1hv81m0grYgdaUOYW4kx/hqyGtn312q7WfdqA0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1A4B26081C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=dasaris@codeaurora.org From: Srinivas Dasari To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Srinivas Dasari Subject: [PATCH] nl80211: Free connkeys on external authentication failure Date: Fri, 20 Apr 2018 11:41:14 +0530 Message-Id: <1524204674-13997-1-git-send-email-dasaris@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The failure scenario while processing NL80211_ATTR_EXTERNAL_AUTH_SUPPORT does not free the connkeys. This commit addresses the same. Signed-off-by: Srinivas Dasari --- net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ff28f8f..a052693 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -9214,6 +9214,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) if (nla_get_flag(info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])) { if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) { + kzfree(connkeys); GENL_SET_ERR_MSG(info, "external auth requires connection ownership"); return -EINVAL;