Bug 503905 - kernel: TPM: get_event_name stack corruption [rhel-5.4]
kernel: TPM: get_event_name stack corruption [rhel-5.4]
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.4
All Linux
urgent Severity high
: rc
: ---
Assigned To: Dean Nelson
Red Hat Kernel QE team
: ZStream
Depends On: 503902
Blocks: 506906
  Show dependency treegraph
 
Reported: 2009-06-03 05:59 EDT by Eugene Teo (Security Response)
Modified: 2009-09-02 04:05 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 503902
Environment:
Last Closed: 2009-09-02 04:05:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[RHEL5.4 PATCH] TPM: get_event_name stack corruption (1.28 KB, patch)
2009-06-10 13:56 EDT, Dean Nelson
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 04:53:34 EDT

  None (edit)
Description Eugene Teo (Security Response) 2009-06-03 05:59:26 EDT
+++ This bug was initially created as a clone of Bug #503902 +++

Description of problem:
get_event_name uses sprintf to fill a buffer declared on the stack.  It fills the buffer 2 bytes at a time.  What the code doesn't take into account is that sprintf(buf, "%02x", data) actually writes 3 bytes.  2 bytes for the data and then it nul terminates the string.  Since we declare buf to be 40 characters long and then we write 40 bytes of data into buf sprintf is going to write 41 characters.  The fix is to leave room in buf for the nul terminator.

Upstream commit:
http://git.kernel.org/linus/fbaa58696cef848de818768783ef185bd3f05158
Comment 3 Dean Nelson 2009-06-10 13:56:41 EDT
Created attachment 347268 [details]
[RHEL5.4 PATCH] TPM: get_event_name stack corruption
Comment 4 RHEL Product and Program Management 2009-06-10 14:11:34 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 Don Zickus 2009-06-18 10:51:45 EDT
in kernel-2.6.18-154.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.
Comment 10 errata-xmlrpc 2009-09-02 04:05:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1243.html

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