** Description changed:

  SRU Justification:
+ 
+ [Impact]
+ 
+ A recent upstream stable update (LP: #2172887) included the upstream
+ commit 7ffa8f3d3023 ("fs: Remove NTFS classic"), together with
+ "UBUNTU: [Config] remove classic NTFS options". This removed the
+ classic ntfs driver (ntfs.ko) from the noble kernel.
+ 
+ Upstream fixed the resulting regression for users that relied on the
+ legacy ntfs driver in mainline (v6.9) by making ntfs3 register itself
+ under the "ntfs" filesystem type as well. As a result, anything that
+ mounts NTFS with the kernel driver using "-t ntfs" now fails with
+ "unknown filesystem type 'ntfs'". This includes fstab entries, scripts,
+ and systems without ntfs-3g installed. Systems that mount removable
+ media or Windows partitions this way can lose access to those volumes,
+ or fail to boot if the mount is required.
+ 
+ Users of ntfs-3g (FUSE) are not affected. Its mount.ntfs helper
+ handles "-t ntfs" in userspace.
+ 
+ [Fix]
+ 
+ Backport the upstream series that makes ntfs3 serve as an alias for
+ the legacy ntfs driver:
+ 
+  - 74871791ffa9 ("ntfs3: serve as alias for the legacy ntfs driver")
+  - d55f90e9b243 ("ntfs3: enforce read-only when used as legacy ntfs driver")
+  - 9b872cc50daa ("ntfs3: add legacy ntfs file operations")
+  - 1ff2e956608c ("fs/ntfs3: Redesign legacy ntfs support")
+ 
+ Also re-enable CONFIG_NTFS_FS=m on all architectures. This option no
+ longer builds a separate driver. It enables the "ntfs" alias in
+ ntfs3.ko, which declares MODULE_ALIAS_FS("ntfs"), so "mount -t ntfs"
+ autoloads ntfs3.
+ 
+ Mounts made through the alias are always read-only, including after
+ "remount,rw". The legacy file operations do not implement ioctls,
+ so ioctls cannot be used to bypass this. This matches the previous
+ noble behaviour, where CONFIG_NTFS_RW was disabled on all
+ architectures except s390x. The result is the same as mainline
+ v6.9 through v7.0.
+ 
+ [Test Plan]
+ 
+ On a noble system running the patched kernel:
+ 
+   truncate -s 64M /tmp/ntfs.img
+   mkntfs -F -Q -q /tmp/ntfs.img
+   LOOP=$(sudo losetup -f --show /tmp/ntfs.img)
+   sudo mkdir -p /mnt/t
+   sudo rmmod ntfs3 2>/dev/null
+ 
+   # -i bypasses ntfs-3g's mount.ntfs helper, if installed
+   sudo mount -i -t ntfs "$LOOP" /mnt/t
+   findmnt -no FSTYPE,OPTIONS /mnt/t    # expect: ntfs ro,...
+   lsmod | grep ntfs3                   # expect: ntfs3 autoloaded
+   sudo touch /mnt/t/x                  # expect: Read-only file system
+   sudo mount -i -o remount,rw /mnt/t
+   findmnt -no OPTIONS /mnt/t           # expect: still ro
+ 
+   sudo umount /mnt/t; sudo losetup -d "$LOOP"
+ 
+ On an unpatched kernel the mount fails with
+ "unknown filesystem type 'ntfs'".
+ 
+ [Where problems could occur]
+ 
+ The changes are limited to ntfs3. Regressions would affect NTFS
+ mounts handled by ntfs3:
+ 
+  - ntfs3 now registers a second filesystem type. If that fails, it
+    only logs "Failed to register legacy ntfs filesystem driver" and
+    ntfs3 keeps working.
+  - Every ntfs3 inode now gets its file operations chosen by
+    is_legacy_ntfs(). A bug there could give regular ntfs3 mounts
+    the read-only, ioctl-less file operations.
+  - d55f90e9b243 changes ntfs_fs_reconfigure() for all ntfs3 mounts.
+    sync_filesystem() now runs after the remount validation checks
+    instead of before them, so a remount that is rejected no longer
+    syncs first.
+  - The alias is backed by ntfs3, not the classic driver. Mount
+    options that only the classic driver supported (for example
+    nls=, utf8, case_sensitive, show_sys_files, errors=) are rejected,
+    so fstab entries that use them still fail to mount. As in
+    upstream, no module named "ntfs" exists. "modprobe ntfs",
+    "ntfs" in /etc/modules, and "blacklist ntfs" in modprobe.d have
+    no effect. Only "fs-ntfs" (mount autoloading) resolves to ntfs3.
+  - On s390x, which previously had CONFIG_NTFS_RW=y, "-t ntfs" mounts
+    are now read-only. "-t ntfs3" can still be used for write access.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175006

Title:
  ntfs3: serve as alias for the dropped legacy ntfs driver

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2175006/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to