Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nfsv4 OperationWRITE has arbitrary limit on write offset + size #40

Closed
skoopys opened this issue Jan 9, 2017 · 1 comment
Closed

nfsv4 OperationWRITE has arbitrary limit on write offset + size #40

skoopys opened this issue Jan 9, 2017 · 1 comment
Labels

Comments

@skoopys
Copy link

skoopys commented Jan 9, 2017

OperationWRITE contains this code:

if (_args.opwrite.offset.value + _args.opwrite.data.remaining() > 0x3ffffffe) { throw new InvalException("Arbitrary value"); }

Which seems to prevent any write from succeeding where the offset + the size is greater than around 1GB. Why does this limit exist? What is the meaning of the "Arbitrary value" exception thrown in this instance?

@kofemann
Copy link
Member

@skoopys Thanks. Fixed in 0addfd7

kofemann added a commit that referenced this issue Jan 10, 2017
Motivation:
WRITE must check that provided offset + length don't overflow supported
MAX_FILESIZE. The current code checks for some arbitrary value, which
is obviously wrong.

Modification:
update offset4 with more checks for overflow. Fix offset+len check on
WRITE.

Result:
fixed incorrect behavior.

Fixes: #40
Acked-by: Paul Millar
Target: master, 0.13
(cherry picked from commit 0addfd7)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants