🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.bugs
2 messages
2 total messages Started by bugzilla-noreply Sat, 28 Nov 2026 04:54
[Bug 301211] SCTP peer restart leaves ecn_echo_cnt_onq inconsistent with the control queue
#822
Author: bugzilla-noreply
Date: Sat, 28 Nov 2026 04:54
74 lines
4447 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301211

            Bug ID: 301211
           Summary: SCTP peer restart leaves ecn_echo_cnt_onq inconsistent
                    with the control queue
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: lee@jaeyeong.cc

During SCTP peer restart handling, sctp_process_cookie_existing() removes
all chunks from asoc->control_send_queue and resets ctrl_queue_cnt to zero,
but does not reset ecn_echo_cnt_onq.

The relevant code is in sys/netinet/sctp_input.c:

        TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue,
            sctp_next, nchk) {
                TAILQ_REMOVE(&asoc->control_send_queue, chk,
                    sctp_next);
                ...
                SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
                SCTP_DECR_CHK_COUNT();
        }
        asoc->ctrl_queue_cnt = 0;

ecn_echo_cnt_onq counts the ECN-Echo chunks in the same control queue.
After the queue is emptied, it may therefore remain non-zero even though
there are no ECN-Echo chunks left.

The SCTP output path compares ctrl_queue_cnt with ecn_echo_cnt_onq to
determine whether the queue contains only ECN-Echo chunks.  A stale
ecn_echo_cnt_onq can consequently prevent unrelated control chunks such
as COOKIE-ACK, SACK, or SHUTDOWN from being transmitted.

I reproduced this on FreeBSD CURRENT with an ECN-enabled SCTP association.
A CE-marked packet caused an ECN-Echo chunk to be queued.  The peer was
then restarted while that chunk remained queued.

Before restart:

        control queue head: ECN-Echo
        ctrl_queue_cnt: 1
        ecn_echo_cnt_onq: 1

After restart, the control queue contained one COOKIE-ACK, but the
counters were:

        ctrl_queue_cnt: 1
        ecn_echo_cnt_onq: 1

The output path treated the COOKIE-ACK as if it were an ECN-Echo-only
queue and did not transmit it.  The peer repeatedly retransmitted
COOKIE-ECHO.  A subsequently queued SHUTDOWN chunk was also not
transmitted.

Since the restart path removes every element from control_send_queue,
ecn_echo_cnt_onq should also be reset to zero together with
ctrl_queue_cnt.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 301211] SCTP peer restart leaves ecn_echo_cnt_onq inconsistent with the control queue
#823
Author: bugzilla-noreply
Date: Sat, 28 Nov 2026 07:48
16 lines
2520 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301211

Mark Linimon <linimon@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bugs@FreeBSD.org            |net@FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads