mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
OPENAFS-SA-2018-003 volser: prevent unbounded input to AFSVolForwardMultiple
AFSVolForwardMultiple is defined with an input parameter that is defined to XDR as an unbounded array of replica structs: typedef replica manyDests<>; RPCs with unbounded arrays as inputs are susceptible to remote denial-of-service (DOS) attacks. A malicious client may submit an AFSVolForwardMultiple request with an arbitrarily large array, forcing the volserver to expend large amounts of network bandwidth, cpu cycles, and heap memory to unmarshal the input. Even though AFSVolForwardMultiple requires superuser authorization, this attack is exploitable by non-authorized actors because XDR unmarshalling happens long before any authorization checks can occur. Add a bounding constant (NMAXNSERVERS 13) to the manyDests input array. This constant is derived from the current OpenAFS vldb implementation, which is limited to 13 replica sites for a given volume by the layout (size) of the serverNumber, serverPartition, and serverFlags fields. [kaduk@mit.edu: explain why this constant is used] (cherry picked from commit97b0ee4d9c
) (cherry picked from commitfac3749f0d
) Change-Id: I57a0aa15b5a92a111f835b7a58f7495376e3e63b
This commit is contained in:
parent
c5c3a858b2
commit
ea30e64d1b
@ -65,6 +65,7 @@ statindex 16
|
||||
%#define VOLDUMPV2_OMITDIRS 1
|
||||
|
||||
const SIZE = 1024;
|
||||
const NMAXNSERVERS = 13;
|
||||
|
||||
struct volser_status {
|
||||
afs_uint32 volID; /* Volume id--unique over all systems */
|
||||
@ -246,7 +247,7 @@ struct volintSize {
|
||||
afs_uint64 dump_size;
|
||||
};
|
||||
|
||||
typedef replica manyDests<>;
|
||||
typedef replica manyDests<NMAXNSERVERS>;
|
||||
typedef afs_int32 manyResults<>;
|
||||
typedef transDebugInfo transDebugEntries<>;
|
||||
typedef volintInfo volEntries<>;
|
||||
|
Loading…
Reference in New Issue
Block a user