Gentoo Logo

GNU ed: User-assisted execution of arbitrary code


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200809-15 / ed
Release Date September 23, 2008
Latest Revision September 23, 2008: 01
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
sys-apps/ed < 1.0 >= 1.0 All supported architectures

Related bugreports: #236521


A buffer overflow vulnerability in ed may allow for the remote execution of arbitrary code.

2.  Impact Information


GNU ed is a basic line editor. red is a restricted version of ed that does not allow shell command execution.


Alfredo Ortega from Core Security Technologies reported a heap-based buffer overflow in the strip_escapes() function when processing overly long filenames.


A remote attacker could entice a user to process specially crafted commands with ed or red, possibly resulting in the execution of arbitrary code with the privileges of the user running the application.

3.  Resolution Information


There is no known workaround at this time.


All GNU ed users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=sys-apps/ed-1.0"

4.  References


Page updated September 23, 2008

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.