]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: config: Adding validation to stick-table expire value.
authorBen Cabot <ben@loadbalancer.org>
Wed, 20 Jan 2016 09:44:39 +0000 (09:44 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Jan 2016 18:46:47 +0000 (19:46 +0100)
If the expire value exceedes the maximum value clients are not added
to the stick table.

src/cfgparse.c

index 86558baec488133446974c24980adcc0dbafde4c..ec47542ca2136871bcc53f84ef4273411b14ebe5 100644 (file)
@@ -3971,6 +3971,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++;
                        }