Bug 2000627 (CVE-2021-3744) - CVE-2021-3744 kernel: crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
Summary: CVE-2021-3744 kernel: crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-3744
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1997593 1997594 1997595 2009413
Blocks: 1998463
TreeView+ depends on / blocked
 
Reported: 2021-09-02 14:23 UTC by Alex
Modified: 2022-06-16 11:23 UTC (History)
42 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-05-11 08:45:02 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2022:2229 0 None None None 2022-05-12 11:26:33 UTC
Red Hat Product Errata RHBA-2022:4630 0 None None None 2022-05-18 11:46:19 UTC
Red Hat Product Errata RHBA-2022:4693 0 None None None 2022-05-19 05:10:47 UTC
Red Hat Product Errata RHBA-2022:4969 0 None None None 2022-06-08 18:39:52 UTC
Red Hat Product Errata RHBA-2022:5088 0 None None None 2022-06-16 11:23:06 UTC
Red Hat Product Errata RHSA-2022:1975 0 None None None 2022-05-10 14:39:36 UTC
Red Hat Product Errata RHSA-2022:1988 0 None None None 2022-05-10 14:45:25 UTC

Description Alex 2021-09-02 14:23:01 UTC
A memory leak in the ccp_run_aes_gcm_cmd() function in drivers/crypto/ccp/ccp-ops.c in the Linux kernel allows attackers to cause a denial of service (memory consumption).

The patch for this one fixes:
1) If we ccp_init_data() fails for &src then we need to free aad.
   Use goto e_aad instead of goto e_ctx.
2) The label to free the &final_wa was named incorrectly as "e_tag" but
   it should have been "e_final_wa".  One error path leaked &final_wa.
3) The &tag was leaked on one error path.  In that case, I added a free
   before the goto because the resource was local to that block.

This vulnerability is similar with the older CVE-2019-18808.

Reference:
https://seclists.org/oss-sec/2021/q3/164

Comment 7 Alex 2021-09-30 15:17:17 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2009413]

Comment 9 Vladis Dronov 2021-11-09 11:12:19 UTC
the fixing upstream commit is present since v5.15-rc4 and is:
505d9dcb0f7d ("crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()")

Comment 10 errata-xmlrpc 2022-05-10 14:39:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1975 https://access.redhat.com/errata/RHSA-2022:1975

Comment 11 errata-xmlrpc 2022-05-10 14:45:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1988 https://access.redhat.com/errata/RHSA-2022:1988

Comment 12 Product Security DevOps Team 2022-05-11 08:44:57 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-3744


Note You need to log in before you can comment on or make changes to this bug.