ptserver: Limit length on namelist, idlist
authorAndrew Deason <adeason@sinenomine.net>
Tue, 12 Mar 2013 14:51:39 +0000 (09:51 -0500)
committerDaria Brashear <shadow@your-file-system.com>
Wed, 7 Jan 2015 17:39:11 +0000 (12:39 -0500)
commita0ffea098d8c5c5b46c6bf86a12d28d6e7096685
treef43f1ace4498bcd6e5d50b53a1d4dd37d674169e
parent00a33b26d74aa067086ddc340efb82184715857f
ptserver: Limit length on namelist, idlist

namelist and idlist are used as IN parameters to ptserver RPCs that
can be issued by unauthenticated clients. Not having a length limit on
them means anyone can use up a ton of ptserver memory by just issuing
those RPCs with a very large length.

So, put a limit on them. PR_MAXLIST is a constant that already exists,
but is small enough to potentially limit real use, so define a new
OpenAFS-internal value for this purpose.

prlist and prentries are returned from the ptserver to clients, so
also limit them in the same way.

Change-Id: Iaf45639bbae401093354adbfb4daa172fe97ede1
Reviewed-on: http://gerrit.openafs.org/9588
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
src/ptserver/ptint.xg