Commit c8b5b7c
ksmbd: fix null pointer dereference in alloc_preauth_hash()
The Client send malformed smb2 negotiate request. ksmbd return error
response. Subsequently, the client can send smb2 session setup even
thought conn->preauth_info is not allocated.
This patch add KSMBD_SESS_NEED_SETUP status of connection to ignore
session setup request if smb2 negotiate phase is not complete.
Cc: [email protected]
Tested-by: Steve French <[email protected]>
Reported-by: [email protected] # ZDI-CAN-26505
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent bf21e29 commit c8b5b7c
3 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
220 | 231 | | |
221 | 232 | | |
222 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
| 1252 | + | |
1253 | 1253 | | |
1254 | 1254 | | |
1255 | 1255 | | |
| |||
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1274 | 1277 | | |
1275 | 1278 | | |
1276 | 1279 | | |
| |||
1674 | 1677 | | |
1675 | 1678 | | |
1676 | 1679 | | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1677 | 1685 | | |
1678 | 1686 | | |
1679 | 1687 | | |
| |||
1909 | 1917 | | |
1910 | 1918 | | |
1911 | 1919 | | |
1912 | | - | |
| 1920 | + | |
1913 | 1921 | | |
1914 | 1922 | | |
1915 | 1923 | | |
| |||
2243 | 2251 | | |
2244 | 2252 | | |
2245 | 2253 | | |
2246 | | - | |
| 2254 | + | |
2247 | 2255 | | |
2248 | 2256 | | |
2249 | 2257 | | |
| |||
0 commit comments