The function `match_pattern()` is used to match conditionals in client configuration files or known hosts against the hostname the client is connecting to. When the configuration file or known_hosts file is controlled by the attacker, connecting to specific hostnames could cause timeouts and resource exhaustion due to the ineffective backtracking of complex regular expressions. The pattern matching was modified to avoid the needless backtracing.
This issue has been addressed in the following products: Red Hat Enterprise Linux 10 Via RHSA-2026:18160 https://access.redhat.com/errata/RHSA-2026:18160
This issue has been addressed in the following products: Red Hat Enterprise Linux 9 Via RHSA-2026:18683 https://access.redhat.com/errata/RHSA-2026:18683