aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statefuns.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-12-20 17:13:31 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:25 -0500
commitd6701191329b51793bc56724548f0863d2149c29 (patch)
tree2833f850724af85622b844d27f42e285176e2f7f /net/sctp/sm_statefuns.c
parent75205f478331cc64ce729ea72d3c8c1837fb59cb (diff)
[SCTP]: Follow Add-IP security consideratiosn wrt INIT/INIT-ACK
The Security Considerations section of RFC 5061 has the following text: If an SCTP endpoint that supports this extension receives an INIT that indicates that the peer supports the ASCONF extension but does NOT support the [RFC4895] extension, the receiver of such an INIT MUST send an ABORT in response. Note that an implementation is allowed to silently discard such an INIT as an option as well, but under NO circumstance is an implementation allowed to proceed with the association setup by sending an INIT-ACK in response. An implementation that receives an INIT-ACK that indicates that the peer does not support the [RFC4895] extension MUST NOT send the COOKIE-ECHO to establish the association. Instead, the implementation MUST discard the INIT-ACK and report to the upper- layer user that an association cannot be established destroying the Transmission Control Block (TCB). Follow the recomendations. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r--net/sctp/sm_statefuns.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 0c9f37eb7d8d..511d8c9a171a 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -507,7 +507,9 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
507 &err_chunk)) { 507 &err_chunk)) {
508 508
509 /* This chunk contains fatal error. It is to be discarded. 509 /* This chunk contains fatal error. It is to be discarded.
510 * Send an ABORT, with causes if there is any. 510 * Send an ABORT, with causes. If there are no causes,
511 * then there wasn't enough memory. Just terminate
512 * the association.
511 */ 513 */
512 if (err_chunk) { 514 if (err_chunk) {
513 packet = sctp_abort_pkt_new(ep, asoc, arg, 515 packet = sctp_abort_pkt_new(ep, asoc, arg,
@@ -526,9 +528,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
526 } else { 528 } else {
527 error = SCTP_ERROR_NO_RESOURCE; 529 error = SCTP_ERROR_NO_RESOURCE;
528 } 530 }
529 } else {
530 sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
531 error = SCTP_ERROR_INV_PARAM;
532 } 531 }
533 532
534 /* SCTP-AUTH, Section 6.3: 533 /* SCTP-AUTH, Section 6.3: