Bug 2498061

Summary: tar: --one-top-level with absolute path fails
Product: [Fedora] Fedora Reporter: Pavel Cahyna <pcahyna>
Component: tarAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 45CC: kdudka, ovasik, pcahyna, pkubat, praiskup
Target Milestone: ---Flags: pcahyna: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: tar-1.35-10.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-09-12 00:19:10 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:

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.