mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-07-09 09:02:06 -04:00
The number of -H hosts is counted into an unsigned short, so supplying more than 65535 hosts wraps the counter. The subsequent calloc(3) then allocates an undersized hosts array while the later parsing loop still writes one entry per host, overflowing the heap buffer. As process_arguments() runs before we drop privileges via setuid(getuid()), this happens while still running as root on setuid-root installs. Guard both places where the counter is incremented and bail out with a usage error once 65535 hosts are reached, rather than wrapping silently. Reported-by: Christopher Kreft <Email@ChristopherKreft.de> |
||
|---|---|---|
| .. | ||
| check_dhcp.d | ||
| check_icmp.d | ||
| t | ||
| check_dhcp.c | ||
| check_icmp.c | ||
| Makefile.am | ||
| pst3.c | ||