Public bug reported: Expected behavior: symlinks handles paths such as /..
Actual behavior: symlinks crashes with SIGSEGV. Steps to reproduce: ln -s /.. mylink symlinks . Segmentation fault (core dumped) Discussion: The parent directory of the root directory is just the root directory. However, symlinks does not handle this case properly, leading to a segmentation fault. A minimal script to reproduce the crash is attached. $ lsb_release -rd Description: Ubuntu 18.04.4 LTS Release: 18.04 $ apt-cache policy symlinks symlinks: Installed: 1.4-3build1 Candidate: 1.4-3build1 Version table: *** 1.4-3build1 500 500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages 100 /var/lib/dpkg/status ** Affects: symlinks (Ubuntu) Importance: Undecided Status: New ** Attachment added: "reproduce.sh" https://bugs.launchpad.net/bugs/1863521/+attachment/5328761/+files/reproduce.sh ** Description changed: Expected behavior: symlinks handles paths such as /.. - Actual behavior: symlinks crashes with SISEGV. + Actual behavior: symlinks crashes with SIGSEGV. Steps to reproduce: ln -s /.. mylink symlinks . Segmentation fault (core dumped) Discussion: The parent directory of the root directory is just the root directory. However, symlinks does not handle this case properly, leading to a segmentation fault. A minimal script to reproduce the crash is attached. $ lsb_release -rd Description: Ubuntu 18.04.4 LTS Release: 18.04 $ apt-cache policy symlinks symlinks: - Installed: 1.4-3build1 - Candidate: 1.4-3build1 - Version table: - *** 1.4-3build1 500 - 500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages - 100 /var/lib/dpkg/status + Installed: 1.4-3build1 + Candidate: 1.4-3build1 + Version table: + *** 1.4-3build1 500 + 500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages + 100 /var/lib/dpkg/status -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1863521 Title: symlinks crashed with SIGSEGV in tidy_path() when path is /.. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/symlinks/+bug/1863521/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs