Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Commitf116a9c
The IMAP4 client could consume an arbitrary amount of memory when tryingto connect to a malicious server, because it read a "literal" data with asingle read(size) call, and BufferedReader.read() allocates the bytesobject of the specified size before reading. Now the IMAP4 client reads databy chunks, therefore the amount of used memory is limited by theamount of the data actually been sent by the server.(cherry picked from commit735f25c)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parentd80cbdd commitf116a9c
File tree
3 files changed
+32
-1
lines changed- Lib
- test
- Misc/NEWS.d/next/Security
3 files changed
+32
-1
lines changedLines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 |
| |
56 | 59 |
| |
57 | 60 |
| |
| |||
315 | 318 |
| |
316 | 319 |
| |
317 | 320 |
| |
318 |
| - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
319 | 328 |
| |
320 | 329 |
| |
321 | 330 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
906 | 906 |
| |
907 | 907 |
| |
908 | 908 |
| |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
909 | 924 |
| |
910 | 925 |
| |
911 | 926 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + |
0 commit comments
Comments
(0)