projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fb5dfe
)
wifi: nl80211: don't free NULL coalescing rule
author
Johannes Berg
<johannes.berg@intel.com>
Thu, 18 Apr 2024 08:52:23 +0000
(10:52 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 19 Apr 2024 08:02:17 +0000
(10:02 +0200)
If the parsing fails, we can dereference a NULL pointer here.
Cc: stable@vger.kernel.org
Fixes:
be29b99a9b51
("cfg80211/nl80211: Add packet coalesce support")
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link:
https://msgid.link/20240418105220.b328f80406e7.Id75d961050deb05b3e4e354e024866f350c68103@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
patch
|
blob
|
blame
|
history
diff --git
a/net/wireless/nl80211.c
b/net/wireless/nl80211.c
index b4edba6b0b7ba0bf3200c7ce966a3e286a6fdf24..30ff9a47081348d1b14d1db520aeedf9c9ffdd09 100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-14030,6
+14030,8
@@
static int nl80211_set_coalesce(struct sk_buff *skb, struct genl_info *info)
error:
for (i = 0; i < new_coalesce.n_rules; i++) {
tmp_rule = &new_coalesce.rules[i];
+ if (!tmp_rule)
+ continue;
for (j = 0; j < tmp_rule->n_patterns; j++)
kfree(tmp_rule->patterns[j].mask);
kfree(tmp_rule->patterns);