From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Buffer overflow with long fd numbers in redirects
Date: Mon, 06 Oct 2014 08:07:09 -0700 [thread overview]
Message-ID: <141006080709.ZM11332@torch.brasslantern.com> (raw)
In-Reply-To: <20141006142434.GC5405@sym.noone.org>
On Oct 6, 4:24pm, Axel Beckert wrote:
}
} On Mon, Oct 06, 2014 at 04:00:44PM +0200, Mikael Magnusson wrote:
} > Someone reported this on IRC the other day,
} > % >&333333333333333333333
} > zsh: number truncated after 20 digits: 333333333333333333333
} > *** buffer overflow detected ***: zsh terminated
} >
} > At least one place where this is mishandled is in exec.c around line 3215,
}
} I can reproduce this in 5.0.6.
}
} But I can't reproduce this in 4.3.17 as in Debian Wheezy.
I think that may be a difference in compilation rather than in code, i.e.
whether the binary was compiled with FORTIFY_SOURCE defined.
The char fdstr[4] has been there since before 1999.
DIGBUFSIZ should be used there, as PWS suggested.
prev parent reply other threads:[~2014-10-06 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 14:00 Mikael Magnusson
2014-10-06 14:09 ` Peter Stephenson
2014-10-06 14:58 ` Mikael Magnusson
2014-10-06 16:18 ` Peter Stephenson
2014-10-06 14:24 ` Axel Beckert
2014-10-06 14:55 ` Mikael Magnusson
2014-10-06 15:07 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=141006080709.ZM11332@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).