diff options
| author | Sung Byeongchan <tjdqudcks0424@naver.com> | 2026-10-07 15:19:49 +0900 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-10-16 12:21:08 +0200 |
| commit | 5364d081125a34e90851fbb46ecc93f79339ce78 (patch) | |
| tree | e1b57db21255d51e65316a29ac52623d781bcbe4 /tools/lib/python | |
| parent | ed6f750f9820efcb7eeb1ec9fd0990e03ccffbab (diff) | |
virtiofs: validate fixed-output response length
A short successful virtiofs response can leave the fixed-output portion of
the request argument buffer unwritten. The completion path nevertheless
copies the full declared output to the request destination, allowing stale
allocator contents to reach callers such as fuse_statfs().
Require successful fixed-output responses to contain their complete
declared output. Continue to permit a shorter final argument only for
out_argvar requests. Reject positive and internal restart error values
and require valid error replies to be header-only. The error already
stored in the FUSE output header is returned by fuse_request_end(), so do
not copy output arguments from an error reply.
This was found by source review with AI assistance. A header-only
successful FUSE_STATFS reply returned stale fields in nine of nine calls
across three boots. The fixed kernel rejected the short response and
preserved complete replies, valid negative-error replies, and
variable-output replies.
Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Sung Byeongchan <tjdqudcks0424@naver.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
