Bug 1983720 (CVE-2021-36222)

Summary: CVE-2021-36222 krb5: Sending a request containing PA-ENCRYPTED-CHALLENGE padata element without using FAST could result in NULL dereference in KDC which leads to DoS
Product: [Other] Security Response Reporter: Michael Kaplan <mkaplan>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abokovoy, asoldano, atangrin, bbaranow, bdettelb, bmaxwell, brian.stansberry, cdewolf, chazlett, csutherl, darran.lofthouse, dblechte, dfediuck, dkreling, dosoudil, dpal, eedri, eleandro, fcanogab, fdvorak, fjuma, gzaronik, iweiss, jclere, jochrist, jpallich, jperkins, j, jwon, krathod, kwills, lgao, mgoldboi, msochure, msvehla, mturk, nwallace, pjindal, pmackay, rguimara, rstancel, rsvoboda, sbose, sherold, smaestri, ssorce, szappis, tomckay, tom.jenkinson, yborgess, yturgema
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: krb5 1.19.2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in krb5. This flaw allows an unauthenticated attacker to cause a NULL dereference in the KDC by sending a request containing a PA-ENCRYPTED-CHALLENGE padata element without using FAST. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-21 12:26:21 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: 1983728, 1983729, 1983733, 1992011    
Bug Blocks: 1983721    

Description Michael Kaplan 2021-07-19 15:27:58 UTC
In MIT krb5 releases 1.16 and later, an unauthenticated attacker can cause a null dereference in the KDC by sending a request containing a PA-ENCRYPTED-CHALLENGE padata element without using FAST.

Comment 7 Marco Benatto 2021-08-10 14:31:03 UTC
On ec_verify() function, when armor key is NULL it should return ENOENT, however due to a logic error the return value is overwritten by 0 in case k5memdup0() call is executed successfully before the check for armor key is executed. This leads to a NULL pointer dereference when further handling the armor key.
An attacker may leverage this by sending crafted requests to KDC server, leading it to crash and causing a DoS.

Comment 8 Marco Benatto 2021-08-10 14:33:26 UTC
Created krb5 tracking bugs for this issue:

Affects: fedora-all [bug 1992011]

Comment 9 errata-xmlrpc 2021-09-21 08:39:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:3576 https://access.redhat.com/errata/RHSA-2021:3576

Comment 10 Product Security DevOps Team 2021-09-21 12:26:21 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-36222