{"vuid":"VU#981222","idnumber":"981222","name":"Linux kernel mremap(2) system call does not properly check return value from do_munmap() function","keywords":["Linux","kernel","do_mremap()","do_munmap","VMA descriptors","root privileges","isec","mremap","mmap","pte","page table"],"overview":"A vulnerability in the Linux mremap(2) system call could allow an authenticated, local attacker to execute arbitrary code with root privileges.","clean_desc":"The Linux kernel uses a linked list of vitrual memory area (VMA) descriptors to reference valid regions of the page table for a given process. VMA descriptors include information about the memory area such as start address, length, and page protection flags. A VMA effectively contains a range of page table entries (PTEs) that make up part of the page table. The  mremap(2) system call has the ability to resize or move a VMA or part of a VMA within a process' memory space. mremap(2) contains a function called do_munmap() that is used to unmap regions of memory during resize or move operations. There is a limit on the number of VMA descriptors that can exist at one time, and do_munmap() does not create a new VMA descriptor if doing so would exceed this limit. In certain cases, mremap(2) does not properly check the return value from the do_munmap() function, and will map PTEs to new locations even though the expected VMAs have not been created or updated. By carefully manipulating VMA to PTE relationships, a local attacker can read from or write to memory owned by a process running with different privileges. Further technical details are available in an advisory from iSEC. Note that this vulnerability is distinct from the one described in VU#490620/CAN-2003-0985.","impact":"An authenticated, local attacker could execute arbitrary code with root privileges.","resolution":"Patch or Upgrade Apply a patch or upgrade as specified by your vendor. This issue is resolved in Linux kernels 2.2.26, 2.4.25, and 2.6.3 from the Linux Kernel Archives.","workarounds":"","sysaffected":"","thanks":"This vulnerability was researched and reported by Paul Starzetz of iSEC.","author":"This document was written by Art Manion.","public":["http://www.kernel.org/","http://isec.pl/vulnerabilities/isec-0014-mremap-unmap.txt","http://www.securityfocus.com/archive/1/354284","http://www.securityfocus.com/archive/1/355781","http://www.securityfocus.com/bid/9686","http://xforce.iss.net/xforce/xfdb/15244","http://secunia.com/advisories/10897/"],"cveids":["CVE-2004-0077"],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2004-02-19T14:54:51Z","publicdate":"2004-02-18T00:00:00Z","datefirstpublished":"2004-03-10T16:12:57Z","dateupdated":"2004-03-25T17:10:21Z","revision":26,"vrda_d1_directreport":"","vrda_d1_population":"","vrda_d1_impact":"","cam_widelyknown":"20","cam_exploitation":"8","cam_internetinfrastructure":"6","cam_population":"16","cam_impact":"20","cam_easeofexploitation":"13","cam_attackeraccessrequired":"10","cam_scorecurrent":"26.52","cam_scorecurrentwidelyknown":"26.52","cam_scorecurrentwidelyknownexploited":"35.88","ipprotocol":"","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":26.52,"vulnote":null}