Bug 1626184 (CVE-2018-13259)

Summary: CVE-2018-13259 zsh: Improper handling of shebang line longer than 64
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dmaphy, james.antill, j, kdudka, svashisht
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 19:19:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1626185, 1626186, 1628990    
Bug Blocks: 1626188    

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:




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:


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

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):