Talk:Stack buffer overflow

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Unnamed section[edit]

The following phrase from the article is IMO suboptimal:

"This works because the execution never actually vectors to the stack itself.".

Even if "vectors" would be a verb that could be used that way (is it?), it feels very awkward to me. A more direct explanation without resorting to symbolisms would be better. Unfortunately I wasn't able to rephrase it in a more succint way :-/ —Preceding unsigned comment added by 193.247.120.15 (talk) 22:22, 11 September 2007 (UTC)[reply]

Still if used in conjunction with techniques like ASLR a nonexecutable stack can be somewhat resistant to return to libc attacks and thus can greatly improve the security of an application.

Given that ASLR protection has been shown to be effectively rendered useless in a few minutes (http://www.cse.ucsd.edu/~hovav/papers/sppgmb04.html), the above statement seems to be misleading -- Prashmohan 10:35, 31 October 2007 (UTC)[reply]

The example code actually uses the second command line argument to the program since arrays in C are zero based and the index 1 is used. —Preceding unsigned comment added by Gthubron (talkcontribs) 19:39, 8 April 2008 (UTC)[reply]

WARNING: In the images describing stack, in my opinion char *bar should be below return address (feel free to update images). bar* is pushed before call, so RET adress is "above". —Preceding unsigned comment added by 91.135.176.215 (talk) 13:49, 5 January 2009 (UTC) I agree, bar* is definitely pushed by the caller, so it is for sure before the RET address. The images are not correct. — Preceding unsigned comment added by 87.0.76.132 (talk) 08:18, 26 November 2011 (UTC)[reply]

Hackers vs. Black Hat Hackers[edit]

At time of writing, line 19 reads:

 This is one of the oldest and more reliable methods for [[Hacker (computer security)|hackers]] to gain unauthorized access to a computer.

This, I believe, misconstrues hackers as unethical black hat hackers. It mars the name of hacker. I am changing it for the time being to black hat hacker. Added by Jon Weldon II: (talk) 04:47, 11 April 2012 (UTC)[reply]

White hat hackers also expose vulnerabilities in software by finding stack buffer overflows. I have changed it to the less culturally subjective term "attacker". Oktal (talk) 13:42, 13 July 2013 (UTC)[reply]

Picture titled " The program stack in foo() with various inputs"[edit]

Shouldn't the return address be above (in the picture) the parameter char *bar? — Preceding unsigned comment added by 192.118.35.248 (talk) 13:35, 24 October 2013 (UTC)[reply]

External links modified[edit]

Hello fellow Wikipedians,

I have just modified one external link on Stack buffer overflow. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

checkY An editor has reviewed this edit and fixed any errors that were found.

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—cyberbot IITalk to my owner:Online 03:43, 3 April 2016 (UTC)[reply]

 Done, the archived link above is fine. — Dsimic (talk | contribs) 01:12, 30 April 2016 (UTC)[reply]

Possibly the most ignorant inquiry in the world...[edit]

OK, I'll admit maybe I just don't see the problem we are trying to solve. Sure stack-smashing will have awful results if the buffer is crafted just so. But the example offered here might not be the best sort of example. A simple substitution of strncpy() (or analogous) for the given strcpy() would obviate the whole stack smashing problem -- at least in this case. If it is simply a matter of preventing a "runaway" buffer copy, then this would seem to be a problem related more to the coder rather than the library/call the coder is using. Even variable input lengths can be managed, and is a very typical task most programmers have to tackle.

Could you maybe provide a more typical scenario to educate "people like me" why stack smashing handling mechanisms is necessary? In particular, please do not provide another example that could be easily corrected to avoid the chances of such an overflow. I would really like to learn how this particular issue arises in the real world (I mean, aside from poor or lazy development processes). Thank you.73.90.84.55 (talk) 06:24, 7 June 2017 (UTC)[reply]