Bug 749475 (CVE-2011-4081)

Summary: CVE-2011-4081 kernel: crypto: ghash: null pointer deref if no key is set
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anton, arozansk, bhu, davej, dhoward, fhrbata, gansalmon, itamar, jkacur, jonathan, jwboyer, kernel-maint, kernel-mgr, lgoncalv, lwang, madhu.chinakonda, rt-maint, sforsber, tcallawa, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20111020,reported=20111027,source=secunia,cvss2=4.9/AV:L/AC:L/Au:N/C:N/I:N/A:C,rhel-6/kernel=affected,mrg-2/realtime-kernel=affected,fedora-all/kernel=affected,cwe=CWE-476[auto]
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-03 21:50:57 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 749481, 749482, 749483, 749484, 761387    
Bug Blocks: 749469    

Description Eugene Teo (Security Response) 2011-10-27 03:44:34 EDT
The ghash_update function passes a pointer to gf128mul_4k_lle which will be NULL if ghash_setkey is not called or if the most recent call to ghash_setkey failed to allocate memory.  This causes an oops.  Fix this up by returning an error code in the null case.

This is trivially triggered from unprivileged userspace through the AF_ALG interface by simply writing to the socket without setting a key.

The ghash_final function has a similar issue, but triggering it requires a memory allocation failure in ghash_setkey _after_ at least one successful call to ghash_update.

Acknowledgements:

Red Hat would like to thank Nick Bowler for reporting this issue.
Comment 1 Eugene Teo (Security Response) 2011-10-27 04:07:52 EDT
Upstream commit:
http://git.kernel.org/linus/7ed47b7d142ec99ad6880bbbec51e9f12b3af74c
Comment 4 Eugene Teo (Security Response) 2011-10-27 04:10:35 EDT
Created kernel tracking bugs for this issue

Affects: fedora-all [bug 749484]
Comment 5 Eugene Teo (Security Response) 2011-10-27 04:42:26 EDT
Statement:

This issue did not affect the Linux kernels as shipped with Red Hat Enterprise Linux 4, and 5 as they did not include support for the GHASH message digest algorithm. This has been addressed in Red Hat Enterprise Linux 6, and MRG via https://rhn.redhat.com/errata/RHSA-2012-0350.html, and https://rhn.redhat.com/errata/RHSA-2012-0010.html.
Comment 8 errata-xmlrpc 2012-01-10 15:16:44 EST
This issue has been addressed in following products:

  MRG for RHEL-6 v.2

Via RHSA-2012:0010 https://rhn.redhat.com/errata/RHSA-2012-0010.html
Comment 9 errata-xmlrpc 2012-03-06 13:44:42 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:0350 https://rhn.redhat.com/errata/RHSA-2012-0350.html