Bug 642465 (CVE-2010-2963)

Summary: CVE-2010-2963 kernel: v4l: VIDIOCSMICROCODE arbitrary write
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arozansk, bhu, dhoward, fhrbata, jkacur, lgoncalv, mjc, peterm, plyons, rkhan, security-response-team, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A vulnerability was discovered in the 32-bit compatibility code for the VIDIOCSMICROCODE IOCTL (Input/Output Control) in the Video4Linux implementation. It does not affect Red Hat Enterprise Linux 5, but as a preventive measure, this update removes the code. Red Hat would like to thank Kees Cook for reporting this vulnerability.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 642469, 642470, 642471, 642472, 642473    
Bug Blocks:    

Description Eugene Teo (Security Response) 2010-10-13 02:20:55 UTC
The ioctl32 v4l1 compat code for VIDIOCSMICROCODE does not check the destination buffer for a copy_from_user() call, which allows anyone with access to a v4l device to write to arbitrary kernel memory locations. This allocates the memory and uses a compat pointer for the copy.

Acknowledgements:

Red Hat would like to thank Kees Cook for reporting this issue.

Comment 1 Eugene Teo (Security Response) 2010-10-13 02:23:48 UTC
Introduced in eb4eeccc (v2.6.18-rc4), also see in 92f45bad (v2.6.29-rc1).

Comment 4 Eugene Teo (Security Response) 2010-10-13 07:09:43 UTC
Public demo..:
http://www.youtube.com/watch?v=CLxpae-M7Js

Comment 5 Mauro Carvalho Chehab 2010-10-13 16:47:04 UTC
Ok, only Stradis driver actually uses it. I doubt that stradis still work nowadays, and it is not compiled on RHEL5/RHEL6. Need to check mrg. Patch is as simple as remove the compat bits for this ioctl.

Comment 8 Eugene Teo (Security Response) 2010-10-14 04:23:34 UTC
Statement:

This issue did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 3 and 4 as they did not include the upstream commit eb4eeccc that introduced the problem. It did not affect Red Hat Enterprise Linux 5 and Red Hat Enterprise MRG as they did not provide support for the Stradis driver that uses the vulnerable compat code for VIDIOCSMICROCODE. As a preventive measure, we have removed the vulnerable code in Red Hat Enterprise Linux 5 via https://rhn.redhat.com/errata/RHSA-2010-0839.html. We plan to remove the vulnerable code in a future kernel update in Red Hat Enterprise MRG.

Comment 11 Eugene Teo (Security Response) 2010-11-08 05:19:09 UTC
Upstream commit:
http://git.kernel.org/linus/3e645d6b485446c54c6745c5e2cf5c528fe4deec

Comment 12 errata-xmlrpc 2010-11-09 18:06:40 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

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

Comment 14 errata-xmlrpc 2010-11-10 19:09:47 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 15 Martin Prpič 2010-11-11 14:09:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
A vulnerability was discovered in the 32-bit compatibility code for the VIDIOCSMICROCODE IOCTL (Input/Output Control) in the Video4Linux implementation. It does not affect Red Hat Enterprise Linux 5, but as a preventive measure, this update removes the code. Red Hat would like to thank Kees Cook for reporting this vulnerability.

Comment 16 errata-xmlrpc 2010-11-22 19:35:42 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