Bug 638085 (CVE-2010-3437)

Summary: CVE-2010-3437 kernel: pktcdvd ioctl dev_minor missing range check
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arozansk, davej, fhrbata, jmarchan, kmcmartin, lwang, pmatouse, tcallawa
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 08:53:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 638088, 638089    
Bug Blocks:    

Description Eugene Teo (Security Response) 2010-09-28 07:25:58 UTC
Description of problem:
The PKT_CTRL_CMD_STATUS device ioctl retrieves a pointer to a
pktcdvd_device from the global pkt_devs array.  The index into this
array is provided directly by the user and is a signed integer, so the
comparison to ensure that it falls within the bounds of this array will
fail when provided with a negative index.

This can be used to read arbitrary kernel memory or cause a crash due to
an invalid pointer dereference.  This can be exploited by users with
permission to open /dev/pktcdvd/control (on many distributions, this is
readable by group "cdrom").

Upstream commit:
http://git.kernel.org/linus/252a52aa4fa22a668f019e55b3aac3ff71ec1c29

Comment 4 Eugene Teo (Security Response) 2010-09-28 07:42:43 UTC
Acknowledgements:

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

Statement:

The Linux kernel as shipped with Red Hat Enterprise Linux 3 and 4 did not include support for Packet writing layer for ATAPI and SCSI disc media devices, and therefore are not affected by this issue. The Linux kernel as shipped with Red Hat Enterprise Linux 5 and Red Hat Enterprise MRG only allow root access to the "/dev/pktcdvd/control" file, and therefore are also not affected by this issue.

Comment 5 Eugene Teo (Security Response) 2010-09-30 01:10:15 UTC
Reproducer:
http://jon.oberheide.org/files/cve-2010-3437.c

Comment 6 errata-xmlrpc 2010-11-10 19:08:54 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2010:0842 https://rhn.redhat.com/errata/RHSA-2010-0842.html

Comment 7 errata-xmlrpc 2010-11-22 19:35:06 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2010:0842 https://rhn.redhat.com/errata/RHSA-2010-0842.html