Bug 503905 - kernel: TPM: get_event_name stack corruption [rhel-5.4]
Summary: kernel: TPM: get_event_name stack corruption [rhel-5.4]
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Dean Nelson
QA Contact: Red Hat Kernel QE team
Depends On: 503902
Blocks: 506906
TreeView+ depends on / blocked
Reported: 2009-06-03 09:59 UTC by Eugene Teo (Security Response)
Modified: 2009-09-02 08:05 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 503902
Last Closed: 2009-09-02 08:05:58 UTC
Target Upstream Version:

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

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 08:53:34 UTC

Description Eugene Teo (Security Response) 2009-06-03 09:59:26 UTC
+++ 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:

Comment 3 Dean Nelson 2009-06-10 17:56:41 UTC
Created attachment 347268 [details]
[RHEL5.4 PATCH] TPM: get_event_name stack corruption

Comment 4 RHEL Program Management 2009-06-10 18:11:34 UTC
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

Comment 5 Don Zickus 2009-06-18 14:51:45 UTC
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 08:05:58 UTC
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.


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