Bug 2558782 - CVE-2026-115207 patch: Filename validation bypass in reversal fallback allows file creation outside the working directory [fedora-all]
Summary: CVE-2026-115207 patch: Filename validation bypass in reversal fallback allows...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: patch
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["476d7acb-c7f7-4552-89a3-6...
Depends On:
Blocks: CVE-2026-115207
TreeView+ depends on / blocked
 
Reported: 2026-10-22 08:03 UTC by Vladimir Vasilev
Modified: 2026-10-22 08:03 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vladimir Vasilev 2026-10-22 08:03:08 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

A flaw was found in GNU patch. The reversal fallback in intuit_diff_type() in src/pch.c selects a filename from the patch headers without applying the name_is_valid() check that normally rejects absolute paths. A crafted unified diff that appears to delete a nonexistent file, with an absolute filename in both headers and an epoch timestamp for the new file, can trigger automatic reversal when applied with patch -p0 -t. The unvalidated absolute filename reaches the filesystem operations, allowing attacker-controlled file creation outside the working directory with the permissions of the account running patch. Exploitation requires a user or workflow to apply the crafted patch; it does not bypass operating-system filesystem permissions.


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