zsh-workers
 help / color / mirror / code / Atom feed
* Buffer overflow in "!" handling?
@ 2009-02-25  9:42 DragonK
  2009-02-25 10:26 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: DragonK @ 2009-02-25  9:42 UTC (permalink / raw)
  To: zsh-workers

Hello,

I've stumbled upon a buffer overflow in zsh 4.3.9 (and 4.3.6) related
to the handling of the "!" character in the command line (Linux).

It's triggerable by typing "!AAAAAAAAA...A" (lots of A's) at the zsh
prompt (works better if zsh is compiled with stack protection,
otherwise a lot of A's are needed :) ).

A quick look at the code indicates the problem to be in hist.c,
function histsubchar(), where buf[256] is getting overflowed (*ptr is
used to write to the buffer, but no check is made to see if ptr passed
the end of buf).  I might be wrong though, I only took a couple of
minutes to look at the code.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-25 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-25  9:42 Buffer overflow in "!" handling? DragonK
2009-02-25 10:26 ` Peter Stephenson
2009-02-25 11:39   ` DragonK
2009-02-25 11:42     ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).