Skip to content

lkl/cptofs: fix copy_file short write handling - #650

Open
ddiss wants to merge 1 commit into
lkl:masterfrom
ddiss:fix_cptofs_short_write_only
Open

ddiss wants to merge 1 commit into
lkl:masterfrom
ddiss:fix_cptofs_short_write_only

Conversation

@ddiss

@ddiss ddiss commented Nov 11, 2026

Copy link
Copy Markdown

On short write, copy_file() currently attempts to write any remainder from a source buffer address after the full read length. I've not actually triggered this code-path, but it's a theoretical buffer overrun. Fix it by incrementing the buffer address by the amount written instead of the read amount.

Link: #646

On short write, copy_file() currently attempts to write any remainder
from a source buffer address *after* the full read length.
I've not actually triggered this code-path, but it's a theoretical
buffer overrun. Fix it by incrementing the buffer address by the amount
written instead of the read amount.

Link: lkl#646
Signed-off-by: David Disseldorp <ddiss@suse.de>
@ddiss

ddiss commented Nov 11, 2026

Copy link
Copy Markdown
Author

This is part of the larger set of cptofs changes I have queued, but I'm submitting it separately here so that it's not held up by my cptofs test coverage work.

@github-actions

Copy link
Copy Markdown

Test Results

106 files  ±0  106 suites  ±0   7m 30s ⏱️ - 3m 0s
206 tests ±0  195 ✅ ±0  11 💤 ±0  0 ❌ ±0 
790 runs  ±0  734 ✅ ±0  56 💤 ±0  0 ❌ ±0 

Results for commit ceaeddd. ± Comparison against base commit d0f76a7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant