Skip to content

unsquashfs: -follow-symlinks option fails on symbolic links with trailing "." or ".." #370

@plougher

Description

@plougher

If a symbolic link has a trailing "." or "..", then the -follow-symlinks option will fail complaining the symbolic link cannot be resolved.

e.g. given Squashfs filesystem has contents

drwxr-xr-x phillip/phillip          75 2026-04-29 04:36 squashfs-root
lrwxrwxrwx phillip/phillip           1 2026-04-29 04:32 squashfs-root/dot -> .
-rw-r--r-- phillip/phillip           5 2026-04-29 04:32 squashfs-root/file

Following the dot symbolic link will fail with:

$ unsquashfs -follow test.sqsh dot/file
Extract filename dot/file can't be resolved

Because the same code is used in sqfscat, this will fail in a similar way:

$ sqfscat test.sqsh dot/test
cat: /dot failed to resolve symbolic link

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions