Commit e8c09c4
committed
wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()
jira VULN-156052
cve CVE-2025-39849
commit-author Dan Carpenter <dan.carpenter@linaro.org>
commit 62b635d
upstream-diff |
Had to change the call from min to min_t due to type checking failure.
This kernel is missing multiple improvements done in min, including
the removal of type checking done in commit
dc1c803("minmax: simplify min()/max()/clamp() implementation").
This was not backported because it required other changes as well,
including making sure that all C constant expression context that use
min() or max() had to be converted.
If the ssid->datalen is more than IEEE80211_MAX_SSID_LEN (32) it would
lead to memory corruption so add some bounds checking.
Fixes: c38c701 ("wifi: cfg80211: Set SSID if it is not already set")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/0aaaae4a3ed37c6252363c34ae4904b1604e8e32.1756456951.git.dan.carpenter@linaro.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 62b635d)
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>1 parent e5ee274 commit e8c09c4
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
| 904 | + | |
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
906 | 908 | | |
907 | 909 | | |
908 | 910 | | |
909 | | - | |
| 911 | + | |
| 912 | + | |
910 | 913 | | |
911 | 914 | | |
912 | 915 | | |
| |||
0 commit comments