Skip to content
  • Xin Long's avatar
    sctp: process duplicated strreset asoc request correctly · 6c801387
    Xin Long authored
    
    
    This patch is to fix the replay attack issue for strreset asoc requests.
    
    When a duplicated strreset asoc request is received, reply it with bad
    seqno if it's seqno < asoc->strreset_inseq - 2, and reply it with the
    result saved in asoc if it's seqno >= asoc->strreset_inseq - 2.
    
    But note that if the result saved in asoc is performed, the sender's next
    tsn and receiver's next tsn for the response chunk should be set. It's
    safe to get them from asoc. Because if it's changed, which means the peer
    has received the response already, the new response with wrong tsn won't
    be accepted by peer.
    
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6c801387