Commit 29c657a
authored
[3.14] pythongh-119452: Fix a potential virtual memory allocation denial of service in http.server (pythonGH-119455)
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,
so that the memory consumption is proportional to the amount of sent
data.1 parent c4054f7 commit 29c657a
File tree
3 files changed
+57
-1
lines changed- Lib
- http
- test
- Misc/NEWS.d/next/Security
3 files changed
+57
-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 | + | |
1103 | 1141 | | |
1104 | 1142 | | |
1105 | 1143 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments