Commit 0f35918
committed
gh-119452: Fix OOM vulnerability in http.server
The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
therefore the momory consumption is proportional to the amont of sent
data.1 parent ed5c854 commit 0f35918
File tree
3 files changed
+52
-1
lines changed- Lib
- http
- test
- Misc/NEWS.d/next/Security
3 files changed
+52
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
1284 | 1288 | | |
1285 | 1289 | | |
1286 | 1290 | | |
1287 | | - | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1288 | 1298 | | |
1289 | 1299 | | |
1290 | 1300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
916 | 930 | | |
917 | 931 | | |
918 | 932 | | |
| |||
952 | 966 | | |
953 | 967 | | |
954 | 968 | | |
| 969 | + | |
| 970 | + | |
955 | 971 | | |
956 | 972 | | |
957 | 973 | | |
| |||
1006 | 1022 | | |
1007 | 1023 | | |
1008 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1009 | 1030 | | |
1010 | 1031 | | |
1011 | 1032 | | |
| |||
1028 | 1049 | | |
1029 | 1050 | | |
1030 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
1031 | 1054 | | |
1032 | 1055 | | |
1033 | 1056 | | |
| |||
1100 | 1123 | | |
1101 | 1124 | | |
1102 | 1125 | | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1103 | 1141 | | |
1104 | 1142 | | |
1105 | 1143 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments