ptserver: Increase length limit of namelist, idlist, prlist, prentries 44/13844/4
authorStephan Wiesand <stephan.wiesand@desy.de>
Fri, 6 Sep 2019 11:35:02 +0000 (13:35 +0200)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sun, 26 Jan 2020 00:13:05 +0000 (19:13 -0500)
An implementation limit of those lists was introduced in commit
a0ffea098d8c5c5b46c6bf86a12d28d6e7096685 to prevent using unlimited
amounts of memory in ptserver and the client.  Subsequent reports
indicate that the chosen limits are small enough to restrict
functionality currently in use at some sites where membership lists
exceed the current limit.  Since this is just an implementation-
defined limit and can freely change from release to release, increase
the threshold by an order of magnitude to preserve functionality for
existing deployments while still retaining some protection against
attacker-controlled excessive memory allocation.

Reviewed-on: https://gerrit.openafs.org/13838
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d1e90b82ebb2685cbac3ecb3fd99136328b35357)

Change-Id: Ifa229179ad6d2962a8d49df6abd1add94fad7259
Reviewed-on: https://gerrit.openafs.org/13844
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

src/ptserver/ptint.xg

index 100231d..fba32cc 100644 (file)
@@ -103,8 +103,8 @@ const       PRUPDATE_IDHASH =       0x0010;
 %#define PR_SF_NUSERS  (1u<<30)                /*  "  "  foreign users  "  */
 
 /* OpenAFS implementation limit.  This limit can be modified in future releases
- * and does not need to match the limis applied by other implementations. */
-const OPENAFS_MAXPRLIST=50000;
+ * and does not need to match the limits applied by other implementations. */
+const OPENAFS_MAXPRLIST=500000;
 
 typedef char prname[PR_MAXNAMELEN];
 typedef prname namelist<OPENAFS_MAXPRLIST>;