Bug 2015613 (CVE-2021-41991)

Summary: CVE-2021-41991 strongswan: integer overflow when replacing certificates in cache
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: code, davide, michel, mikhail.zabaluev, paul.wouters, pemensik, rhel-crypto-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: strongSwan 5.9.4 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-20 08:08:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2015614, 2015615    
Bug Blocks: 2015618    

Description Guilherme de Almeida Suckevicz 2021-10-19 16:24:45 UTC
The in-memory certificate cache in strongSwan before 5.9.4 has a remote integer overflow upon receiving many requests with different certificates to fill the cache and later trigger the replacement of cache entries. The code attempts to select a less-often-used cache entry by means of a random number generator, but this is not done correctly. Remote code execution might be a slight possibility.

References:
https://www.strongswan.org/blog/2021/10/18/strongswan-vulnerability-(cve-2021-41991).html
https://github.com/strongswan/strongswan/releases/tag/5.9.4

Comment 1 Guilherme de Almeida Suckevicz 2021-10-19 16:26:01 UTC
Created strongswan tracking bugs for this issue:

Affects: epel-all [bug 2015615]
Affects: fedora-all [bug 2015614]

Comment 3 Product Security DevOps Team 2021-10-20 08:08:32 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-41991