Apache Httpd < 2.4.30: Out of bound write in mod_authnz_ldap when using too small Accept-Language values

2017-12-07T00:00:00
ID HTTPD:55F8C86BB4FE80544B301C6F772E1F21
Type httpd
Reporter The Apache HTTP Server security team would like to thank Alex Nichols and Jakob Hirsch for reporting this issue.
Modified 2018-03-21T00:00:00

Description

mod_authnz_ldap, if configured with AuthLDAPCharsetConfig, uses the Accept-Language header value to lookup the right charset encoding when verifying the user's credentials. If the header value is not present in the charset conversion table, a fallback mechanism is used to truncate it to a two characters value to allow a quick retry (for example, 'en-US' is truncated to 'en'). A header value of less than two characters forces an out of bound write of one NUL byte to a memory location that is not part of the string. In the worst case, quite unlikely, the process would crash which could be used as a Denial of Service attack. In the more likely case, this memory is already reserved for future use and the issue has no effect at all.