Bug 463478 - RHEL5.3: ecryptfs memory corruption
RHEL5.3: ecryptfs memory corruption
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
Depends On:
  Show dependency treegraph
Reported: 2008-09-23 12:59 EDT by Eric Sandeen
Modified: 2009-01-20 15:15 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 15:15:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:0225 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.3 kernel security and bug fix update 2009-01-20 11:06:24 EST

  None (edit)
Description Eric Sandeen 2008-09-23 12:59:44 EDT
Tomas Henzl pointed out this bug in the ecryptfs mount path:

> >> +       options_len = (strlen(options) + 1);
> >> +       if ((opts_tmp = opts_orig = kmalloc(options_len, GFP_KERNEL)) == NULL) {
> >> +	       rc = -ENOMEM;
> >> +	       goto out;
> >> +       }
> >> +       memcpy(opts_orig, options, options_len);
> >> +       opts_orig[options_len] = '\0';
> >>   
> Sorry for being so late,  but wouldn't be here better 
> +       opts_orig[options_len - 1] = '\0';

where it writes 1 byte past the allocated memory.  This constitutes memory corruption on the ecryptfs mount path, and should be fixed before RHEL5.3 releases.

Comment 1 RHEL Product and Program Management 2008-09-23 14:15:19 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
Comment 2 Don Zickus 2008-10-06 11:56:26 EDT
in kernel-2.6.18-118.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 6 errata-xmlrpc 2009-01-20 15:15:21 EST
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.