diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2021-10-27 21:56:59 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2021-10-27 21:56:59 +0000 |
commit | dfb61a4fb16e1a767e014384fda9c1b9aea2dc7c (patch) | |
tree | 729045e82181c51016ed04c49003400055f6c26a /usr.sbin/rpki-client/extern.h | |
parent | 64bb42cd5c2ef088b472349811a3ba2a622aa0a6 (diff) |
Add limits on size of certain untrusted inputs
ok job@
Diffstat (limited to 'usr.sbin/rpki-client/extern.h')
-rw-r--r-- | usr.sbin/rpki-client/extern.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/rpki-client/extern.h b/usr.sbin/rpki-client/extern.h index 309d5b48d83..fc07970c6bf 100644 --- a/usr.sbin/rpki-client/extern.h +++ b/usr.sbin/rpki-client/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.81 2021/10/26 16:59:19 claudio Exp $ */ +/* $OpenBSD: extern.h,v 1.82 2021/10/27 21:56:58 beck Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -603,4 +603,21 @@ int mkpath(const char *); #define RPKI_PATH_OUT_DIR "/var/db/rpki-client" #define RPKI_PATH_BASE_DIR "/var/cache/rpki-client" +/* + * Maximum number of ip ranges and AS ranges we will accept in + * any single file + */ +#define MAX_IP_SIZE 200000 +#define MAX_AS_SIZE 200000 + +/* + * Maximum URI length we will accept + */ +#define MAX_URI_LENGTH 2048 + +/* + * Maximum File Size we will accept + */ +#define MAX_FILE_SIZE 2000000 + #endif /* ! EXTERN_H */ |