partprobe is broken on empty loopback device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
High
|
Roxana Nicolescu | ||
Mantic |
Fix Released
|
High
|
Roxana Nicolescu |
Bug Description
SRU Justification:
[Impact]
* BLKPG_DEL_PARTITION on an empty loopback device used to return ENXIO
but now returns EINVAL, breaking partprobe due to commit
"block: don't add or resize partition on the disk with GENHD_FL_NO_PART"
introduced in mantic 6.5.0-17 and jammy 5.15.0-94.
[Fix]
* backport commit
"block: Move checking GENHD_FL_NO_PART to bdev_add_
[Test Plan]
* dd if=/dev/zero of=/tmp/foo bs=1M count=50
* partprobe $(losetup --find --show /tmp/foo)
Before the fix this fails.
After the fix it should work.
[Where problems could occur]
* We may see issues on disk partitions operations.
Old description:
This is with the kernel from jammy-proposed (linux-
Do this:
# dd if=/dev/zero of=/tmp/file bs=1M count=50
# partprobe "$(losetup --show --find /tmp/file)"
Notice this very odd error message:
Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on /dev/loop2 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
That's a result of an ioctl changing its error code in an incompatible way between kernel versions 5.15.0.91.88 and 5.15.0.94.91, confusing partprobe.
5.15.0.91.88:
ioctl(3, BLKPG, {op=BLKPG_
5.15.0.94.91:
ioctl(3, BLKPG, {op=BLKPG_
This is a userspace API break which impacts GNU parted and util-linux (as confirmed by the util-linux maintainer).
This issue was discovered as part of Cockpit CI here: https:/
This issue is being discussed on LKML here (with a patch likely to land soon): https:/
lsb_release -rd:
Description: Ubuntu 22.04.3 LTS
Release: 22.04
CVE References
tags: | added: jammy regression-release |
tags: |
added: regression-update removed: regression-release |
no longer affects: | linux-signed (Ubuntu) |
no longer affects: | linux-signed (Ubuntu Jammy) |
Changed in linux (Ubuntu): | |
status: | New → Invalid |
Changed in linux (Ubuntu Jammy): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Mantic): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in linux (Ubuntu Mantic): | |
status: | New → In Progress |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Mantic): | |
importance: | Undecided → High |
summary: |
- linux-image-5.15.0-94-generic breaks partprobe on empty loopback device + partproke is broken on empty loopback device |
summary: |
- partproke is broken on empty loopback device + partprobe is broken on empty loopback device |
A fix is available upstream: https://<email address hidden>/T/