Linux Kernel video4linux subsystem getsockopt function Kernel Memory Corruption Vulnerability

Source: Internet
Author: User

Release date:
Updated on: 2010-09-17

Affected Systems:
Linux kernel 2.6.x
Description:
--------------------------------------------------------------------------------
Bugtraq id: 43239
Cve id: CVE-2010-3081

Linux Kernel is the Kernel used by open source Linux.

In Linux, some calling programs of the compat_alloc_user_space () function (such as the compat_mc_getsockopt () function in net/compat. c) do not perform any verification on the returned memory region, which may cause kernel memory corruption. The following is a vulnerability code segment:

Kgf = compat_alloc_user_space (klen + sizeof (* optlen ));

If (! Access_ OK (VERIFY_READ, gf32, _ COMPAT_GF0_SIZE) |
_ Get_user (interface, & gf32-> gf_interface) |
_ Get_user (fmode, & gf32-> gf_fmode) |
_ Get_user (numsrc, & gf32-> gf_numsrc) |
_ Put_user (interface, & kgf-> gf_interface) |
_ Put_user (fmode, & kgf-> gf_fmode) |
_ Put_user (numsrc, & kgf-> gf_numsrc) |
Copy_in_user (& kgf-> gf_group, & gf32-> gf_group, sizeof (kgf-> gf_group )))
Return-EFAULT;

The value of klen is a non-negative 32-bit integer provided by the user space. This means that the kgf pointer may go back to the high position in the execution kernel space. The gf32 pointer is a valid user address space and the structure content is controlled. Note that the put_user of nocheck is used (access_ OK is not executed), and the controlled value is written into the kgf structure.

<* Source: H. Peter Anvin (hpa@linux.intel.com)

Link: http://secunia.com/advisories/41462/
Http://sota.gen.nz/compat1/
*>

Test method:
--------------------------------------------------------------------------------

Alert

The following procedures (methods) may be offensive and are intended only for security research and teaching. Users are at your own risk!

Http://www.exploit-db.com/download/15024

Suggestion:
--------------------------------------------------------------------------------
Vendor patch:

Linux
-----
The vendor has released a patch to fix this security problem. Please download it from the vendor's homepage:

Http://git.kernel.org /? P = linux/kernel/git/torvalds/linux-2.6.git; a = commit; h = c41d68a513c71e35a14f66d71782d27a79a81ea6

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.