Patch "nl80211: Fix potential memory leak from parse_acl_data" has been added to the 4.2-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
nl80211: Fix potential memory leak from parse_acl_data
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nl80211-fix-potential-memory-leak-from-parse_acl_data.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4baf6bea37247e59f1971e8009d13aeda95edba2Mon Sep 17 00:00:00 2001
From: Ola Olsson <[email protected]>
Date: Thu, 29 Oct 2015 07:04:58 +0100
Subject: nl80211: Fix potential memory leak from parse_acl_data
From: Ola Olsson <[email protected]>
commit 4baf6bea37247e59f1971e8009d13aeda95edba2 upstream.
If parse_acl_data succeeds but the subsequent parsing of smps attributes fails, there will be a memory leak due to early returns. Fix that by moving the ACL parsing later.
--- net/wireless/nl80211.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
net/wireless/nl80211.c +6 -6
@@ -3408,12 +3408,6 @@ static int nl80211_start_ap(struct sk_bu wdev->iftype))return -EINVAL ; -if (info->attrs[NL80211_ATTR_ACL_POLICY ]) { - params.acl =parse_acl_data (&rdev->wiphy, info); -if (IS_ERR (params.acl)) -return PTR_ERR (params.acl); - } -if (info->attrs[NL80211_ATTR_SMPS_MODE ]) { params.smps_mode =nla_get_u8 (info->attrs[NL80211_ATTR_SMPS_MODE ]);
@@ -3437,6 +3431,12 @@ static int nl80211_start_ap(struct sk_bu params.smps_mode =NL80211_SMPS_OFF ; } +if (info->attrs[NL80211_ATTR_ACL_POLICY ]) { + params.acl =parse_acl_data (&rdev->wiphy, info); +if (IS_ERR (params.acl)) +return PTR_ERR (params.acl); + } +wdev_lock (wdev); err =rdev_start_ap (rdev, dev, ¶ms);if (!err) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/nl80211-fix-potential-memory-leak-from-parse_acl_data.patch