Werk #8573: Handle large regular expressions more gracefully
Component | The Checkmk Micro Core |
Title | Handle large regular expressions more gracefully |
Date | Oct 14, 2016 |
Checkmk Edition | Checkmk Enterprise (CEE) |
Checkmk Version | 1.4.0i2 |
Level | Trivial Change |
Class | Bug Fix |
Compatibility | Compatible - no manual interaction needed |
Livestatus queries with large regular expressions in their filters could lead to a stack overflow and consequently to a termination of the micro core. To handle this in a more robust way, we set a limit on the size and complexity of a regular expression, and bump the stack sizes of the Livestatus threads from 64kB to 256kB. The net result is that we can correctly handle regular expression patters of up to roughly 2k characters, the exact value depends on the regex features used. For larger expressions we return a failure status in a clean way.