|
@@ -2412,8 +2412,15 @@ static sctp_disposition_t __sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
|
|
|
|
|
|
/* See if we have an error cause code in the chunk. */
|
|
/* See if we have an error cause code in the chunk. */
|
|
len = ntohs(chunk->chunk_hdr->length);
|
|
len = ntohs(chunk->chunk_hdr->length);
|
|
- if (len >= sizeof(struct sctp_chunkhdr) + sizeof(struct sctp_errhdr))
|
|
|
|
|
|
+ if (len >= sizeof(struct sctp_chunkhdr) + sizeof(struct sctp_errhdr)) {
|
|
|
|
+
|
|
|
|
+ sctp_errhdr_t *err;
|
|
|
|
+ sctp_walk_errors(err, chunk->chunk_hdr);
|
|
|
|
+ if ((void *)err != (void *)chunk->chunk_end)
|
|
|
|
+ return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
|
|
|
|
+
|
|
error = ((sctp_errhdr_t *)chunk->skb->data)->cause;
|
|
error = ((sctp_errhdr_t *)chunk->skb->data)->cause;
|
|
|
|
+ }
|
|
|
|
|
|
sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET));
|
|
sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET));
|
|
/* ASSOC_FAILED will DELETE_TCB. */
|
|
/* ASSOC_FAILED will DELETE_TCB. */
|