mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 00:55:24 +00:00
Fix a stack buffer overflow in the statistics channel
A long timestamp in an If-Modified-Since header could overflow a fixed-size buffer.
This commit is contained in:
@@ -451,7 +451,9 @@ process_request(isc_httpd_t *httpd, size_t last_len) {
|
||||
if (value_match(header, "deflate")) {
|
||||
httpd->flags |= ACCEPT_DEFLATE;
|
||||
}
|
||||
} else if (name_match(header, "If-Modified-Since")) {
|
||||
} else if (name_match(header, "If-Modified-Since") &&
|
||||
header->value_len < ISC_FORMATHTTPTIMESTAMP_SIZE)
|
||||
{
|
||||
char timestamp[ISC_FORMATHTTPTIMESTAMP_SIZE + 1];
|
||||
memmove(timestamp, header->value, header->value_len);
|
||||
timestamp[header->value_len] = 0;
|
||||
|
Reference in New Issue
Block a user