All of lore.kernel.org
 help / color / mirror / Atom feed
* draft-stewart-tsvwg-sctp-ipv4 enforcement
@ 2021-06-17 19:01 Sérgio
  2021-06-18 16:35 ` Xin Long
  0 siblings, 1 reply; 4+ messages in thread
From: Sérgio @ 2021-06-17 19:01 UTC (permalink / raw)
  To: linux-sctp

Hello,

I am troubleshooting a deployment with SCTP and eventually found that
the client has configured the equipment using addresses within the
RFC2544 annex C.2.2 test network (198.18.0.0/15).

Although I think the deployment network may be changed to use another
address space in order to "solve" the issue, the restriction
enforcement on the SCTP kernel driver (implemented by function
sctp_v4_addr_valid -- net/sctp/protocol.c -- in expansion of
IS_IPV4_UNUSABLE_ADDRESS -- include/net/sctp/consntans.h) seems odd to
me, because the address is a valid unicast IPv4 address and should be
acceptable as per RFC4960 clause 8.4:

   The receiver of an OOTB packet MUST do the following:

   1)  If the OOTB packet is to or from a non-unicast address, a
       receiver SHOULD silently discard the packet.  Otherwise,

The source code states that this restriction came from
draft-stewart-tsvwg-sctp-ipv4, which is true, and the sysctl
net.sctp.addr_scope_policy is documented in ip-sysctl.txt as a switch
for the desired draft behavior, but changing the sysctl value has no
effect because IS_IPV4_UNUSABLE_ADDRESS macro expansion has no
verification of any sysctl configuration nor the sctp_v4_addr_valid.

The draft-stewart-tsvwg-sctp-ipv4 enforcement seems like a bug or I am
missing something?

Best Regards,
Sérgio Surkamp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: draft-stewart-tsvwg-sctp-ipv4 enforcement
  2021-06-17 19:01 draft-stewart-tsvwg-sctp-ipv4 enforcement Sérgio
@ 2021-06-18 16:35 ` Xin Long
  2021-06-18 20:35   ` Michael Tuexen
  0 siblings, 1 reply; 4+ messages in thread
From: Xin Long @ 2021-06-18 16:35 UTC (permalink / raw)
  To: Sérgio, Michael Tuexen; +Cc: linux-sctp @ vger . kernel . org

On Thu, Jun 17, 2021 at 4:40 PM Sérgio <surkamp@gmail.com> wrote:
>
> Hello,
>
> I am troubleshooting a deployment with SCTP and eventually found that
> the client has configured the equipment using addresses within the
> RFC2544 annex C.2.2 test network (198.18.0.0/15).
>
> Although I think the deployment network may be changed to use another
> address space in order to "solve" the issue, the restriction
> enforcement on the SCTP kernel driver (implemented by function
> sctp_v4_addr_valid -- net/sctp/protocol.c -- in expansion of
> IS_IPV4_UNUSABLE_ADDRESS -- include/net/sctp/consntans.h) seems odd to
> me, because the address is a valid unicast IPv4 address and should be
> acceptable as per RFC4960 clause 8.4:
>
>    The receiver of an OOTB packet MUST do the following:
>
>    1)  If the OOTB packet is to or from a non-unicast address, a
>        receiver SHOULD silently discard the packet.  Otherwise,
>
> The source code states that this restriction came from
> draft-stewart-tsvwg-sctp-ipv4, which is true, and the sysctl
> net.sctp.addr_scope_policy is documented in ip-sysctl.txt as a switch
> for the desired draft behavior, but changing the sysctl value has no
> effect because IS_IPV4_UNUSABLE_ADDRESS macro expansion has no
> verification of any sysctl configuration nor the sctp_v4_addr_valid.
>
> The draft-stewart-tsvwg-sctp-ipv4 enforcement seems like a bug or I am
> missing something?
>
There must be a reason for not using 198.18.0.0/24 in SCTP, as in

  https://datatracker.ietf.org/doc/html/draft-stewart-tsvwg-sctp-ipv4-00#section-3.1

   [1]  IANA, I., "Special-Use IPv4 Addresses", draft-iana-special-ipv4-
        03 (work in progress), April 2002.

https://datatracker.ietf.org/doc/html/draft-iana-special-ipv4-03

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: draft-stewart-tsvwg-sctp-ipv4 enforcement
  2021-06-18 16:35 ` Xin Long
@ 2021-06-18 20:35   ` Michael Tuexen
  2021-06-18 20:54     ` Xin Long
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Tuexen @ 2021-06-18 20:35 UTC (permalink / raw)
  To: Xin Long; +Cc: Sérgio, linux-sctp @ vger . kernel . org

