Is buffer overflow/overrun possible in completely managed asp.net c# web application

北战南征 提交于 2019-12-21 07:28:44

问题


Can there be buffer overflow/overrun vulnerabilities in completely managed asp.net web portal.If yes how can this be tested.


回答1:


Not unless you exploit the webserver or .NET/ASP.NET stack itself.




回答2:


In the general case, you don't need to worry about buffer overruns. This is one of the major advantages of managed code, garbage collection being perhaps the other major advantage.

There are a few edge cases that you should be aware of - any time your managed code interacts with unmanaged code (Win32 API calls, COM interop, P/Invoke, etc) there is a potential for buffer overruns in the unmanaged code, based on parameters passed in from managed code.

Also code marked as "unsafe" can directly manipulate memory addresses in such a way as to cause buffer overflow. Most C# code is written without using the "unsafe" keyword, though.




回答3:


I had a tool (HP Dev Inspect) detect a possible "Possible Parameter Buffer Overflow" within my ASP.NET app and it was because we didn't have a MaxLength="20" in one of our TextBoxes...



来源:https://stackoverflow.com/questions/156445/is-buffer-overflow-overrun-possible-in-completely-managed-asp-net-c-sharp-web-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!