Commit 8d16f15
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 858b9e8 commit 8d16f15
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 | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
1224 | 1228 | | |
1225 | 1229 | | |
1226 | 1230 | | |
1227 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1228 | 1238 | | |
1229 | 1239 | | |
1230 | 1240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
698 | 712 | | |
699 | 713 | | |
700 | 714 | | |
| |||
734 | 748 | | |
735 | 749 | | |
736 | 750 | | |
| 751 | + | |
| 752 | + | |
737 | 753 | | |
738 | 754 | | |
739 | 755 | | |
| |||
788 | 804 | | |
789 | 805 | | |
790 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
791 | 812 | | |
792 | 813 | | |
793 | 814 | | |
| |||
810 | 831 | | |
811 | 832 | | |
812 | 833 | | |
| 834 | + | |
| 835 | + | |
813 | 836 | | |
814 | 837 | | |
815 | 838 | | |
| |||
882 | 905 | | |
883 | 906 | | |
884 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
885 | 923 | | |
886 | 924 | | |
887 | 925 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments