From: Nicholas Bellinger Date: Wed, 28 May 2014 19:07:40 +0000 (-0700) Subject: iscsi-target: Reject zero-length payloads during SecurityNegotiation X-Git-Tag: omap-for-v3.16/fixes-against-rc1~26^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91f0abfda1709131edbd62ad3515da2b8e6c0261;p=pandora-kernel.git iscsi-target: Reject zero-length payloads during SecurityNegotiation This patch changes iscsi_target_handle_csg_zero() to explicitly reject login requests in SecurityNegotiation with a zero-length payload, following the language in RFC-3720 Section 8.2: Whenever an iSCSI target gets a response whose keys, or their values, are not according to the step definition, it MUST answer with a Login reject with the "Initiator Error" or "Missing Parameter" status. Previously when a zero-length login request in CSG=0 was received, the target would send a login response with CSG=0 + T_BIT=0 asking the initiator to complete authentication, and not fail the login until MAX_LOGIN_PDUS was reached. This change will now immediately fail the login attempt with ISCSI_STATUS_CLS_INITIATOR_ERR status. Reported-by: Tejas Vaykole Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed