CVE-2022-4967: Strongswan Trust Cert Subject Bypass

When looking up trusted public keys, the expected connection identity must be used rather than the subject extracted directly from the presented certificate. Extracting the identity from the unverified certificate can allow an attacker to bypass authorization by presenting a different, trusted certificate. Pass the expected identity (e.g., `identification_t`

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2022-4967-strongswan-trust-cert-subject-bypass --engine opengrep

Description

When looking up trusted public keys, the expected connection identity must be used rather than the subject extracted directly from the presented certificate. Extracting the identity from the unverified certificate can allow an attacker to bypass authorization by presenting a different, trusted certificate. Pass the expected identity (e.g., `identification_t`