NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
259 stars 133 forks source link

NRPE segfaults due to include_dir loop #202

Open seanporterwork opened 5 years ago

seanporterwork commented 5 years ago

On ClearLinux 26160 running NRPE 3.2.1 (in the sysadmin-remote bundle), the default configuration is stored in /usr/share/defaults/nrpe.cfg. This file contains one line: include_dir=/etc/nrpe/nrpe.d. If you then have an nrpe.cfg file which also contains the line include_dir=/etc/nrpe/nrpe.d, the program will include the directory the current file is in, which forms an infinite loop and exhausts all the memory allocated to it. Ideally nrpe would realize that the same directory had been included multiple times and/or that the directory being included contains the config file being parsed and just ignore that directive, but it currently just fails catastrophically.

Let me know if you need more information.