squashfs_opendir in unsquash-2.c in Squashfs-Tools 4.5 allows Directory Traversal, a different vulnerability than CVE-2021-40153. A squashfs filesystem that has been crafted to include a symbolic link and then contents under the same filename in a filesystem can cause unsquashfs to first create the symbolic link pointing outside the expected directory, and then the subsequent write operation will cause the unsquashfs process to write through the symbolic link elsewhere in the filesystem.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd | third party advisory patch |
https://github.com/plougher/squashfs-tools/issues/72#issuecomment-913833405 | third party advisory exploit |
https://www.debian.org/security/2021/dsa-4987 | third party advisory vendor advisory |
https://lists.debian.org/debian-lts-announce/2021/10/msg00017.html | third party advisory mailing list |
https://security.gentoo.org/glsa/202305-29 | vendor advisory |