• Nicholas Bellinger's avatar
    iscsi-target: Disable markers + remove dangerous local scope array usage · 2ff017f5
    Nicholas Bellinger authored
    This patch makes iscsi-target explictly disable OFMarker=Yes and IFMarker=yes
    parameter key usage during iscsi login by setting IFMarkInt_Reject and
    OFMarkInt_Reject values in iscsi_enforce_integrity_rules() to effectively
    disable iscsi marker usage.  With this patch, an initiator proposer asking
    to enable either marker parameter keys will be issued a 'No' response, and
    the target sets OFMarkInt + IFMarkInt parameter key response to 'Irrelevant'.
    
    With markers disabled during iscsi login, this patch removes the problematic
    on-stack local-scope array for marker intervals in iscsit_do_rx_data() +
    iscsit_do_tx_data(), and other related marker code in iscsi_target_util.c.
    This fixes a potentional stack smashing scenario with small range markers
    enabled and a large MRDSL as reported by DanC here:
    
    [bug report] target: stack can be smashed
    http://www.spinics.net/lists/target-devel/msg00453.htmlReported-by: default avatarDan Carpenter <error27@gmail.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    2ff017f5
iscsi_target_parameters.c 51.3 KB