Gentoo Logo

libtar: Arbitraty code execution


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 201402-19 / libtar
Release Date February 21, 2014
Latest Revision February 21, 2014: 1
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
dev-libs/libtar < 1.2.20-r2 >= 1.2.20-r2 All supported architectures

Related bugreports: #487420


A buffer overflow in libtar might allow remote attackers to execute arbitrary code or cause a Denial of Service condition.

2.  Impact Information


libtar is a C library for manipulating POSIX tar files.


An integer overflow error within the “th_read()” function when processing long names or link extensions can be exploited to cause a heap-based buffer overflow via a specially crafted archive.


A remote attacker could entice a user to open a specially crafted file using a program linked against libtar, possibly resulting in execution of arbitrary code with the privileges of the process or a Denial of Service condition.

3.  Resolution Information


There is no known workaround at this time.


All libtar users should upgrade to the latest version:

Code Listing 3.1: Resolution

  # emerge --sync
  # emerge --ask --oneshot --verbose ">=dev-libs/libtar-1.2.20-r2"

4.  References


Page updated February 21, 2014

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

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