GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — inspector: fix out-of-bounds read in ws frame decoding by Nashit-h · Pull Request #64618 · nodejs/node Conversation
Contributor
decode_frame_hybi17 checks the announced payload length against buffer.size(), but the payload is read from it + kMaskingKeyWidthInBytes, after the iterator has already walked past the two byte header and the extended length field. A client that sends only the two header bytes of a masked frame, 0x81 0xFD, underflows buffer.size() - kMaskingKeyWidthInBytes to SIZE_MAX, passes the check, and the unmasking loop reads 125 bytes past a two byte vector; the bytes it picks up go to OnWsFrame and back out to the peer. Measuring against what is left after the header fixes both that underflow and the header bytes the old check never accounted for.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
legendecas
requested changes
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
cola119
approved these changes
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
legendecas
approved these changes
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #64618 +/- ## ========================================== - Coverage 90.69% 90.69% -0.01% ========================================== Files 797 797 Lines 278787 278788 +1 Branches 53607 53609 +2 ========================================== - Hits 252858 252836 -22 - Misses 16292 16300 +8 - Partials 9637 9652 +15
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm when the formatter error is fixed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: nashit hayyat <[email protected]>
1958e12 to
c0ef71e
Compare
|
Done. Rebased on main, squashed the two commits into one, and applied the clang-format reflow on the FRAME_BODY initializer that format-cpp was asking for. No code changes beyond that line wrap. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 93df195 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: nashit hayyat <[email protected]> PR-URL: #64618 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
Signed-off-by: nashit hayyat <[email protected]> PR-URL: #64618 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
Signed-off-by: nashit hayyat <[email protected]> PR-URL: #64618 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
Signed-off-by: nashit hayyat <[email protected]> PR-URL: nodejs#64618 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.