-
Notifications
You must be signed in to change notification settings - Fork 191
LOH fragmentation when user post form with section content more than 85KB #597
Comments
@yuwaMSFT Does the LOH fragmentation cause OOM or crash? |
Related: #583 |
It causes the memory to accumulate. At some point it will cause OOM (and the app would crash on exception of memory allocation or killed by OOM killer before that happens).
|
Related to #583 but different issue. This is easier to be explored as a security concern. |
Ouchie :( And I think you're right, this is certainly a potential DoS concern (as is 583) |
@blowdart need to fix this? |
Yes. If it's spiking memory so badly the app pool will recycle then it's a DoS |
@yuwaMSFT Do you know if this is still an issue? |
I checked the latest code. It seems to still have the same issue for multipart form data content. |
This issue was moved to dotnet/aspnetcore#2720 |
Uh oh!
There was an error while loading. Please reload this page.
Post a multipart form with content more than 85KB in each section would cause heavy LOH fragmentation in MVC app.
Post a multipart form with 100 sections, each containing random sized content with an average of 120KB.
After the first request:
After the 2nd request:
After the 3rd request:
So for each request we are adding the large string in LOH for each section (field) of the form. Also, look at the "Free" type. They are mostly 30 bytes in LOH accompany each large string. It may be some string interning.
For the string object, basically we are reading each section (field) into a string:
This can be easily explored to cause the server to run OOM. Security concern as well.
The text was updated successfully, but these errors were encountered: