** Changed in: util-linux (Ubuntu Trusty) Status: New => In Progress
** Changed in: util-linux (Ubuntu Trusty) Importance: Undecided => High ** Changed in: util-linux (Ubuntu Trusty) Assignee: (unassigned) => Phillip Susi (psusi) ** No longer affects: util-linux (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to util-linux in Ubuntu. https://bugs.launchpad.net/bugs/1389321 Title: SRU: partx wraps partition offset and length mod 2^32 (2^23 sectors) Status in “util-linux” source package in Trusty: In Progress Bug description: [Impact] Partx is used to activate partitions on loopback devices. It is had a bug causing it to overflow and wraparound at the 4 GB mark, causing it to put the partitions in the wrong place giving access to the wrong areas of the disk, which at best, renders the activated partitions unusable, and at worst, may cause corrupt data to be written to disk. [Test Case] truncate -s 6g img sudo losetup /dev/loop0 img sudo parted -s /dev/loop0 mklabel msdos mkpart primary ext2 5g 6g cat /sys/block/loop0/loop0p1/start The value should be 9764864, which corresponds to 4999610368 bytes. Instead the bug causes it to be 1376256, or 704643072 bytes. [Regression Potential] None. The fix was simply to change the data type of the argument to partx_add_partition from 32 bit ( unsigned long ) to 64 bit ( unsigned long long ), which upstream did long ago. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/trusty/+source/util-linux/+bug/1389321/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp