Bug 2047791 (CVE-2021-34337)

Summary: CVE-2021-34337 mailman: password checking timing attack in administrative REST API
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: extras-orphan, infra-sig, jkaluza, michel, mosvald, ngompa13
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mailman 3.3.5 Doc Type: If docs needed, set a value
Doc Text:
A timing attack was found in the mailman administrative REST API due to the usage of a simple string comparison function when checking the password. This flaw allows an attacker who can talk to the REST API to discover the admin password due to timing leaks.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-31 16:05:52 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: 2047792, 2048605    
Bug Blocks: 2047793    

Description Marian Rehak 2022-01-28 14:50:19 UTC
Check the REST API password in a way that is resistant to timing attacks. Using basic string equality is vulnerable to timing attacks as it will short circuit at the first wrong character. Using hmac.compare_digest avoids that issue and will take the same time, regardless of whether the value is correct or not. This is only exploitable if an attacker can talk directly to the REST API, which by default is bound to localhost.

Reference:

https://bugs.gentoo.org/828115

Comment 1 Marian Rehak 2022-01-28 14:50:33 UTC
Created mailman tracking bugs for this issue:

Affects: fedora-34 [bug 2047792]

Comment 2 Riccardo Schirone 2022-01-31 15:32:15 UTC
Created mailman3 tracking bugs for this issue:

Affects: fedora-all [bug 2048605]

Comment 4 Riccardo Schirone 2022-01-31 15:55:30 UTC
Marking all RHEL mailman versions as not affected because the versions shipped there are based on mailman 2 which does not have the REST API which is used in this vulnerability and that affects only mailman 3.

Comment 5 Riccardo Schirone 2022-01-31 16:04:51 UTC
REST API was introduced in Mailman 3.0 alpha, see https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/docs/NEWS.rst#alpha-3-working-man .