Skip to content

websockets, check for negative payload lengths - #12707

Closed
icing wants to merge 6 commits into
curl:masterfrom
icing:ws-dec-large
Closed

icing wants to merge 6 commits into
curl:masterfrom
icing:ws-dec-large

Conversation

@icing

@icing icing commented Jan 15, 2024

Copy link
Copy Markdown
Contributor
  • in en- and decoding, check the websocket frame payload lengths for negative values (from curl_off_t) and error the operation in that case

@github-actions github-actions Bot added the tests label Jan 15, 2024
Comment thread lib/ws.c Resolved
@bagder

bagder commented Jan 15, 2024

Copy link
Copy Markdown
Member

Except that ASAN complains on the new test:

ws.c:228:52: runtime error: left shift of 255 by 56 places cannot be represented in type 'curl_off_t' (aka 'long')

icing added 2 commits January 15, 2024 17:54
- in en- and decoding, check the websocket frame payload
  lengths for negative values (from curl_off_t) and error
  the operation in that case
@jay

jay commented Jan 15, 2024

Copy link
Copy Markdown
Member

lgtm but hyper ci is failing:

test 2307...[WebSockets, overlong PING payload]

lib2302 returned 52, when expecting 23
 2307: exit FAILED

@bagder

bagder commented Jan 15, 2024

Copy link
Copy Markdown
Member

lib2302 returned 52, when expecting 23

it is really complicated sometimes to get the same error codes for hyper but 52 (CURLE_GOT_NOTHING) seems wrong.

@icing

icing commented Jan 16, 2024 •

Copy link
Copy Markdown
Contributor Author

lib2302 returned 52, when expecting 23

it is really complicated sometimes to get the same error codes for hyper but 52 (CURLE_GOT_NOTHING) seems wrong.

I declare test 2307 does not work with hyper at all. Nowhere do I see the server response data being processed. Change my mind.

Comment thread tests/data/test2307 Resolved
@bagder bagder closed this in 49ca841 Jan 16, 2024
@bagder

bagder commented Jan 16, 2024

Copy link
Copy Markdown
Member

@icing: this new test 2307 seems to be flaky and has already failed for me locally and in CI builds after this...

bagder added a commit that referenced this pull request Jan 16, 2024
Added in 49ca841 (#12707) the test fails in numerous
(unrelated) CI builds.
@bagder bagder mentioned this pull request Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants