diff options
author | Jeremy Cline <jcline@redhat.com> | 2019-12-04 13:38:43 -0500 |
---|---|---|
committer | Jeremy Cline <jcline@redhat.com> | 2019-12-04 13:38:43 -0500 |
commit | 079e0f545a491903a6acb0dc783d162ae84a2e6c (patch) | |
tree | 7a030bec812ab5e3e50079ebf0015ce8504a5b3e /0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch | |
parent | c1e2dca7bf02f21854445669ab48f82dead65dfc (diff) | |
download | kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.tar.gz kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.tar.xz kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.zip |
Sync up stabilization with f31
Diffstat (limited to '0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch')
-rw-r--r-- | 0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch b/0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch new file mode 100644 index 000000000..e72e53ebd --- /dev/null +++ b/0001-nl80211-fix-memory-leak-in-nl80211_get_ftm_responder.patch @@ -0,0 +1,33 @@ +From 1399c59fa92984836db90538cf92397fe7caaa57 Mon Sep 17 00:00:00 2001 +From: Navid Emamdoost <navid.emamdoost@gmail.com> +Date: Fri, 4 Oct 2019 14:42:19 -0500 +Subject: [PATCH] nl80211: fix memory leak in nl80211_get_ftm_responder_stats + +In nl80211_get_ftm_responder_stats, a new skb is created via nlmsg_new +named msg. If nl80211hdr_put() fails, then msg should be released. The +return statement should be replace by goto to error handling code. + +Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics") +Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> +Link: https://lore.kernel.org/r/20191004194220.19412-1-navid.emamdoost@gmail.com +Signed-off-by: Johannes Berg <johannes.berg@intel.com> +--- + net/wireless/nl80211.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index 141cdb171665..4453dd375de9 100644 +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -13682,7 +13682,7 @@ static int nl80211_get_ftm_responder_stats(struct sk_buff *skb, + hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, + NL80211_CMD_GET_FTM_RESPONDER_STATS); + if (!hdr) +- return -ENOBUFS; ++ goto nla_put_failure; + + if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex)) + goto nla_put_failure; +-- +2.23.0 + |