device-mapper-multipath/0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
Benjamin Marzinski 835a8a43de device-mapper-multipath-0.9.7-5
Add 0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
  * Fix auto_resize code to avoid a segfault
Add 0015-multipathd-fix-auto-resize-configuration.patch
  * Fix auto_resize default value
2024-01-16 23:52:22 -05:00

28 lines
939 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Tue, 16 Jan 2024 00:54:37 -0500
Subject: [PATCH] multipathd: fix null pointer dereference in uev_update_path
The Auto-resize code added a check that deferences pp->mpp without
checking that it's non-NULL. Fix it.
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 230c9d10..57c04364 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1653,7 +1653,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
}
}
}
- if (auto_resize != AUTO_RESIZE_NEVER &&
+ if (auto_resize != AUTO_RESIZE_NEVER && mpp &&
!mpp->wait_for_udev) {
struct pathgroup *pgp;
struct path *pp2;