Bug 2498061 - tar: --one-top-level with absolute path fails
Summary: tar: --one-top-level with absolute path fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tar
Version: 45
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Cahyna
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-08 15:00 UTC by Pavel Cahyna
Modified: 2026-09-12 00:19 UTC (History)
5 users (show)

Fixed In Version: tar-1.35-10.fc45
Clone Of:
Environment:
Last Closed: 2026-09-12 00:19:10 UTC
Type: ---
Embargoed:
pcahyna: mirror+


Attachments (Terms of Use)

Description Pavel Cahyna 2026-07-08 15:00:33 UTC
Caused by the fix for bz2380007 (CVE-2025-45582)

Reproducible: Always

Steps to Reproduce:
#!/bin/bash
set -x
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR /tmp/tar-one-top-level-test" EXIT
cd "$WORKDIR" # Create minimal test archive
mkdir -p pkg/usr/lib && echo "test" > pkg/usr/lib/tartest.txt
tar czf test.tar.gz -C pkg . && rm -rf pkg
echo "tar version: $(rpm -q tar 2>/dev/null || tar --version)"
tar zxf test.tar.gz --one-top-level=/tmp/tar-one-top-level-test 2>&1
Actual Results:
Cannot mkdir/Cannot open: Invalid cross-device link

Expected Results:
archive is extracted at /tmp/tar-one-top-level-test

Comment 1 Aoife Moloney 2026-08-17 15:15:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.

Comment 2 Fedora Update System 2026-09-09 14:16:20 UTC
FEDORA-2026-ee1eb89e7b (tar-1.35-10.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ee1eb89e7b

Comment 3 Fedora Update System 2026-09-10 02:17:42 UTC
FEDORA-2026-ee1eb89e7b has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-ee1eb89e7b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-ee1eb89e7b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-09-12 00:19:10 UTC
FEDORA-2026-ee1eb89e7b (tar-1.35-10.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.