REDHAT-BUG-667529: Low severity GNU GNU patch vulnerability

Published Jan 5, 2011
·
Updated

It was discovered that the patch utility allowed '..' in path names which could allow an attacker to create arbitrary files using a specially-crafted patch file. For instance, the following patch will arbitrarily create the file /tmp/allyourbase.txt:

--- /dev/null +++ /../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../tmp/allyourbase.txt @@ -0,0 +1 @@ +All your base are belong to us.

Affected Software

1 affected component
GNU GNU patch

Event History

Jan 5, 2011
Data Sourced
via Red Hat·09:42 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Systems where an attacker can supply or influence a patch file that is processed by the patch utility are exposed. The attacker can use path traversal sequences in patch file names to target files outside the intended patch directory.

2

What does an attacker need to exploit it?

The attacker needs a specially crafted patch file containing '..' path components and a way to have it applied with the patch utility. The provided example shows such a patch creating a file under /tmp.

3

What is the impact of successful exploitation?

Successful exploitation can create arbitrary files at attacker-selected filesystem locations reachable by the process applying the patch. The resulting impact depends on the permissions of that process and whether the created file location affects other system behavior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203