OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4656-gc9f430f
Gerrit Code Review
gerrit@openafs.org
Wed, 5 Aug 2015 10:45:17 -0400
The following commit has been merged in the master branch:
commit c9f430fd8f479bbfe28829f7032ecd325a4f833d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 1 09:32:35 2015 -0400
vlserver: ListAttributesN2 volume name safety
The vlserver ListAttributesN2 RPC permits filtering the result set
by volume name in addition by site or volume id.
Two issues identified by Andrew Deason (Sine Nomine Associates) are
addressed by this patch. First, the size of the volumename[] buffer
is insufficient to store the valid input read over the network. The
buffer needs to be able to store VL_MAXNAMELEN characters of the volume
name, two characters for the regular expression '^' and '$', and the
trailing NUL.
Second, sprintf() is used to write to the buffer and even with valid
input from the caller SVL_ListAttributesN2 can overflow the buffer
when ".backup" and ".readonly" are appended to the volume name. If
there is an overflow the search name is invalid and there can not be
a valid match.
This patch increases the size of volumename[] to VL_MAXNAMELEN+3.
It also uses snprintf() instead of sprintf() and performs error
checking. The error VL_BADNAME is returned when the network input is
invalid.
Change-Id: Id65b83e0dd14c6f41af73c6868975ae53c4975a7
Reviewed-on: http://gerrit.openafs.org/11969
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/vlserver/vlprocs.c | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository