sn/storage: Fix payload overflow in combined FSTree.Get()#3801
Open
cthulhu-rider wants to merge 1 commit intomasterfrom
Open
sn/storage: Fix payload overflow in combined FSTree.Get()#3801cthulhu-rider wants to merge 1 commit intomasterfrom
FSTree.Get()#3801cthulhu-rider wants to merge 1 commit intomasterfrom
Conversation
8344471 to
5e1f2c8
Compare
To avoid exceeding the payload's boundaries, all callers would have to perform checks on their side. Although it's more natural to just read until EOF, and this is what's happening now. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
5e1f2c8 to
5908cc2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3801 +/- ##
=======================================
Coverage 25.57% 25.57%
=======================================
Files 660 660
Lines 42663 42672 +9
=======================================
+ Hits 10909 10912 +3
- Misses 30750 30753 +3
- Partials 1004 1007 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cthulhu-rider
commented
Feb 4, 2026
|
|
||
| if combined { | ||
| if full := obj.PayloadSize(); full > uint64(len(payloadPrefix)) { | ||
| rem := full - uint64(len(payloadPrefix)) |
Contributor
Author
There was a problem hiding this comment.
we could also use the length tag from the combined file as the limit, it is read anyway. This would also work when the actual and in-header payload lengths differ. In practice, such objects should not be
Contributor
Author
There was a problem hiding this comment.
an additional argument can be #3783 and movement towards FSTree abstraction from the object structure
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.
i did not try to reproduce this on a cluster. For example, it might show up with
neofs-node/pkg/local_object_storage/writecache/flush.go
Line 224 in 58f146c