]> git.ipfire.org Git - thirdparty/suricata.git/commit
conf/yaml: limit recursion depth while paring YAML
authorJason Ish <jason.ish@oisf.net>
Thu, 9 Apr 2020 21:59:23 +0000 (15:59 -0600)
committerJeff Lucovsky <jeff@lucovsky.org>
Thu, 16 Apr 2020 15:40:49 +0000 (11:40 -0400)
commit7a652f2986bb47cf9da5ee40d1aa65e189f47fe8
treedff190548a5d2aa3aace8d693fe80c5c34df7490
parenta2ebab10e2f0e54122b3f8afa852971454c00bfb
conf/yaml: limit recursion depth while paring YAML

A deeply nested YAML file can cause a stack-overflow while
reading in the configuration to do the recursive parser. Limit
the recursion level to something sane (128) to prevent this
from happening.

The default Suricata configuration has a recursion level of 128
so there is still lots of room to grow (not that we should).

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3630

(cherry picked from commit 4dc80a6e6f9b396de5dc25d3468522316c4661d0)
src/conf-yaml-loader.c