faye-websocket ruby-3.1 passenger - Case 6.4.1 : Non-Strict - 2007 ms @ 2023-09-07T20:38:50.556Z
Case Description
Send invalid UTF-8 text message in 3 fragments (frames).
First frame payload is valid, then wait, then 2nd frame which contains the payload making the sequence invalid, then wait, then 3rd frame with rest.
Note that PART1 and PART3 are valid UTF-8 in themselves, PART2 is a 0x110000 encoded as in the UTF-8 integer encoding scheme, but the codepoint is invalid (out of range).
MESSAGE PARTS:
PART1 = cebae1bdb9cf83cebcceb5
PART2 = f4908080
PART3 = 656469746564
Case Expectation
The first frame is accepted, we expect to timeout on the first wait. The 2nd frame should be rejected immediately (fail fast on UTF-8). If we timeout, we expect the connection is failed at least then, since the complete message payload is not valid UTF-8.
Case Outcome
Actual events match at least one expected.
Expected:
{'NON-STRICT': [('timeout', 'A'), ('timeout', 'B')], 'OK': [('timeout', 'A')]}
Observed:
[('timeout', 'A'), ('timeout', 'B')]
Case Closing Behavior
Connection was properly closed (OK)
GET / HTTP/1.1 User-Agent: AutobahnTestSuite/0.8.2-0.10.9 Host: 127.0.0.1:7012 Upgrade: WebSocket Connection: Upgrade Pragma: no-cache Cache-Control: no-cache Sec-WebSocket-Key: 2R+6mOMs6LjgNTLs5Zgopw== Sec-WebSocket-Version: 13
HTTP/1.1 101 Switching Protocols Connection: upgrade Status: 101 Switching Protocols Upgrade: websocket Sec-WebSocket-Accept: SdgbmsJMxvj1WR5uBScfx2DQEWI= Date: Thu, 07 Sep 2023 20:38:50 GMT X-Powered-By: Phusion Passenger(R) 6.0.18 Server: nginx/1.24.0 + Phusion Passenger(R) 6.0.18
Key | Value | Description |
isServer | False | True, iff I (the fuzzer) am a server, and the peer is a client. |
closedByMe | False | True, iff I have initiated closing handshake (that is, did send close first). |
failedByMe | False | True, iff I have failed the WS connection (i.e. due to protocol error). Failing can be either by initiating closing handshake or brutal drop TCP. |
droppedByMe | False | True, iff I dropped the TCP connection. |
wasClean | True | True, iff full WebSocket closing handshake was performed (close frame sent and received) _and_ the server dropped the TCP (which is its responsibility). |
wasNotCleanReason | None | When wasClean == False, the reason what happened. |
wasServerConnectionDropTimeout | False | When we are a client, and we expected the server to drop the TCP, but that didn't happen in time, this gets True. |
wasOpenHandshakeTimeout | False | When performing the opening handshake, but the peer did not finish in time, this gets True. |
wasCloseHandshakeTimeout | False | When we initiated a closing handshake, but the peer did not respond in time, this gets True. |
localCloseCode | 1000 | The close code I sent in close frame (if any). |
localCloseReason | None | The close reason I sent in close frame (if any). |
remoteCloseCode | 1007 | The close code the peer sent me in close frame (if any). |
remoteCloseReason | Could not decode a text frame as UTF-8 | The close reason the peer sent me in close frame (if any). |
Chop Size | Count | Octets |
42 | 1 | 42 |
294 | 1 | 294 |
Total | 2 | 336 |
Chop Size | Count | Octets |
8 | 1 | 8 |
10 | 1 | 10 |
12 | 1 | 12 |
17 | 1 | 17 |
240 | 1 | 240 |
Total | 5 | 287 |
Opcode | Count |
8 | 1 |
Total | 1 |
Opcode | Count |
0 | 2 |
1 | 1 |
8 | 1 |
Total | 4 |
000 TX OCTETS: 474554202f20485454502f312e310d0a557365722d4167656e743a204175746f6261686e5465737453756974652f302e382e
322d302e31302e390d0a486f7374 ...
001 RX OCTETS: 485454502f312e312031303120537769746368696e672050726f746f636f6c730d0a436f6e6e656374696f6e3a2075706772
6164650d0a5374617475733a2031 ...
002 TX FRAME : OPCODE=1, FIN=False, RSV=0, PAYLOAD-LEN=11, MASK=a35a9516, PAYLOAD-REPEAT-LEN=None, CHOPSIZE=None, SYNC=False
κόσμε
003 TX OCTETS: 018ba35a95166de074ab1a9516d81f9420
004 DELAY 1.000000 sec for TAG A
005 DELAY TIMEOUT on TAG A
006 TX FRAME : OPCODE=0, FIN=False, RSV=0, PAYLOAD-LEN=4, MASK=247b568d, PAYLOAD-REPEAT-LEN=None, CHOPSIZE=None, SYNC=False
0xf4908080
007 TX OCTETS: 0084247b568dd0ebd60d
008 DELAY 1.000000 sec for TAG B
009 DELAY TIMEOUT on TAG B
010 TX FRAME : OPCODE=0, FIN=True, RSV=0, PAYLOAD-LEN=6, MASK=eb9a7e56, PAYLOAD-REPEAT-LEN=None, CHOPSIZE=None, SYNC=False
edited
011 TX OCTETS: 8086eb9a7e568efe17228efe
012 FAIL CONNECTION AFTER 1.000000 sec
013 RX OCTETS: 882803ef436f756c64206e6f74206465636f646520612074657874206672616d65206173205554462d38
014 RX FRAME : OPCODE=8, FIN=True, RSV=0, PAYLOAD-LEN=40, MASKED=False, MASK=None
0x03ef436f756c64206e6f74206465636f646520612074657874206672616d65206173205554462d38
015 TX FRAME : OPCODE=8, FIN=True, RSV=0, PAYLOAD-LEN=2, MASK=2660b744, PAYLOAD-REPEAT-LEN=None, CHOPSIZE=None, SYNC=False
0x03e8
016 TX OCTETS: 88822660b7442588
017 TCP DROPPED BY PEER