Fedora Account System
Red Hat Associate
Red Hat Customer
A flaw was found in OpenShift Router. The regular expression that validates the haproxy.router.openshift.io/hsts_header annotation on a Route uses the whitespace character class, which in Go's regexp engine also matches carriage return and line feed. A matched annotation value is written verbatim into a single-quoted directive in the shared HAProxy configuration file that serves every namespace. A user permitted to create Route objects in a single namespace can therefore supply an annotation value containing embedded newlines, which is accepted by the API server because annotation values are not validated. HAProxy then rejects the entire generated configuration with a fatal parse error, so the router cannot reload or start. Route, endpoint and scale changes stop being applied cluster-wide and router pods cannot serve ingress until the offending Route is removed. This affects OpenShift Container Platform 4.9 and later.