Compare commits
2 Commits
84919434bc
...
0aeba6cc23
Author | SHA1 | Date |
---|---|---|
Benjamin Marzinski | 0aeba6cc23 | |
Benjamin Marzinski | c1d4bd6a3c |
|
@ -0,0 +1,2 @@
|
|||
067d668de8e3a70b7c176bbf0c0616d5835bbe44 multipath-tools-0.8.7.tgz
|
||||
5d5e16cccc83fd78cf9b95e5c52cc41dbbeb1da7 multipath.conf
|
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 20:19:11 -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>
|
||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||
---
|
||||
multipathd/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 3eeca82f..26be6dc3 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -1487,7 +1487,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;
|
|
@ -0,0 +1,43 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 20:19:12 -0500
|
||||
Subject: [PATCH] multipathd: fix auto-resize configuration
|
||||
|
||||
The code acted like AUTO_RESIZE_UNDEFINED didn't exist, but since
|
||||
conf->auto_resize was never set to AUTO_RESIZE_NEVER, the default was in
|
||||
fact AUTO_RESIZE_UNDEFINED, which ended up getting treated like
|
||||
AUTO_RESIZE_GROW_SHRINK. Remove AUTO_RESIZE_UNDEFINED and explicitly
|
||||
default auto_resize tp AUTO_RESIZE_NEVER.
|
||||
|
||||
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||
---
|
||||
libmultipath/config.c | 1 +
|
||||
libmultipath/structs.h | 1 -
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index 61b0dd51..f31200a3 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -940,6 +940,7 @@ int _init_config (const char *file, struct config *conf)
|
||||
conf->retrigger_tries = DEFAULT_RETRIGGER_TRIES;
|
||||
conf->retrigger_delay = DEFAULT_RETRIGGER_DELAY;
|
||||
conf->uev_wait_timeout = DEFAULT_UEV_WAIT_TIMEOUT;
|
||||
+ conf->auto_resize = DEFAULT_AUTO_RESIZE;
|
||||
conf->remove_retries = 0;
|
||||
conf->ghost_delay = DEFAULT_GHOST_DELAY;
|
||||
conf->all_tg_pt = DEFAULT_ALL_TG_PT;
|
||||
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
|
||||
index 8c2d7131..d2ad4867 100644
|
||||
--- a/libmultipath/structs.h
|
||||
+++ b/libmultipath/structs.h
|
||||
@@ -168,7 +168,6 @@ enum queue_mode_states {
|
||||
};
|
||||
|
||||
enum auto_resize_state {
|
||||
- AUTO_RESIZE_UNDEF = 0,
|
||||
AUTO_RESIZE_NEVER,
|
||||
AUTO_RESIZE_GROW_ONLY,
|
||||
AUTO_RESIZE_GROW_SHRINK,
|
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Fri, 26 Jan 2024 15:40:42 -0500
|
||||
Subject: [PATCH] libmultipath: fix displaying auto_resize config setting
|
||||
|
||||
When 56476ebd3 ("multipathd: fix auto-resize configuration") removed
|
||||
AUTO_RESIZE_UNDEFINED, it didn't update print_auto_resize() to print
|
||||
a value for when it was set to 0 (which is now AUTO_RESIZE_NEVER).
|
||||
|
||||
Fixes: 56476ebd3 ("multipathd: fix auto-resize configuration")
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/dict.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
||||
index c4db60df..ce1b6c99 100644
|
||||
--- a/libmultipath/dict.c
|
||||
+++ b/libmultipath/dict.c
|
||||
@@ -1763,8 +1763,6 @@ def_auto_resize_handler(struct config *conf, vector strvec, const char *file,
|
||||
int
|
||||
print_auto_resize(struct strbuf *buff, long v)
|
||||
{
|
||||
- if (!v)
|
||||
- return 0;
|
||||
return append_strbuf_quoted(buff,
|
||||
v == AUTO_RESIZE_GROW_ONLY ? "grow_only" :
|
||||
v == AUTO_RESIZE_GROW_SHRINK ? "grow_shrink" :
|
|
@ -0,0 +1,40 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 9 Apr 2024 14:09:49 -0400
|
||||
Subject: [PATCH] libmultipath: actually truncate too-large vpd page.
|
||||
|
||||
When multipath notices that the vpd page is too large, it needs to
|
||||
actually truncate it. Also, whe calling parse_vpd_pg83() with a possibly
|
||||
truncated page, multipath needs to check that it actually has a whole
|
||||
vpd entry, before trying to use it.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/discovery.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index adf8bbaa..ae7eb7e6 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -1164,7 +1164,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
|
||||
int vpd_type, prio = -1, naa_prio;
|
||||
|
||||
d = in + 4;
|
||||
- while (d < in + in_len) {
|
||||
+ while (d + 4 <= in + in_len && d + d[3] + 4 <= in + in_len) {
|
||||
/* Select 'association: LUN' */
|
||||
if ((d[1] & 0x30) != 0) {
|
||||
d += d[3] + 4;
|
||||
@@ -1363,8 +1363,10 @@ get_vpd_sysfs (struct udev_device *parent, int pg, char * str, int maxlen)
|
||||
return -ENODATA;
|
||||
}
|
||||
buff_len = get_unaligned_be16(&buff[2]) + 4;
|
||||
- if (buff_len > 4096)
|
||||
+ if (buff_len > 4096) {
|
||||
condlog(3, "vpd pg%02x page truncated", pg);
|
||||
+ buff_len = 4096;
|
||||
+ }
|
||||
|
||||
if (pg == 0x80)
|
||||
len = parse_vpd_pg80(buff, str, maxlen);
|
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 9 Apr 2024 14:13:34 -0400
|
||||
Subject: [PATCH] kpartx: fix theoretical overflow in loop device name
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
kpartx/lopart.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kpartx/lopart.c b/kpartx/lopart.c
|
||||
index 9b652554..80ce1312 100644
|
||||
--- a/kpartx/lopart.c
|
||||
+++ b/kpartx/lopart.c
|
||||
@@ -159,7 +159,7 @@ char *find_loop_by_file(const char *filename)
|
||||
|
||||
char *find_unused_loop_device(void)
|
||||
{
|
||||
- char dev[20], *next_loop_dev = NULL;
|
||||
+ char dev[21], *next_loop_dev = NULL;
|
||||
int fd, next_loop = 0, somedev = 0, someloop = 0, loop_known = 0;
|
||||
struct stat statbuf;
|
||||
struct loop_info loopinfo;
|
|
@ -1,6 +1,6 @@
|
|||
Name: device-mapper-multipath
|
||||
Version: 0.8.7
|
||||
Release: 26%{?dist}
|
||||
Release: 28%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
|
@ -114,6 +114,11 @@ Patch0101: 0101-multipathd-Make-sure-to-disable-queueing-if-recovery.patch
|
|||
Patch0102: 0102-multipathd-remove-nopath-flushing-code-from-flush_ma.patch
|
||||
Patch0103: 0103-multipathd-make-flush_map-delete-maps-like-the-multi.patch
|
||||
Patch0104: 0104-multipathd-disable-queueing-when-removing-unknown-ma.patch
|
||||
Patch0105: 0105-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
|
||||
Patch0106: 0106-multipathd-fix-auto-resize-configuration.patch
|
||||
Patch0107: 0107-libmultipath-fix-displaying-auto_resize-config-setti.patch
|
||||
Patch0108: 0108-libmultipath-actually-truncate-too-large-vpd-page.patch
|
||||
Patch0109: 0109-kpartx-fix-theoretical-overflow-in-loop-device-name.patch
|
||||
|
||||
|
||||
# runtime
|
||||
|
@ -317,6 +322,20 @@ fi
|
|||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Tue Apr 9 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-28
|
||||
- Add 0108-libmultipath-actually-truncate-too-large-vpd-page.patch
|
||||
- Add 0109-kpartx-fix-theoretical-overflow-in-loop-device-name.patch
|
||||
* Fixes RHEL-31793 ("RHEL SAST Automation: address (selected) true positives")
|
||||
- Resolves: RHEL-31793
|
||||
|
||||
* Fri Jan 26 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-27
|
||||
- Add 0105-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
|
||||
- Add 0106-multipathd-fix-auto-resize-configuration.patch
|
||||
- Add 0107-libmultipath-fix-displaying-auto_resize-config-setti.patch
|
||||
* Fixes RHEL-986 ("Add option to allow multipathd to detect device
|
||||
resizes and autoresize.")
|
||||
- Resolves: RHEL-986
|
||||
|
||||
* Wed Jan 3 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-26
|
||||
- Add 0100-libmultipath-avoid-temporarily-enabling-queueing-on-.patch
|
||||
- Add 0101-multipathd-Make-sure-to-disable-queueing-if-recovery.patch
|
||||
|
|
Loading…
Reference in New Issue