> On 18. Jun 2021, at 18:35, Xin Long <lucien.xin@gmail.com> wrote:
> 
> On Thu, Jun 17, 2021 at 4:40 PM Sérgio <surkamp@gmail.com> wrote:
>> 
>> Hello,
>> 
>> I am troubleshooting a deployment with SCTP and eventually found that
>> the client has configured the equipment using addresses within the
>> RFC2544 annex C.2.2 test network (198.18.0.0/15).
>> 
>> Although I think the deployment network may be changed to use another
>> address space in order to "solve" the issue, the restriction
>> enforcement on the SCTP kernel driver (implemented by function
>> sctp_v4_addr_valid -- net/sctp/protocol.c -- in expansion of
>> IS_IPV4_UNUSABLE_ADDRESS -- include/net/sctp/consntans.h) seems odd to
>> me, because the address is a valid unicast IPv4 address and should be
>> acceptable as per RFC4960 clause 8.4:
>> 
>>   The receiver of an OOTB packet MUST do the following:
>> 
>>   1)  If the OOTB packet is to or from a non-unicast address, a
>>       receiver SHOULD silently discard the packet.  Otherwise,
>> 
>> The source code states that this restriction came from
>> draft-stewart-tsvwg-sctp-ipv4, which is true, and the sysctl
>> net.sctp.addr_scope_policy is documented in ip-sysctl.txt as a switch
>> for the desired draft behavior, but changing the sysctl value has no
>> effect because IS_IPV4_UNUSABLE_ADDRESS macro expansion has no
>> verification of any sysctl configuration nor the sctp_v4_addr_valid.
>> 
>> The draft-stewart-tsvwg-sctp-ipv4 enforcement seems like a bug or I am
>> missing something?
>> 
> There must be a reason for not using 198.18.0.0/24 in SCTP, as in
> 
>  https://datatracker.ietf.org/doc/html/draft-stewart-tsvwg-sctp-ipv4-00#section-3.1
> 
>   [1]  IANA, I., "Special-Use IPv4 Addresses", draft-iana-special-ipv4-
>        03 (work in progress), April 2002.
> 
> https://datatracker.ietf.org/doc/html/draft-iana-special-ipv4-03
I think not allowing it at all is wrong.
https://datatracker.ietf.org/doc/html/rfc6890
states that it is not global. So maybe level 3 would be more appropriate.

Please note, the ID was never published as an RFC, so there might be more
errors...

Best regards
Michael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: draft-stewart-tsvwg-sctp-ipv4 enforcement
  2021-06-18 20:35   ` Michael Tuexen
@ 2021-06-18 20:54     ` Xin Long
  0 siblings, 0 replies; 4+ messages in thread
From: Xin Long @ 2021-06-18 20:54 UTC (permalink / raw)
  To: Michael Tuexen; +Cc: Sérgio, linux-sctp @ vger . kernel . org

On Fri, Jun 18, 2021 at 4:35 PM Michael Tuexen <tuexen@freebsd.org> wrote:
>
> > On 18. Jun 2021, at 18:35, Xin Long <lucien.xin@gmail.com> wrote:
> >
> > On Thu, Jun 17, 2021 at 4:40 PM Sérgio <surkamp@gmail.com> wrote:
> >>
> >> Hello,
> >>
> >> I am troubleshooting a deployment with SCTP and eventually found that
> >> the client has configured the equipment using addresses within the
> >> RFC2544 annex C.2.2 test network (198.18.0.0/15).
> >>
> >> Although I think the deployment network may be changed to use another
> >> address space in order to "solve" the issue, the restriction
> >> enforcement on the SCTP kernel driver (implemented by function
> >> sctp_v4_addr_valid -- net/sctp/protocol.c -- in expansion of
> >> IS_IPV4_UNUSABLE_ADDRESS -- include/net/sctp/consntans.h) seems odd to
> >> me, because the address is a valid unicast IPv4 address and should be
> >> acceptable as per RFC4960 clause 8.4:
> >>
> >>   The receiver of an OOTB packet MUST do the following:
> >>
> >>   1)  If the OOTB packet is to or from a non-unicast address, a
> >>       receiver SHOULD silently discard the packet.  Otherwise,
> >>
> >> The source code states that this restriction came from
> >> draft-stewart-tsvwg-sctp-ipv4, which is true, and the sysctl
> >> net.sctp.addr_scope_policy is documented in ip-sysctl.txt as a switch
> >> for the desired draft behavior, but changing the sysctl value has no
> >> effect because IS_IPV4_UNUSABLE_ADDRESS macro expansion has no
> >> verification of any sysctl configuration nor the sctp_v4_addr_valid.
> >>
> >> The draft-stewart-tsvwg-sctp-ipv4 enforcement seems like a bug or I am
> >> missing something?
> >>
> > There must be a reason for not using 198.18.0.0/24 in SCTP, as in
> >
> >  https://datatracker.ietf.org/doc/html/draft-stewart-tsvwg-sctp-ipv4-00#section-3.1
> >
> >   [1]  IANA, I., "Special-Use IPv4 Addresses", draft-iana-special-ipv4-
> >        03 (work in progress), April 2002.
> >
> > https://datatracker.ietf.org/doc/html/draft-iana-special-ipv4-03
> I think not allowing it at all is wrong.
> https://datatracker.ietf.org/doc/html/rfc6890
> states that it is not global. So maybe level 3 would be more appropriate.
>
I will fix it, thanks.

> Please note, the ID was never published as an RFC, so there might be more
> errors...
>
> Best regards
> Michael
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-18 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 19:01 draft-stewart-tsvwg-sctp-ipv4 enforcement Sérgio
2021-06-18 16:35 ` Xin Long
2021-06-18 20:35   ` Michael Tuexen
2021-06-18 20:54     ` Xin Long

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.