https://bz.apache.org/bugzilla/show_bug.cgi?id=70303

            Bug ID: 70303
           Summary: RFC 9113 §6.10: RST_STREAM during in-progress header
                    block should be a PROTOCOL_ERROR connection error
           Product: Tomcat 11
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: -------

RFC 9113 §6.10 states:

  "A receiver MUST treat the receipt of any other type of frame or a frame
  on a different stream as a connection error (Section 5.4.1) of type
  PROTOCOL_ERROR."

This applies to every frame received while a header block is in progress
(i.e., after a HEADERS or PUSH_PROMISE frame without the END_HEADERS flag).
RST_STREAM is not exempt.

Http2Parser.validateFrame() had two defects:

1. Wrong error code: mid-header-block violations (CONTINUATION on a different
   stream, or any non-CONTINUATION frame) were reported with COMPRESSION_ERROR
   instead of the required PROTOCOL_ERROR.

2. RST_STREAM carve-out: a NO-OP branch silently accepted RST_STREAM on the
   same stream as the in-progress header block, resetting the internal header
   state without sending a connection error.

Fix proposed in: https://github.com/apache/tomcat/pull/1137

The fix removes the RST_STREAM carve-out and corrects the error code to
PROTOCOL_ERROR in both mid-header-block violation sites. A new regression
test (TestHttp2Section_4_3.testHeaderContinuationInterruptedByRst) proves
the fix red-to-green.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to