]> git.michaelhowe.org Git - packages/o/openafs.git/commit
OPENAFS-SA-2018-003 volser: prevent unbounded input to various AFSVol* RPCs
authorMark Vitale <mvitale@sinenomine.net>
Fri, 6 Jul 2018 07:21:26 +0000 (03:21 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 9 Sep 2018 23:35:19 +0000 (18:35 -0500)
commitfe41fa565be6e325da75f3e9b8fbdac2c521b027
tree6814ed1c93c4a97e587ba63b76618e3be05548c5
parentfac3749f0d180e0ca229326c0e8568a60e17d3e9
OPENAFS-SA-2018-003 volser: prevent unbounded input to various AFSVol* RPCs

Several AFSVol* RPCs are defined with an unbounded XDR "string" as
input.

RPCs with unbounded arrays as inputs are susceptible to remote
denial-of-service (DOS) attacks.  A malicious client may submit an
AFSVol* request with an arbitrarily large string, forcing the volserver
to expend large amounts of network bandwidth, cpu cycles, and heap
memory to unmarshal the input.

Instead, give each input "string" an appropriate size.
Volume names are inherently capped to 32 octets (including trailing NUL)
by the protocol, but there is less clearly a hard limit on partition names.
The Vol_PartitionInfo{,64} functions accept a partition name as input and
also return a partition name in the output structure; the output values
have wire-protocol limits, so larger values could not be retrieved by clients,
but for denial-of-service purposes, a more generic PATH_MAX-like value seems
appropriate.  We have several varying sources of such a limit in the tree, but
pick 4k as the least-restrictive.

[kaduk@mit.edu: use a larger limit for pathnames and expand on PATH_MAX in
commit message]

(cherry picked from commit 8b92d015ccdfcb70c7acfc38e330a0475a1fbe28)

Change-Id: Ifa591dfd861688d4d7eb43145b29a1739c6e0f6f
src/volser/volint.xg