Subject: Re: [tsvwg] Some unclear points about rfc4960 (SCTP).

From: "一念之后★だ" <[email-masked]>
Date: Fri, 20 Aug 2021 00:16:18 +0800

Hi，
Thanks very much for your replay.
I test lksctp and ncat(an accessory tool&nbsp; of nmap), the implementation of these SCTP protocol stack all have this problem:

when I sent the illegal init msg to 192.168.43.183(pkt 7), then 192.168.43.183 reply an Abort msg to peer point 192.168.43.184 with corresponding verificaiton Tag(pkt8), then the association break down.(Please see the attachment wireshark pcap file for detail)

pkt8 Abort msg:

ncat tool shows that "connection reset by peer" when received this Abort msg:

After reading section 5.2 of rfc4960, It seems that the description for this scenario is not very clear:

other sections of RFC 4960:

------------------&nbsp;Original&nbsp;------------------
From:                                                                                                                        "Claudio Porfiri"                                                                                    <[email-masked]&gt;;
Date:&nbsp;Wed, Aug 18, 2021 02:45 PM
To:&nbsp;"一念之后★だ"<[email-masked]&gt;;"[email-masked]"<[email-masked]&gt;;"[email-masked]"<[email-masked]&gt;;

Subject:&nbsp;RE: [tsvwg] Some unclear points about rfc4960 (SCTP).

Hi,

I think that behavior in case of duplicated INIT is quite well described in section 5.2

If there are implementation handling INIT without considering the Association’s Status, the fault is in those implementations not in the specification.

&nbsp;

Regards,

Claudio

&nbsp;

From: tsvwg <[email-masked]&gt; On Behalf Of ??????
Sent: Tuesday, August 17, 2021 6:57 PM
To: draft-ietf-tsvwg-2960bis <[email-masked]&gt;; tsvwg <[email-masked]&gt;
Subject: [tsvwg] Some unclear points about rfc4960 (SCTP).

&nbsp;

Dear IETF experts，

&nbsp;

I read rfc4960 (SCTP) and felt that there were some unclear descriptions in the document. I hope to get your reply, so I wrote this email to you. And I think it's better to describe these more clearly in the subsequent version of the RFC.

The following description describes some scenarios requiring abort Association in rfc4960:

Page25

Page26

Page30

Page31

Page56

As can be seen from the above description, when an init message or init ACK message is received,

(1)If the init tag in the message is 0, the association must be released

(2)If the mandatory parameters in the message are not fully carried, the association must be released

(3)When the OS value or MIS value in the message is 0, it is strongly recommended to release this association

&nbsp;

The following description also shows that there can only be one SCTP association between two SCTP endpoints at any time:

&nbsp;

Because init messages can be forged arbitrarily, take the scenario where the initial tag in init message is 0 as an example. 

In this scenario, a malicious attacker can destroy other associations at a very low cost:

For the other two scenarios, i.e. init message with missing mandatory parameters or init message with OS value / MIS value of 0, the effect may be similar.

I think from the original intention of the protocol design, these error scenarios should be handled according to the following. However, the RFC does not specify how to deal with the established association endpoint when receiving this wrong init (or init ACK) message, and whether the corresponding association should still be removed.

Unfortunately, the SCTP implementation of Linux will be affected by the attacks described above, such as the open source lksctp.

I hope to receive your reply to clarify the above unclear areas.

Thank you very much.

&nbsp;

Yours faithfully!

Zhouming.

---

From: Michael Tuexen <[email-masked]>
Date: Thu, 19 Aug 2021 21:20:45 +0200

> On 19. Aug 2021, at 18:16, 一念之后★だ <[email-masked]> wrote:
> 
> Hi，
> I test lksctp and ncat(an accessory tool  of nmap), the implementation of these SCTP protocol stack all have this problem:
> 
Which version of the Linux kernel are you using (what is the output of uname -a)?

Best regards
Michael
> ------------------ Original ------------------
> From: "Claudio Porfiri" <[email-masked]>;
> Date: Wed, Aug 18, 2021 02:45 PM
> To: "一念之后★だ"<[email-masked]>;"[email-masked]"<[email-masked]>;"[email-masked]"<[email-masked]>;
> Subject: RE: [tsvwg] Some unclear points about rfc4960 (SCTP).
> 
> Hi,
> 
> From: tsvwg <[email-masked]> On Behalf Of ??????
> To: draft-ietf-tsvwg-2960bis <[email-masked]>; tsvwg <[email-masked]>
> <sctp_illegal_init_msg.pcap>

---

From: Michael Tuexen <[email-masked]>
Date: Thu, 19 Aug 2021 21:48:52 +0200

> when I sent the illegal init msg to 192.168.43.183(pkt 7), then 192.168.43.183 reply an Abort msg to peer point 192.168.43.184 with corresponding verificaiton Tag(pkt8), then the association break…
I agree that the your attached .pcap file indicates that the implementation used has the bug
you are describing. I used packetdrill (from https://github.com/nplab/packetdrill) with the
attached script on a 5.11 kernel, and the attached script passes, which means that that
stack does not have the problem. I'm also attaching the corresponding .pcapng file.

So it seems that this bug was fixed recently in Linux, or am I missing something?

Best regards
Michael