Symbolic links can create recursive loop that causes Baobab to never finish scanning
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
baobab (Fedora) |
Fix Released
|
Undecided
|
|||
ntfs-3g (Debian) |
Fix Released
|
Unknown
|
|||
ntfs-3g (Fedora) |
Fix Released
|
Medium
|
|||
ntfs-3g (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Unassigned |
Bug Description
= Stable Release Update discussion =
== Impact ==
readdir() returns the directory type for junction points (NTFS symbolic links). This causes baobab to go into an endless loop when scanning an NTFS file-system. Older baobabs used stat() which correctly identified junction points as being symlinks.
This would affect all users who run baobab on a Windows 7 (or later) root file-system. For dual-booting users, that's fairly likely to be where they store most of their media (it's accessible from both OSs), and thus the file-system most likely to be full and need the help of baobab.
== Test Case ==
* Mount a Windows 7 root filesystem.
* Run baobab on Users/somebody/
* If affected by this bug, it will appear to take forever to scan, and under strace it's obvious that it's following an endless loop of symlinks.
== Regression potential ==
The patch is limited to readdir() and simply adds support for more types of file. It is not trivial, but is readable and seems plausible.
Fedora appear are also backporting this patch to F17.
= Original report =
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Ubuntu 12.04 LTS
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
3.4.1-0ubuntu1
3) What you expected to happen
Detect the presence of symbolic link and omit directories under the link
4) What happened instead
Scans directories under the symbolic link, which is in reference to the directory above the symbolic link, and continue scanning without completion.
Case in which bug was discovered:
When scanning an NTFS drive with Windows 7 installed, the Users\System\
Workaround:
Omit scanning of the directory that is known to contain such links.
no longer affects: | baobab (Ubuntu) |
Changed in ntfs-3g (Debian): | |
status: | Unknown → Fix Released |
Changed in ntfs-3g (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in ntfs-3g (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Changed in baobab (Fedora): | |
importance: | Unknown → Undecided |
status: | Unknown → Fix Released |
Changed in ntfs-3g (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Description of problem:
when i let baobab scan a windows 7 partition it keeps getting into infinite loops because of some symlinks.
Version-Release number of selected component (if applicable):
3.4.0
How reproducible:
always
Steps to Reproduce:
1. let baobab scan an ntfs partition with this special kind of symlink
2.
3.
Actual results:
baobab follows the symlink
Expected results:
baobab skips the symlink
Additional info:
there is something special about this kind of symlinks,
stat reports that it is a symlink, but that it has 2 links, which is the only difference I see from the normal symlinks