Bug 64869
Summary: | tar segmentation fault when the TAR_OPTIONS environment variable is set | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | F Harvell <fharvell> | ||||
Component: | tar | Assignee: | Bernhard Rosenkraenzer <bero> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ben Levenson <benl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.3 | CC: | jakub, olivier.baudron | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-03-08 14:01:12 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
F Harvell
2002-05-13 20:12:38 UTC
The problem does not seem to appear when untaring a gzipped tar file: 1. export TAR_OPTIONS="-v" 2. tar tvf /some/tar/file.tar generates "Segmentation fault". 1. export TAR_OPTIONS="-v" 2. tar tvzf /some/gzipped/tar/file.tar.gz generates tar file listing as expected. Looks like a glibc problem... #0 0x4206d6f5 in _int_malloc () from /lib/i686/libc.so.6 #1 0x4206cb25 in malloc () from /lib/i686/libc.so.6 #2 0x0804b126 in strcpy () #3 0x08050638 in strcpy () #4 0x0805da9d in strcpy () #5 0x42016714 in __libc_start_main () from /lib/i686/libc.so.6 Beg to disagree. Try: ulimit -c unlimited LD_PRELOAD=/usr/lib/libefence.so.0 TAR_OPTIONS=-v /bin/tar xvf foo.tar gdb /bin/tar core The problem is at prepargs.c:92 while ((*pp++ = *argv++)) continue; This code requires that argv[argc]==NULL. Normally this is a K&R standard, but argv has been (badly) overwritten, and does not respect this restriction at that moment. The following patch fixes the problem. Created attachment 61084 [details]
Fixes null termination of argv.
Fixed in 1.13.25-6 Fix confirmed in tar-1.13.25-12. |