Bug 649695 (CVE-2010-3874) - CVE-2010-3874 kernel: CAN minor heap overflow
Summary: CVE-2010-3874 kernel: CAN minor heap overflow
Alias: CVE-2010-3874
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 651845 651846 651847
TreeView+ depends on / blocked
Reported: 2010-11-04 10:25 UTC by Eugene Teo (Security Response)
Modified: 2023-05-11 15:51 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-03-28 08:47:05 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0958 0 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2010-12-08 19:08:55 UTC
Red Hat Product Errata RHSA-2011:0007 0 normal SHIPPED_LIVE Important: kernel security and bug fix update 2011-01-11 19:44:55 UTC

Description Eugene Teo (Security Response) 2010-11-04 10:25:12 UTC
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.



Red Hat would like to thank Dan Rosenberg for reporting this issue.

Comment 2 Petr Matousek 2010-11-10 12:49:51 UTC

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 07:08:08 UTC
Proposed patch:

Comment 5 Eugene Teo (Security Response) 2010-11-16 05:15:36 UTC
Upstream commit:

Comment 6 errata-xmlrpc 2010-12-08 19:09:30 UTC
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 12:30:43 UTC
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 19:45:19 UTC
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.