Bug 649695 - (CVE-2010-3874) CVE-2010-3874 kernel: CAN minor heap overflow
CVE-2010-3874 kernel: CAN minor heap overflow
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
public=20101102,reported=20101102,sou...
: Security
Depends On: 651845 651846 651847
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-04 06:25 EDT by Eugene Teo (Security Response)
Modified: 2015-08-19 04:59 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-28 04:47:05 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)

  None (edit)
Description Eugene Teo (Security Response) 2010-11-04 06:25:12 EDT
Description of problem:
In bcm_connect() (in net/can/bcm.c), there is the following code:

	sprintf(bo->procname, "%p", sock);

"procname" is a 9-byte char array.  On 64-bit platforms, up to 17 bytes may be copied into the buffer. Fortunately, structure padding will most likely prevent this from being a problem, except for the trailing NULL byte, which may overwrite the first byte of the next heap object.

Reference:
http://www.spinics.net/lists/netdev/msg145791.html

Acknowledgements:

Red Hat would like to thank Dan Rosenberg for reporting this issue.
Comment 2 Petr Matousek 2010-11-10 07:49:51 EST
Statement:

The Linux kernel as shipped with Red Hat Enterprise Linux 3, 4 and 5 did not include CAN bus subsystem support, and therefore are not affected by this issue. Future kernel updates in Red Hat Enterprise Linux 6 and Red Hat Enterprise MRG may address this flaw.
Comment 4 Eugene Teo (Security Response) 2010-11-12 02:08:08 EST
Proposed patch:
http://www.spinics.net/lists/netdev/msg146469.html
http://www.spinics.net/lists/netdev/msg146270.html
Comment 5 Eugene Teo (Security Response) 2010-11-16 00:15:36 EST
Upstream commit:
http://git.kernel.org/linus/0597d1b99fcfc2c0eada09a698f85ed413d4ba84
Comment 6 errata-xmlrpc 2010-12-08 14:09:30 EST
This issue has been addressed in following products:

  MRG for RHEL-5

Via RHSA-2010:0958 https://rhn.redhat.com/errata/RHSA-2010-0958.html
Comment 7 Petr Matousek 2010-12-20 07:30:43 EST
CAN BCM calls can_proto_register() that calls proto_register(cp->prot, 0) ie. it does not request to create per protocol slab cache with protocol defined object size. Because the sizeof(bcm_sock) is ~0x2d0 on x86_64 it falls into the kmalloc-1024 bucket leaving ~300 bytes as padding. Here off-by-one won't help much.
Comment 8 errata-xmlrpc 2011-01-11 14:45:19 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:0007 https://rhn.redhat.com/errata/RHSA-2011-0007.html

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