Commit 4bfd8b4
committed
[3.14] gh-119452: Fix a potential virtual memory allocation denial of service 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 memory consumption is proportional to the amount of sent
data.1 parent 206f196 commit 4bfd8b4
File tree
3 files changed
+58
-1
lines changed- Lib
- http
- test
- Misc/NEWS.d/next/Security
3 files changed
+58
-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 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1288 | 1301 | | |
1289 | 1302 | | |
1290 | 1303 | | |
| |||
| 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 | + | |
| 1141 | + | |
1103 | 1142 | | |
1104 | 1143 | | |
1105 | 1144 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments