diff --git a/0153-use-anolis-for-name.patch b/0153-use-red-hat-for-name.patch similarity index 63% rename from 0153-use-anolis-for-name.patch rename to 0153-use-red-hat-for-name.patch index c7420f1bac33f486f72d412c336e997551bad852..27da7b163959d4f3fa53b138b24347b214b41739 100644 --- a/0153-use-anolis-for-name.patch +++ b/0153-use-red-hat-for-name.patch @@ -1,7 +1,7 @@ -From 1ddee25396962a6bd966b98311881ed6d4cba87c Fri Jan 29 00:00:00 2021 -From: Liwei Ge -Date: Fri, 29 Jan 2021 16:40:04 -0800 -Subject: [PATCH] use anolis for name +From 7f12a1ca8fe699958903278d010cf22d0a98767b Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 19 Nov 2012 16:40:04 -0800 +Subject: use red hat for name --- doc/iscsi-iname.8 | 2 +- @@ -9,7 +9,7 @@ Subject: [PATCH] use anolis for name 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/iscsi-iname.8 b/doc/iscsi-iname.8 -index 6a413f6..dd77ed9 100644 +index a55d666d1af3..dd77ed9f3165 100644 --- a/doc/iscsi-iname.8 +++ b/doc/iscsi-iname.8 @@ -14,7 +14,7 @@ generates a unique iSCSI node name on every invocation. @@ -17,23 +17,23 @@ index 6a413f6..dd77ed9 100644 .TP .BI [-p=]\fIprefix\fP -Use the prefix passed in instead of the default "iqn.2005-03.org.open-iscsi" -+Use the prefix passed in instead of the default "iqn.2020-08.org.openanolis" ++Use the prefix passed in instead of the default "iqn.1994-05.com.redhat" .SH AUTHORS Open-iSCSI project diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c -index da850dc..29aa4ad 100644 +index 6347edc46293..cb2f6c8b8651 100644 --- a/utils/iscsi-iname.c +++ b/utils/iscsi-iname.c -@@ -80,7 +80,7 @@ main(int argc, char *argv[]) +@@ -73,7 +73,7 @@ main(int argc, char *argv[]) exit(0); } } else { - prefix = "iqn.2005-03.org.open-iscsi"; -+ prefix = "iqn.2020-08.org.openanolis"; ++ prefix = "iqn.1994-05.com.redhat"; } /* try to feed some entropy from the pool to MD5 in order to get -- -2.21.0 +2.9.5 diff --git a/0504-iscsiadm-buffer-overflow-regression-when-discovering.patch b/0504-iscsiadm-buffer-overflow-regression-when-discovering.patch new file mode 100644 index 0000000000000000000000000000000000000000..8513a0dd62cf52c2d2829901604a8a358fef189f --- /dev/null +++ b/0504-iscsiadm-buffer-overflow-regression-when-discovering.patch @@ -0,0 +1,28 @@ +From f1ad38e255da86e92003c63ae2927a64a8bce953 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Mon, 14 Sep 2020 14:09:56 -0700 +Subject: [PATCH 1/1] iscsiadm buffer overflow regression when discovering many + targets at once + +int_list type didn't zero the output string, so as the rec struct was reused +repeatedly during discovery it would keep growing with repeated values +triggering a strcat buffer overflow +--- + usr/idbm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/usr/idbm.c b/usr/idbm.c +index 8d80b33..0862d29 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -168,6 +168,7 @@ static struct idbm *db; + #define __recinfo_int_list(_key,_info,_rec,_name,_show,_tbl,_n,_mod) do { \ + _info[_n].type = TYPE_INT_LIST; \ + strlcpy(_info[_n].name, _key, NAME_MAXVAL); \ ++ _info[_n].value[0] = '\0'; \ + for(int _i = 0; _i < ARRAY_LEN(_rec->_name); _i++) { \ + if (_rec->_name[_i] != ~0) { \ + for (int _j = 0; _j < ARRAY_LEN(_tbl); _j++) { \ +-- +2.26.2 + diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index 321787f79db1d0668ea5523f008d27a2ad23e4d8..dbb26e940eb2b7b2d154dd8ac9dfdde83bce67e0 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -1,11 +1,10 @@ -%define anolis_release .0.1 %define open_iscsi_version 2.0 %define open_iscsi_build 874 Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.%{open_iscsi_version}.%{open_iscsi_build} -Release: 19%{anolis_release}%{?dist} +Release: 21%{?dist} Group: System Environment/Daemons License: GPLv2+ URL: http://www.open-iscsi.org @@ -78,7 +77,7 @@ Patch227: 0001-iscsid-Update-boot-gateway-information-during-sync_s.patch # distro specific modifications Patch351: 0151-update-initscripts-and-docs.patch Patch352: 0152-use-var-for-config.patch -Patch353: 0153-use-anolis-for-name.patch +Patch353: 0153-use-red-hat-for-name.patch Patch354: 0154-add-libiscsi.patch Patch356: 0156-remove-the-offload-boot-supported-ifdef.patch Patch359: 0159-iscsiuio-systemd-unit-files.patch @@ -109,6 +108,7 @@ Patch500: 0500-CHAP-SHA-1-SHA-256-SHA3-256-via-OpenSSL-s-libcrypto.patch Patch501: 0501-configuration-support-for-CHAP-algorithms.patch Patch502: 0502-CHAP-FIPS-backport-fixups.patch Patch503: 0503-fix-libiscsi-after-adding-libcrypto-requirement.patch +Patch504: 0504-iscsiadm-buffer-overflow-regression-when-discovering.patch BuildRequires: flex bison python-devel doxygen kmod-devel systemd-devel libmount-devel autoconf automake libtool openssl-devel # For dir ownership @@ -296,8 +296,8 @@ fi %dir %{_sharedstatedir}/iscsi/slp %dir %{_sharedstatedir}/iscsi/ifaces %dir %{_sharedstatedir}/iscsi/send_targets -%ghost %{_var}/lock/iscsi -%ghost %{_var}/lock/iscsi/lock +%ghost %attr(0700, -, -) %{_var}/lock/iscsi +%ghost %attr(0600, -, -) %{_var}/lock/iscsi/lock %{_unitdir}/iscsi.service %{_unitdir}/iscsi-onboot.service %{_unitdir}/iscsi-shutdown.service @@ -332,8 +332,11 @@ fi %{_includedir}/libiscsi.h %changelog -* Mon Oct 18 2021 Liwei Ge - 6.2.0.874-19.0.1 -- Use anolis for iqn name +* Mon Aug 09 2021 Chris Leech - 6.2.0.874-21 +- 1989972 set proper attr in rpm db for lockfiles, fixes rpm verificiation warning + +* Wed Sep 30 2020 Chris Leech - 6.2.0.874-20 +- 1881245 iscsiadm regression when discovering many targets at once * Thu Jul 02 2020 Chris Leech - 6.2.0.874-19 - 1851250 fix libiscsi for libcrypto requirement