OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-283-g734ba31
Gerrit Code Review
gerrit@openafs.org
Tue, 29 Jul 2025 14:45:32 -0400
The following commit has been merged in the master branch:
commit 734ba317a543773ffcc6598a52e8dad9522d9831
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 7 15:21:24 2025 -0500
vol: Check response length in fssync-debug
Many places in fssync-debug currently blindly copy struct data from
res.payload.buf (the buffer containing the server's response), without
checking how much data was actually in there. If the server sent more
data than expected we just ignore any extra; but if the server sent too
little data, part of the relevant struct may contain uninitialized
garbage data.
This currently cannot happen, but is fragile, and may happen when
developing changes to the FSSYNC operations. To avoid confusion in such
situations, add a check to verify that the server responded with the
expected number of bytes. If the number of bytes doesn't match, log a
warning, and initialize the struct to zeroes so it doesn't contain
garbage.
Change-Id: Ia83f13794fab635179305f0ff3b77c1f1777c024
Reviewed-on: https://gerrit.openafs.org/16476
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Gaurav Saxena <gsaxena@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
src/vol/fssync-debug.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
--
OpenAFS Master Repository