From e58222e266493477ae7590852c1a8daa3baaa612 Mon Sep 17 00:00:00 2001 From: Ben Cabot Date: Wed, 20 Jan 2016 09:44:39 +0000 Subject: BUG/MEDIUM: config: Adding validation to stick-table expire value. If the expire value exceedes the maximum value clients are not added to the stick table. (cherry picked from commit 3b90f0a267a086fd590102e8cdcc7a258b31c636) --- src/cfgparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cfgparse.c b/src/cfgparse.c index ef2ce3e..693e9f3 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3961,6 +3961,12 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) err_code |= ERR_ALERT | ERR_FATAL; goto out; } + if (val > INT_MAX) { + Alert("parsing [%s:%d] : Expire value [%u]ms exceeds maxmimum value of 24.85 days.\n", + file, linenum, val); + err_code |= ERR_ALERT | ERR_FATAL; + goto out; + } curproxy->table.expire = val; myidx++; } -- 1.7.12.1