Fix segfault in dm_get_map() on null device-mapper parameters

Bug #2042366 reported by Mauricio Faria de Oliveira
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Mauricio Faria de Oliveira
Jammy
Fix Released
Medium
Mauricio Faria de Oliveira
Lunar
Fix Released
Medium
Mauricio Faria de Oliveira
Mantic
Fix Released
Undecided
Unassigned
Noble
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * There are corner cases in which multipathd
   might segfault if device-mapper parameters
   for a multipath map are returned as NULL.

 * This is apparently a rare error condition,
   but it's been reported and fixed upstream:

   commit 7439a41 ("dm_get_map: fix segfault
   when can't found target") [1]

 * The SRU in bug 2039719 (Focal) needs this,
   so we take it individually as separete SRU
   to perform synthetic tests on the commit
   and verify correct behavior.

 * Focal does not segfault if params are NULL
   since it uses `snprintf(..., "%s", params)`,
   which handles a string NULL pointer well,
   while newer releases use `strdup(params)`,
   which does not.

   However, Focal should still get the patch
   since a multipath map _without parameters_
   is _invalid_, and should not be passed on
   within multipathd (might lead to issues).

   Details: the device-mapper multipath target
   _requires_ 4 parameters: features, hardware
   handler, path groups, and next path group;
   linux/drivers/md/dm-mpath.c:multipath_ctr():

   Without parameters:
   $ sudo dmsetup create mpath-test --table '0 1048576 multipath'
   device-mapper: reload ioctl on mpath-test (253:3) failed: Invalid argument
   Command failed.

   With 4 parameters:
   $ sudo dmsetup create mpath-test --table '0 1048576 multipath 0 0 0 0'
   $ sudo dmsetup table --target multipath
   mpath-test: 0 1048576 multipath 0 0 0 0
   $ sudo dmsetup remove mpath-test

[Test Steps]

 * Synthetic reproducer available with GDB,
   (comments #1 and #2).

 * Create a VM with a multipath disk.
 * Attach GDB to multipathd.
 * Break on the device-mapper function
   that returns a map's info/parameters.
 * Let it finish that function, and set
   parameters to NULL.
 * Let multipathd run.

 Jammy/Lunar:
 * Expected: multipathd continues to run.
 * Actual: multipathd hits a segfault.

 Focal:
 * Expected: map without parameters returns error.
 * Actual: map without parameters returns normally.

[Regression Potential]

 * The change is just a NULL pointer check,
   which returns early from the function
   (with the same error code as already used
   previously in that function).

 * Theoretically, regressions would manifest
   in the dm_get_map() function, and likely
   show as incomplete information on status
   of multipath maps or paths.

 * It's not expected to regress to another
   segmentation fault, as the function path
   is shorter if the condition happens, and
   only accesses memory that was initialized
   and checked before (the dm_task variable).

 * Any regression should be easy to catch,
   as dm_get_map() runs periodically on the
   path checkers in multipathd (the daemon)
   and commands in multipath (the cli tool).

[Other Info]

 * The commit [1] is present in Mantic and later.

   $ git describe --contains 7439a41
   0.9.0^2~8

   $ rmadison -a source multipath-tools
   ...
    multipath-tools | 0.8.8-1ubuntu2.2 | lunar-proposed | source
    multipath-tools | 0.9.4-5ubuntu3 | mantic | source
    multipath-tools | 0.9.4-5ubuntu3 | noble | source

[1] https://github.com/opensvc/multipath-tools/commit/7439a41

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.4 KiB)

Synthetic reproducer on Lunar
===

Ubuntu Server cloud image:
---

SERIES=lunar

wget https://cloud-images.ubuntu.com/$SERIES/current/${SERIES}-server-cloudimg-amd64.img
qemu-img create -F qcow2 -b ${SERIES}-server-cloudimg-amd64.img -f qcow2 $SERIES.qcow2 8G

cloud-init image:
---

echo 'local-hostname: test' >meta-data

PUBKEY=$(cat $HOME/.ssh/id_rsa.pub)

cat <<EOF >user-data
#cloud-config
users:
  - name: ubuntu
    ssh-authorized-keys: ["$PUBKEY"]
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    groups: sudo
    shell: /bin/bash
runcmd:
   - echo 'AllowUsers ubuntu' >>/etc/ssh/sshd_config
   - restart ssh
EOF

genisoimage -output test-cidata.iso -volid cidata -joliet -rock user-data meta-data

QEMU VM:
---
- multipath disk on virtio-scsi:
- host forwarding for ssh login:

truncate -s 1G multipath.img

qemu-system-x86_64 \
  -machine q35 -accel kvm -cpu host -m 2048 \
  -nodefaults -no-user-config \
  -nographic -serial stdio \
  \
  -net nic -net user,hostfwd=::22222-:22 \
  \
  -drive file=$SERIES.qcow2 \
  -drive file=test-cidata.iso,media=cdrom \
  \
  -device virtio-scsi,id=scsi1 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path0 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path0 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path1 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path1

$ ssh ubuntu@127.0.0.1 -p 22222

$ sudo multipath -l
mpatha (0QEMU_QEMU_HARDDISK_helloworld) dm-0 QEMU,QEMU HARDDISK
size=1.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 0:0:0:0 sda 8:0 active undef running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 0:0:1:0 sdb 8:16 active undef running

Latest version:
---

sudo add-apt-repository -yp proposed
sudo apt install -y multipath-tools/lunar-proposed

sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.8-1ubuntu2.2

Debug symbols
---

V1=$(dpkg-query -Wf '${Version}' multipath-tools)
V2=$(dpkg-query -Wf '${Version}' libdevmapper1.02.1 | cut -d: -f2-)

wget https://launchpad.net/ubuntu/+archive/primary/+files/multipath-tools-dbgsym_${V1}_amd64.ddeb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

sudo dpkg -i ./multipath-tools-dbgsym_${V1}_amd64.ddeb ./libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

Debugger
---

sudo apt install -y gdb

sudo gdb -p $(pidof multipathd)

(gdb) b dm_get_map
Breakpoint 1 at ...
(gdb) c
Thread 6 "multipathd" hit Breakpoint 1, dm_get_map (name=0x5599c32a4fa0 "mpatha", ...

(gdb) b dm_get_next_target
Breakpoint 2 at ...
(gdb) c
Thread 6 "multipathd" hit Breakpoint 2, dm_get_next_target (...

(gdb) finish
Run till exit from #0 dm_get_next_target (...
Value returned is $1 = (void *) 0x0

(gdb) p params
$2 = 0x7fed68004c60 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "
(gdb) set params = 0
(gdb) p params
$3 = 0x0

(gdb) disable breakpoints
(gdb) c

Thread 6 "multipathd" received signal SIGSEGV, Segmentation fault.
...

(gdb) q

$ sudo systemctl status multipathd.service | grep -e Active: -e Process:
     Active: failed (Result: cor...

Read more...

Changed in multipath-tools (Ubuntu Noble):
status: New → Fix Released
Changed in multipath-tools (Ubuntu Mantic):
status: New → Fix Released
Changed in multipath-tools (Ubuntu Lunar):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in multipath-tools (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in multipath-tools (Ubuntu Focal):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.4 KiB)

Synthetic reproducer on Jammy
===

Ubuntu Server cloud image:
---

SERIES=jammy

wget https://cloud-images.ubuntu.com/$SERIES/current/${SERIES}-server-cloudimg-amd64.img
qemu-img create -F qcow2 -b ${SERIES}-server-cloudimg-amd64.img -f qcow2 $SERIES.qcow2 8G

cloud-init image:
---

echo 'local-hostname: test' >meta-data

PUBKEY=$(cat $HOME/.ssh/id_rsa.pub)

cat <<EOF >user-data
#cloud-config
users:
  - name: ubuntu
    ssh-authorized-keys: ["$PUBKEY"]
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    groups: sudo
    shell: /bin/bash
runcmd:
   - echo 'AllowUsers ubuntu' >>/etc/ssh/sshd_config
   - restart ssh
EOF

genisoimage -output test-cidata.iso -volid cidata -joliet -rock user-data meta-data

QEMU VM:
---
- multipath disk on virtio-scsi:
- host forwarding for ssh login:

truncate -s 1G multipath.img

qemu-system-x86_64 \
  -machine q35 -accel kvm -cpu host -m 2048 \
  -nodefaults -no-user-config \
  -nographic -serial stdio \
  \
  -net nic -net user,hostfwd=::22222-:22 \
  \
  -drive file=$SERIES.qcow2 \
  -drive file=test-cidata.iso,media=cdrom \
  \
  -device virtio-scsi,id=scsi1 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path0 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path0 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path1 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path1

$ ssh ubuntu@127.0.0.1 -p 22222

$ sudo multipath -l
mpatha (0QEMU_QEMU_HARDDISK_helloworld) dm-0 QEMU,QEMU HARDDISK
size=1.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 0:0:0:0 sda 8:0 active undef running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 0:0:1:0 sdb 8:16 active undef running

Latest version:
---

sudo add-apt-repository -yp proposed
sudo apt install -y multipath-tools/jammy-proposed

sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.8-1ubuntu1.22.04.3

Debug symbols
---

V1=$(dpkg-query -Wf '${Version}' multipath-tools)
V2=$(dpkg-query -Wf '${Version}' libdevmapper1.02.1 | cut -d: -f2-)

wget https://launchpad.net/ubuntu/+archive/primary/+files/multipath-tools-dbgsym_${V1}_amd64.ddeb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

sudo dpkg -i ./multipath-tools-dbgsym_${V1}_amd64.ddeb ./libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

Debugger
---

sudo apt install -y gdb

sudo gdb -p $(pidof multipathd)

(gdb) b dm_get_map
Breakpoint 1 at ...
(gdb) c
Thread 6 "multipathd" hit Breakpoint 1, dm_get_map (name=0x558d02dc6880 "mpatha", ...

(gdb) b dm_get_next_target
Breakpoint 2 at ...
(gdb) c
Thread 6 "multipathd" hit Breakpoint 2, dm_get_next_target (...

(gdb) finish
Run till exit from #0 dm_get_next_target (...
Value returned is $1 = (void *) 0x0

(gdb) p params
$2 = 0x7f4e24004c60 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "

(gdb) set params = 0
(gdb) p params
$3 = 0x0

(gdb) disable breakpoints
(gdb) c

Thread 6 "multipathd" received signal SIGSEGV, Segmentation fault.
...

(gdb) q

$ sudo systemctl status multipathd.service | grep -e Active: -e Process:
     Active: failed (Result...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test packages on Lunar
===

Packages: ppa:mfo/lp2042366v2
---

sudo apt install ./multipath-tools_0.8.8-1ubuntu2.3_amd64.deb ./kpartx_0.8.8-1ubuntu2.3_amd64.deb ./multipath-tools-dbgsym_0.8.8-1ubuntu2.3_amd64.ddeb
sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.8-1ubuntu2.3

sudo gdb -p $(pidof multipathd)
...
(gdb) p params
$2 = 0x7f93a8004c60 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "
(gdb) set params = 0
(gdb) p params
$3 = 0x0
(gdb) disable breakpoints
(gdb) c
Continuing.
[New Thread 0x7f93b23e6680 (LWP 1239)]
[Thread 0x7f93b23e6680 (LWP 1239) exited]
[New Thread 0x7f93b23e6680 (LWP 1240)]
[Thread 0x7f93b23e6680 (LWP 1240) exited]
[New Thread 0x7f93b23e6680 (LWP 1241)]
[Thread 0x7f93b23e6680 (LWP 1241) exited]
[New Thread 0x7f93b23e6680 (LWP 1242)]
[Thread 0x7f93b23e6680 (LWP 1242) exited]
[New Thread 0x7f93b23e6680 (LWP 1243)]
[Thread 0x7f93b23e6680 (LWP 1243) exited]
[New Thread 0x7f93b23e6680 (LWP 1244)]
[Thread 0x7f93b23e6680 (LWP 1244) exited]
[New Thread 0x7f93b23e6680 (LWP 1245)]
[Thread 0x7f93b23e6680 (LWP 1245) exited]
...

ctrl-c
(gdb) q

$ sudo systemctl status multipathd.service | grep -e Active: -e Process:
     Active: active (running) since Tue 2023-10-31 22:35:34 UTC; 3min 19s ago
    Process: 1198 ExecStartPre=/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath (code=exited, status=0/SUCCESS)

...

Result: multipathd continues running without segmentation faults.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test packages on Jammy
===

Packages: ppa:mfo/lp2042366v2
---

sudo apt install ./multipath-tools_0.8.8-1ubuntu1.22.04.4_amd64.deb ./kpartx_0.8.8-1ubuntu1.22.04.4_amd64.deb ./multipath-tools-dbgsym_0.8.8-1ubuntu1.22.04.4_amd64.ddeb
sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.8-1ubuntu1.22.04.4

sudo gdb -p $(pidof multipathd)
...
(gdb) p params
$2 = 0x7f5e30004c60 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "
(gdb) set params = 0
(gdb) p params
$3 = 0x0
(gdb) disable breakpoints
(gdb) c
Continuing.
[New Thread 0x7f5e3b288600 (LWP 1288)]
[Thread 0x7f5e3b288600 (LWP 1288) exited]
[New Thread 0x7f5e3b288600 (LWP 1289)]
[Thread 0x7f5e3b288600 (LWP 1289) exited]
[New Thread 0x7f5e3b288600 (LWP 1290)]
[Thread 0x7f5e3b288600 (LWP 1290) exited]
[New Thread 0x7f5e3b288600 (LWP 1291)]
[Thread 0x7f5e3b288600 (LWP 1291) exited]
[New Thread 0x7f5e3b288600 (LWP 1292)]
[Thread 0x7f5e3b288600 (LWP 1292) exited]

ctrl-c
(gdb) q

ubuntu@test:~$ sudo systemctl status multipathd.service | grep -e Active: -e Process:
     Active: active (running) since Tue 2023-10-31 22:44:08 UTC; 1min 48s ago
    Process: 1257 ExecStartPre=/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath (code=exited, status=0/SUCCESS)

...

Result: multipathd continues running without segmentation faults.

description: updated
description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (4.0 KiB)

Synthetic reproducer on Focal
===

Ubuntu Server cloud image:
---

SERIES=focal

wget https://cloud-images.ubuntu.com/$SERIES/current/${SERIES}-server-cloudimg-amd64.img
qemu-img create -F qcow2 -b ${SERIES}-server-cloudimg-amd64.img -f qcow2 $SERIES.qcow2 8G

cloud-init image:
---

echo 'local-hostname: test' >meta-data

PUBKEY=$(cat $HOME/.ssh/id_rsa.pub)

cat <<EOF >user-data
#cloud-config
users:
  - name: ubuntu
    ssh-authorized-keys: ["$PUBKEY"]
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    groups: sudo
    shell: /bin/bash
runcmd:
   - echo 'AllowUsers ubuntu' >>/etc/ssh/sshd_config
   - restart ssh
EOF

genisoimage -output test-cidata.iso -volid cidata -joliet -rock user-data meta-data

QEMU VM:
---
- multipath disk on virtio-scsi:
- host forwarding for ssh login:

truncate -s 1G multipath.img

qemu-system-x86_64 \
  -machine q35 -accel kvm -cpu host -m 2048 \
  -nodefaults -no-user-config \
  -nographic -serial stdio \
  \
  -net nic -net user,hostfwd=::22222-:22 \
  \
  -drive file=$SERIES.qcow2 \
  -drive file=test-cidata.iso,media=cdrom \
  \
  -device virtio-scsi,id=scsi1 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path0 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path0 \
  \
  -drive file=multipath.img,if=none,cache=none,format=file,locking=off,id=path1 \
  -device scsi-hd,bus=scsi1.0,serial=helloworld,drive=path1

$ ssh ubuntu@127.0.0.1 -p 22222

$ sudo multipath -l
mpatha (0QEMU_QEMU_HARDDISK_helloworld) dm-0 QEMU,QEMU HARDDISK
size=1.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 0:0:0:0 sda 8:0 active undef running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 0:0:1:0 sdb 8:16 active undef running

Latest version:
---

sudo add-apt-repository -y 'deb http://archive.ubuntu.com/ubuntu focal-proposed main'
sudo apt install -y multipath-tools/focal-proposed

sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.3-1ubuntu2.2

Debug symbols
---

V1=$(dpkg-query -Wf '${Version}' multipath-tools)
V2=$(dpkg-query -Wf '${Version}' libdevmapper1.02.1 | cut -d: -f2-)

wget https://launchpad.net/ubuntu/+archive/primary/+files/multipath-tools-dbgsym_${V1}_amd64.ddeb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

sudo dpkg -i ./multipath-tools-dbgsym_${V1}_amd64.ddeb ./libdevmapper1.02.1-dbgsym_${V2}_amd64.ddeb

Debugger
---

sudo apt install -y gdb

sudo gdb -p $(pidof multipathd)

(gdb) b dm_get_map
Breakpoint 1 at ...
(gdb) c
Thread 5 "multipathd" hit Breakpoint 1, dm_get_map (name=0x558d02dc6880 "mpatha", ...

(gdb) b dm_get_next_target
Breakpoint 2 at ...
(gdb) c
Thread 5 "multipathd" hit Breakpoint 2, dm_get_next_target (...

(gdb) finish
Run till exit from #0 dm_get_next_target (...
Value returned is $1 = (void *) 0x0

(gdb) p params
$2 = 0x7fef90004db0 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "
(gdb) set params = 0
(gdb) p params
$3 = 0x0

Now, NOTE the value returned from both functions
(ZERO, i.e., "OK", even though empty map parameters is invalid)

(gdb) finish
Run till exit from #0 dm_get_map (name=0x563...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test packages on Focal
===

Packages: ppa:mfo/test
---

sudo apt install ./kpartx_0.8.3-1ubuntu2.3_amd64.deb ./multipath-tools_0.8.3-1ubuntu2.3_amd64.deb ./multipath-tools-dbgsym_0.8.3-1ubuntu2.3_amd64.ddeb
sudo systemctl restart multipathd.service

$ dpkg -s multipath-tools | grep Version:
Version: 0.8.3-1ubuntu2.3

sudo gdb -p $(pidof multipathd)
...
(gdb) b dm_get_map
Breakpoint 1 at ...
(gdb) c
Thread 5 "multipathd" hit Breakpoint 1, dm_get_map (name=0x558d02dc6880 "mpatha", ...

(gdb) b dm_get_next_target
Breakpoint 2 at ...
(gdb) c
Thread 5 "multipathd" hit Breakpoint 2, dm_get_next_target (...

(gdb) finish
Run till exit from #0 dm_get_next_target (...
Value returned is $1 = (void *) 0x0

(gdb) p params
$2 = 0x7fef90004db0 "0 0 2 1 service-time 0 1 2 8:0 1 1 service-time 0 1 2 8:16 1 1 "
(gdb) set params = 0
(gdb) p params
$3 = 0x0

Now, NOTE the value returned from both functions
(TWO, i.e., indicates "not-OK" with empty map parameters)

 (gdb) finish
 Run till exit from #0 0x00007f490f4fc5cd in dm_get_map (name=0x55992f15c4d0 "mpatha", ...
 ...
 Value returned is $4 = 2

 (gdb) p params
 $5 = '\000' <repeats 4095 times>

 (gdb) finish
 Run till exit from #0 0x00007f490f5239ce in update_multipath_table (...
 ...
 Value returned is $6 = 2

(gdb) q

And this does not run disassemble_map(), as dm_get_map() now returns DMP_NOT_FOUND:

 167 +enum {
 168 + DMP_ERR,
 169 + DMP_OK,
 170 + DMP_NOT_FOUND,
 171 +};

 196 int
 197 update_multipath_table (struct multipath *mpp, vector pathvec, int is_daemon)
 198 {
 199 int r = DMP_ERR;
 200 char params[PARAMS_SIZE] = {0};
 ...
 205 r = dm_get_map(mpp->alias, &mpp->size, params);
 206 if (r != DMP_OK) {
 ...
 208 return r;
 ...
 211 if (disassemble_map(pathvec, params, mpp, is_daemon)) {
 ...
 213 return DMP_ERR;
 214 }
 215
 216 return DMP_OK;
 217 }

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Uploaded to Lunar, Jammy, Focal.

Revision history for this message
Robie Basak (racb) wrote :

I've not finished my SRU review yet, but please could you check if https://github.com/opensvc/multipath-tools/commit/e54de842a0e714f0d7049d8a3f9db2ba8bb35537 relevant to this fix? I don't intend to insist that you fix an unrelated bug but looking at related upstream changes I'm wondering if the fix for _this_ bug was incomplete upstream in some way.

Revision history for this message
Robie Basak (racb) wrote :

Sorry, my last comment might not make any sense. I need to spend more time looking at this.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Robie,

Thanks for reviewing, and identifying this additional patch.

I think your previous comment makes sense.

That patch does improve the error handling coverage for the same issue,
although it targets another tool (kpartx) and code path (reassignment).
(I've been a bit short-sighted and didn't look at other commands/paths.)

Even if not strictly necessary for the SRU target (bug 2039719 / Focal),
I am happy to include it as well (and update reproducers in a few days),
so to have more of these cases covered, and re-upload the three series.

Just let me know your preference.

Thanks again,
Mauricio

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Mauricio, or anyone else affected,

Accepted multipath-tools into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/multipath-tools/0.8.8-1ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in multipath-tools (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Changed in multipath-tools (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

Hello Mauricio, or anyone else affected,

Accepted multipath-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/multipath-tools/0.8.8-1ubuntu1.22.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in multipath-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Mauricio, or anyone else affected,

Accepted multipath-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/multipath-tools/0.8.3-1ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (multipath-tools/0.8.8-1ubuntu2.3)

All autopkgtests for the newly accepted multipath-tools (0.8.8-1ubuntu2.3) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

udisks2/2.9.4-4 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/lunar/update_excuses.html#multipath-tools

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (multipath-tools/0.8.3-1ubuntu2.3)

All autopkgtests for the newly accepted multipath-tools (0.8.3-1ubuntu2.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-image/1.11+20.04ubuntu1 (amd64, ppc64el)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#multipath-tools

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

autopkgtests regressions:

> udisks2/2.9.4-4 (arm64)

Passed with a retry.

> ubuntu-image/1.11+20.04ubuntu1 (amd64, ppc64el)

Unrelated; failed with migration-trigger/0 too.

The issue is a snap that is not found anymore.
I'll propose a fix for this, but this should not block the SRU per the above, IMHO.

Revision history for this message
Jorge Merlino (jorge-merlino) wrote (last edit ):

Tested version 0.8.3-1ubuntu2.3 on Focal. Followed steps on comment #6 and reproduced ok.

Also tested instructions on comment #5 for unpatched code with version 0.8.3-1ubuntu2.2 and also reproduced ok.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Jorge Merlino (jorge-merlino) wrote :

Tested version 0.8.8-1ubuntu2.3 on Lunar. Followed steps on comments #1 and #3 and no errors found.

Also tested procedure using version from lunar-updates and could reproduce expected segfault.

tags: added: verification-done-lunar
removed: verification-needed-lunar
Revision history for this message
Jorge Merlino (jorge-merlino) wrote :

Tested version 0.8.8-1ubuntu1.22.04.4 on Jammy. Followed steps on comments #2 and #4 and no errors found.

Also tested procedure using version from jammy-updates and could reproduce expected segfault.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package multipath-tools - 0.8.8-1ubuntu2.3

---------------
multipath-tools (0.8.8-1ubuntu2.3) lunar; urgency=medium

  * d/p/lp2042366-dm_get_map-fix-segfault-when-can-t-found-target.patch:
    Introduce NULL pointer check to multipath map params. (LP: #2042366)

 -- Mauricio Faria de Oliveira <email address hidden> Tue, 31 Oct 2023 19:17:05 -0300

Changed in multipath-tools (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for multipath-tools has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package multipath-tools - 0.8.8-1ubuntu1.22.04.4

---------------
multipath-tools (0.8.8-1ubuntu1.22.04.4) jammy; urgency=medium

  * d/p/lp2042366-dm_get_map-fix-segfault-when-can-t-found-target.patch:
    Introduce NULL pointer check to multipath map params. (LP: #2042366)

 -- Mauricio Faria de Oliveira <email address hidden> Tue, 31 Oct 2023 19:21:59 -0300

Changed in multipath-tools (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package multipath-tools - 0.8.3-1ubuntu2.3

---------------
multipath-tools (0.8.3-1ubuntu2.3) focal; urgency=medium

  [ Jorge Merlino ]
  * Multipath devices not removed with high load (LP: #2039719)
    - d/p/lp2039719-1-libmultipath-make-dm_get_map-status-return-codes-sym.patch:
      change the return value of some functions from a boolean to symbolic codes
      to differentiate errors
    - d/p/lp2039719-2-multipathd-fix-check_path-errors-with-removed-map.patch:
      use the new error codes to change the error processing on the
      check_path() procedure

  [ Mauricio Faria de Oliveira ]
  * Add upstream fixes:
    - d/p/lp2039719-3-multipathd-fix-NULL-dereference-in-check_path.patch
    - d/p/lp2042366-dm_get_map-fix-segfault-when-can-t-found-target.patch
      (LP: #2042366)

 -- Jorge Merlino <email address hidden> Tue, 07 Nov 2023 18:20:27 -0300

Changed in multipath-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.