Commit fcd2042
mwifiex: printk() overflow with 32-byte SSIDs
SSIDs aren't guaranteed to be 0-terminated. Let's cap the max length
when we print them out.
This can be easily noticed by connecting to a network with a 32-octet
SSID:
[ 3903.502925] mwifiex_pcie 0000:01:00.0: info: trying to associate to
'0123456789abcdef0123456789abcdef <uninitialized mem>' bssid
xx:xx:xx:xx:xx:xx
Fixes: 5e6e3a9 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Cc: <stable@vger.kernel.org>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>1 parent d3532ea commit fcd2042
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2222 | 2222 | | |
2223 | 2223 | | |
2224 | 2224 | | |
2225 | | - | |
2226 | | - | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
2227 | 2228 | | |
2228 | 2229 | | |
2229 | 2230 | | |
| |||
2283 | 2284 | | |
2284 | 2285 | | |
2285 | 2286 | | |
2286 | | - | |
2287 | | - | |
| 2287 | + | |
| 2288 | + | |
2288 | 2289 | | |
2289 | 2290 | | |
2290 | 2291 | | |
| |||
2417 | 2418 | | |
2418 | 2419 | | |
2419 | 2420 | | |
2420 | | - | |
2421 | | - | |
| 2421 | + | |
| 2422 | + | |
2422 | 2423 | | |
2423 | 2424 | | |
2424 | 2425 | | |
| |||
0 commit comments