From c19c2ac43cc88cfeacd8fb90ca1496649b0b4359 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jan 26 2014 11:56:17 +0000 Subject: import libiscsi-1.9.0-6.el7.src.rpm --- diff --git a/SOURCES/0031-fix-CHAP-authentication.patch b/SOURCES/0031-fix-CHAP-authentication.patch new file mode 100644 index 0000000..56ed127 --- /dev/null +++ b/SOURCES/0031-fix-CHAP-authentication.patch @@ -0,0 +1,89 @@ +fix CHAP authentication + +Message-id: <1386865659-20686-1-git-send-email-pbonzini@redhat.com> +Patchwork-id: 56264 +O-Subject: [RHEL7.0 libiscsi PATCH] fix CHAP authentication +Bugzilla: 1032358 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Bandan Das +RH-Acked-by: Laszlo Ersek + +Empty discovery and login packets are legal, and have the same behavior +as packets with a single NUL in them. Introduced by commit 94d73fc +(Merge pull request #83 from bonzini/coverity, 2013-11-05). + +Reported-by: John Ferlan +Signed-off-by: Paolo Bonzini +--- + See the rhvirt-patches message with ID + <1383729402-27559-11-git-send-email-pbonzini@redhat.com> + + lib/discovery.c | 11 ++--------- + lib/login.c | 12 ++---------- + 2 files changed, 4 insertions(+), 19 deletions(-) +diff --git a/lib/discovery.c b/lib/discovery.c +index 8301bea..2870bd6 100644 +--- a/lib/discovery.c ++++ b/lib/discovery.c +@@ -118,15 +118,8 @@ iscsi_process_text_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, + pdu->private_data); + return -1; + } +- if (size == 0) { +- iscsi_set_error(iscsi, "size == 0 when parsing " +- "discovery data"); +- pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL, +- pdu->private_data); +- return -1; +- } + +- do { ++ while (size > 0) { + unsigned char *end; + int len; + +@@ -204,7 +197,7 @@ iscsi_process_text_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, + + ptr += len + 1; + size -= len + 1; +- } while (size > 0); ++ } + + pdu->callback(iscsi, SCSI_STATUS_GOOD, targets, pdu->private_data); + iscsi_free_discovery_addresses(iscsi, targets); +diff --git a/lib/login.c b/lib/login.c +index 9a7347f..c524108 100644 +--- a/lib/login.c ++++ b/lib/login.c +@@ -982,21 +982,13 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, + iscsi->maxcmdsn = maxcmdsn; + } + +- if (size == 0) { +- iscsi_set_error(iscsi, "size == 0 when parsing " +- "login data"); +- pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL, +- pdu->private_data); +- return -1; +- } +- + /* XXX here we should parse the data returned in case the target + * renegotiated some some parameters. + * we should also do proper handshaking if the target is not yet + * prepared to transition to the next stage + */ + +- do { ++ while (size > 0) { + char *end; + int len; + +@@ -1087,7 +1079,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, + + ptr += len + 1; + size -= len + 1; +- } while (size > 0); ++ } + + if (status == SCSI_STATUS_REDIRECT && iscsi->target_address[0]) { + ISCSI_LOG(iscsi, 2, "target requests redirect to %s",iscsi->target_address); diff --git a/SPECS/libiscsi.spec b/SPECS/libiscsi.spec index 3c0b0e6..da77cb2 100644 --- a/SPECS/libiscsi.spec +++ b/SPECS/libiscsi.spec @@ -1,7 +1,7 @@ Name: libiscsi Summary: iSCSI client library Version: 1.9.0 -Release: 3%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: https://github.com/sahlberg/%{name} @@ -36,6 +36,7 @@ Patch27: 0027-do-not-test-arrays-against-NULL.patch Patch28: 0028-handle-bad-iscsi--fd-in-iscsi_service.patch Patch29: 0029-rework-login-and-discovery-code-to-avoid-strlen-beyond-end-of-data.patch Patch30: 0030-check-for-a-target-being-there-before-processing-TargetAddress.patch +Patch31: 0031-fix-CHAP-authentication.patch BuildRequires: autoconf BuildRequires: automake @@ -86,6 +87,7 @@ a network. %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 %build sh autogen.sh @@ -145,6 +147,16 @@ The libiscsi-devel package includes the header files for libiscsi. %{_libdir}/pkgconfig/libiscsi.pc %changelog +* Fri Jan 24 2014 Daniel Mach - 1.9.0-6 +- Mass rebuild 2014-01-24 + +* Thu Jan 16 2014 Miroslav Rezanina - 1.9.0-5 +- fix CHAP authentication (bz #1032358) +- Resolves: #1032358 + +* Fri Dec 27 2013 Daniel Mach - 1.9.0-4 +- Mass rebuild 2013-12-27 + * Thu Nov 07 2013 Miroslav Rezanina - 1.9.0-3 - Fixed issues reported by coverity (bz #1026820) - Do not mark /etc/ld.so.conf.d/ as config (bz #1011126)