REDHAT-BUG-667529: Low severity GNU GNU patch vulnerability
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
Event History
Frequently Asked Questions
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.
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.
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.