Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 341
Pradeep Kumar Mishra Avatar asked Oct 01 '08 06:10

Pradeep Kumar Mishra


2 Answers

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.

like image 130
Mark Bessey Avatar answered Oct 01 '22 04:10

Mark Bessey


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

like image 27
Serafina Brocious Avatar answered Oct 01 '22 03:10

Serafina Brocious