Activity log for bug #1842437

Date Who What changed Old value New value Message
2019-09-03 14:21:46 Mauricio Faria de Oliveira bug added bug
2019-09-03 14:21:59 Mauricio Faria de Oliveira nominated for series Ubuntu Xenial
2019-09-03 14:21:59 Mauricio Faria de Oliveira bug task added util-linux (Ubuntu Xenial)
2019-09-03 14:22:06 Mauricio Faria de Oliveira util-linux (Ubuntu): status New Fix Released
2019-09-03 14:22:12 Mauricio Faria de Oliveira util-linux (Ubuntu Xenial): status New In Progress
2019-09-03 14:22:16 Mauricio Faria de Oliveira util-linux (Ubuntu Xenial): assignee Mauricio Faria de Oliveira (mfo)
2019-09-03 14:22:22 Mauricio Faria de Oliveira util-linux (Ubuntu Xenial): importance Undecided Medium
2019-09-03 16:59:35 Guilherme G. Piccoli bug added subscriber Guilherme G. Piccoli
2019-09-05 22:44:27 Mauricio Faria de Oliveira description The nilfs filesystem has a backup superblock at the end of the device. If the magic number is coincidentally found at the right position and the filesystem is on a partition/not-wholedisk device, the only check left is for checksum verification, which is explicitly ignored in 'udev built-in blkid'. This causes blkid to detect one actually valid filesystem with a superblock at the beginning of the device (e.g., ext4), and then an invalid nilfs2 filesystem due to a coincidental magic number at the end of the device. And this causes blkid to break out of the safeprobe routine (which expects a single filesystem to be detected), and not print the UUIDs, thus not creating /dev/disk/by-uuid/ links which prevent mounting the partition by-uuid at boot time, causing emergency shell/boot failures. This upstream fix resolved the problem by introducing a check for the 'bytes' paramenters in the superblock, which is read from disk, and turns out to have an out-of-range value. - 'liblkid: Add length check in probe_nilfs2 before crc32' https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=ac681a310c32319423297544833932f4d689a7a2 $ git describe --contains ac681a310c32319423297544833932f4d689a7a2 v2.29-rc1~172 Xenial, which is v2.27.1-based, is the only release that needs it. Bionic is v2.31.1, so all post-Xenial supported releases have it. [Impact] * Users / systemd can fail to mount a filesystem by UUID (e.g., during boot, triggering emergency shell prompt) if the magic bytes for the nilfs filesystem are written to the right place in a partition of another filesystem, (for whatever reason or coincidence). * Note this can happen after the filesystem/mount is working correctly, so a change of behavior/problem can potentially be noticed when trying to mount the filesystem again, which can very well be the next time the system boots. * This happens because if udev blkid detects more than one filesystem, it does not print the UUID env vars required to create the /dev/disk/by-id symlinks and other things. * The fix enhances the check for valid nilfs superblock by specifically checking a value read from disk to be valid/ within a value range, which addresses this one occurrence and prevents a lot more. [Test Case] * Synthetic test case written for this problem on comment #6. [Regression Potential] * Low. The code is contained in the probe for the nilfs filesystem. * This just makes it be more restrictive about the possibly valid values for a few bytes read from disk (that now need to be within the acceptable range of valid values) so this only decreases false- positives, and cannot increase false-negatives of valid filesystems. [Original Description] The nilfs filesystem has a backup superblock at the end of the device. If the magic number is coincidentally found at the right position and the filesystem is on a partition/not-wholedisk device, the only check left is for checksum verification, which is explicitly ignored in 'udev built-in blkid'. This causes blkid to detect one actually valid filesystem with a superblock at the beginning of the device (e.g., ext4), and then an invalid nilfs2 filesystem due to a coincidental magic number at the end of the device. And this causes blkid to break out of the safeprobe routine (which expects a single filesystem to be detected), and not print the UUIDs, thus not creating /dev/disk/by-uuid/ links which prevent mounting the partition by-uuid at boot time, causing emergency shell/boot failures. This upstream fix resolved the problem by introducing a check for the 'bytes' paramenters in the superblock, which is read from disk, and turns out to have an out-of-range value. - 'liblkid: Add length check in probe_nilfs2 before crc32' https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=ac681a310c32319423297544833932f4d689a7a2 $ git describe --contains ac681a310c32319423297544833932f4d689a7a2 v2.29-rc1~172 Xenial, which is v2.27.1-based, is the only release that needs it. Bionic is v2.31.1, so all post-Xenial supported releases have it.
2019-09-05 22:48:11 Mauricio Faria de Oliveira attachment added lp1842437_util-linux.debdiff https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1842437/+attachment/5287043/+files/lp1842437_util-linux.debdiff
2019-09-05 22:48:38 Mauricio Faria de Oliveira util-linux (Ubuntu Xenial): assignee Mauricio Faria de Oliveira (mfo) Guilherme G. Piccoli (gpiccoli)
2019-09-17 14:49:51 Mauricio Faria de Oliveira util-linux (Ubuntu Xenial): assignee Guilherme G. Piccoli (gpiccoli) Mauricio Faria de Oliveira (mfo)
2019-09-17 14:53:30 Mauricio Faria de Oliveira bug added subscriber STS Sponsors
2019-09-17 14:57:12 Mauricio Faria de Oliveira tags sts
2019-09-17 15:01:07 Eric Desrochers tags sts sts sts-sponsor-slashd
2019-09-17 15:02:40 Dan Streetman bug added subscriber Dan Streetman
2019-09-17 16:30:11 Eric Desrochers bug added subscriber Eric Desrochers
2019-09-24 11:47:05 Eric Desrochers tags sts sts-sponsor-slashd ftbfs sts sts-sponsor-slashd
2019-10-04 15:01:57 Eric Desrochers removed subscriber STS Sponsors
2019-10-10 09:29:34 Łukasz Zemczak util-linux (Ubuntu Xenial): status In Progress Fix Committed
2019-10-10 09:29:37 Łukasz Zemczak bug added subscriber Ubuntu Stable Release Updates Team
2019-10-10 09:29:38 Łukasz Zemczak bug added subscriber SRU Verification
2019-10-10 19:40:44 Mauricio Faria de Oliveira tags ftbfs sts sts-sponsor-slashd ftbfs sts sts-sponsor-slashd verification-done-xenial
2019-10-15 11:32:24 Eric Desrochers tags ftbfs sts sts-sponsor-slashd verification-done-xenial ftbfs sts verification-done-xenial
2019-10-21 14:52:04 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2019-10-21 15:02:10 Launchpad Janitor util-linux (Ubuntu Xenial): status Fix Committed Fix Released