device-mapper-multipath/SOURCES/0067-libmultipath-avoid-infinite-loop-with-bad-vpd-page-8.patch
2021-09-09 15:58:56 +00:00

33 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 25 Mar 2021 19:52:43 -0500
Subject: [PATCH] libmultipath: avoid infinite loop with bad vpd page 83
identifier
If a device with a scsi name identifier has an unknown prefix,
parse_vpd_pg83() needs to advance to the next identifier, instead of
simply trying the same one again in an infinite loop.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
---
libmultipath/discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index bc267609..8c2ab073 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1101,7 +1101,7 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
if (memcmp(d + 4, "eui.", 4) &&
memcmp(d + 4, "naa.", 4) &&
memcmp(d + 4, "iqn.", 4))
- continue;
+ break;
if (prio < 4) {
prio = 4;
vpd = d;
--
2.17.2