Repository navigation
net: validate onread buffers before each read - #67407
Open
fatihguzeldev wants to merge 1 commit into
Open
fatihguzeldev wants to merge 1 commit into
fatihguzeldev wants to merge 1 commit into
Conversation
an onread buffer can be detached after registration while native code still holds its address. validate the current view before each read and report an error instead of writing into the former backing store. Fixes: nodejs#67397 Signed-off-by: Fatih Güzel <fatihguzeldev@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67407 +/- ##
==========================================
- Coverage 90.72% 90.69% -0.04%
==========================================
Files 798 801 +3
Lines 280102 281589 +1487
Branches 53896 54254 +358
==========================================
+ Hits 254135 255385 +1250
- Misses 16252 16351 +99
- Partials 9715 9853 +138
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
socket reads can modify an immutable arraybuffer created by transferring
a registered onread buffer, because native code keeps the old address.
fail the read with a socket error when the view is no longer writable.
buffer factories can still supply a replacement and continue reading.
fixes #67397