From 5ff713ed4ab8f5e07fc25bbf33e84826b566d137 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 19 2021 04:21:52 +0000 Subject: import iscsi-initiator-utils-6.2.1.4-3.git095f59c.el8 --- diff --git a/SOURCES/0024-iscsistart-fix-null-pointer-deref-before-exit.patch b/SOURCES/0024-iscsistart-fix-null-pointer-deref-before-exit.patch new file mode 100644 index 0000000..0b4be95 --- /dev/null +++ b/SOURCES/0024-iscsistart-fix-null-pointer-deref-before-exit.patch @@ -0,0 +1,42 @@ +From b9bf7cea4769efa73e6de9b13a8d1833d2ac3d92 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 16 Jun 2021 09:55:06 -0700 +Subject: [PATCH 1/1] iscsistart: fix null pointer deref before exit + +Fixes regression caused by "open-iscsi: Clean user_param list when +process exit" Which is a shame, as not freeing a memory at process exit +doesn't really hurt anything. + +Same change as "Fix iscsiadm segfault when exiting" applied to iscsiadm. + +Fixes: b532ad67d495d42026165a26515c645995d23f18 +Signed-off-by: Chris Leech +--- + usr/iscsistart.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/iscsistart.c b/usr/iscsistart.c +index 206cd4c..7eb573e 100644 +--- a/usr/iscsistart.c ++++ b/usr/iscsistart.c +@@ -361,7 +361,7 @@ int main(int argc, char *argv[]) + struct boot_context *context, boot_context; + struct sigaction sa_old; + struct sigaction sa_new; +- struct user_param *param; ++ struct user_param *param, *tmp_param; + int control_fd, mgmt_ipc_fd, err; + pid_t pid; + +@@ -556,7 +556,7 @@ int main(int argc, char *argv[]) + mgmt_ipc_close(mgmt_ipc_fd); + free_initiator(); + sysfs_cleanup(); +- list_for_each_entry(param, &user_params, list) { ++ list_for_each_entry_safe(param, tmp_param, &user_params, list) { + list_del(¶m->list); + idbm_free_user_param(param); + } +-- +2.31.1 + diff --git a/SPECS/iscsi-initiator-utils.spec b/SPECS/iscsi-initiator-utils.spec index 116bc60..687047a 100644 --- a/SPECS/iscsi-initiator-utils.spec +++ b/SPECS/iscsi-initiator-utils.spec @@ -13,7 +13,7 @@ Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.%{open_iscsi_version}.%{open_iscsi_build} -Release: 2.git%{shortcommit0}%{?dist} +Release: 3.git%{shortcommit0}%{?dist} Group: System Environment/Daemons License: GPLv2+ URL: http://www.open-iscsi.org @@ -44,6 +44,7 @@ Patch0020: 0020-fix-upstream-build-breakage-of-iscsiuio-LDFLAGS.patch Patch0021: 0021-use-Red-Hat-version-string-to-match-RPM-package-vers.patch Patch0022: 0022-iscsi_if.h-replace-zero-length-array-with-flexible-a.patch Patch0023: 0023-stop-using-Werror-for-now.patch +Patch0024: 0024-iscsistart-fix-null-pointer-deref-before-exit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units BuildRequires: autoconf automake libtool libmount-devel openssl-devel @@ -362,6 +363,9 @@ fi %{python3_sitearch}/* %changelog +* Wed Jun 16 2021 Chris Leech - 6.2.1.4-3.git095f59c +- coverity found a use-after-free regression in iscsistart + * Mon Jun 14 2021 Chris Leech - 6.2.1.4-2.git095f59c - 1924768 fix unit files for el8, not using iscsi-init