Bug 492089

Summary: zsh: Stack-based buffer overflow due improper escaping of the '!' character
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: james.antill
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/333722
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-01 12:19:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Lieskovsky 2009-03-25 11:26:17 UTC
A stack-based buffer overflow was found in the zsh command interpreter.
An attacker could use this flaw to cause a denial of service (zsh crash),
when providing a specially-crafted string as input to the zsh shell.

References:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521108
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/333722

PoC:
Provide following string to zsh in interactive mode:

% AAAAAAAAAAAAAAAAAAAAAAAA!AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Please note the '!' character in the above string.
Also provide the above string to /bin/zsh without
newlines (they have been added only for better readability).

Comment 1 Jan Lieskovsky 2009-03-25 11:27:31 UTC
This issue affects all versions of the zsh package, as shipped
with Red Hat Enteprise Linux 2.1, 3, 4, and 5.

This issue affects all versions of the zsh package, as shipped
with Fedora releases of 9, 10, and devel.

Comment 2 Jan Lieskovsky 2009-03-25 12:35:07 UTC
The Red Hat Security Response Team has rated this issue as having
low security impact, a future update may address this flaw.
More information regarding issue severity can be found here:
http://www.redhat.com/security/updates/classification/