Bug 1626184 (CVE-2018-13259) - CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
Summary: CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-13259
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1626185 1626186 1628990
Blocks: 1626188
TreeView+ depends on / blocked
 
Reported: 2018-09-06 17:23 UTC by Pedro Sampaio
Modified: 2019-09-29 14:58 UTC (History)
5 users (show)

Fixed In Version: zsh 5.6
Doc Type: If docs needed, set a value
Doc Text:
It was discovered that zsh does not properly validate the shebang of input files and it truncates it to the first 64 bytes. A local attacker may use this flaw to make zsh execute a different binary than what is expected, named with a substring of the shebang one.
Clone Of:
Environment:
Last Closed: 2019-08-06 19:19:43 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2017 None None None 2019-08-06 12:02:06 UTC

Description Pedro Sampaio 2018-09-06 17:23:22 UTC
An issue was discovered in zsh before 5.6. Shebang lines exceeding 64 characters were truncated, potentially leading to an execve call to a program name that is a substring of the intended one.

Upstream patch:

https://sourceforge.net/p/zsh/code/ci/1c4c7b6a4d17294df028322b70c53803a402233d

References:

https://www.zsh.org/mla/zsh-announce/136

Comment 1 Pedro Sampaio 2018-09-06 17:24:57 UTC
Created zsh tracking bugs for this issue:

Affects: fedora-all [bug 1626185]

Comment 3 Riccardo Schirone 2018-09-14 09:00:57 UTC
External References:

http://www.zsh.org/mla/zsh-announce/136

Comment 7 Riccardo Schirone 2018-09-14 15:18:38 UTC
Statement:

This issue did not affect the versions of zsh as shipped with Red Hat Enterprise Linux 5 as scripts were directly handled by the kernel and not special-handled by zsh itself.

Comment 8 errata-xmlrpc 2019-08-06 12:02:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2017 https://access.redhat.com/errata/RHSA-2019:2017

Comment 9 Product Security DevOps Team 2019-08-06 19:19:43 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2018-13259


Note You need to log in before you can comment on or make changes to this bug.