我试图在OSX上为脏牛编译POC (免责声明:不是C程序员)。以下是错误:
dirtycow.c: In function ‘procselfmemThread’:
dirtycow.c:64:5: warning: implicit declaration of function ‘lseek’ [-Wimplicit-function-declaration]
lseek(f,map,SEEK_SET);
^~~~~
dirtycow.c:65:8: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
c+=write(f,str,strlen(str));
^~~~~
dirtycow.c: In function ‘main’:
dirtycow.c:82:3: warning: implicit declaration of function ‘fstat’ [-Wimplicit-function-declaration]
fstat(f,&st);
^~~~~
dirtycow.c:95:3: error: invalid use of undefined type ‘struct stat’
map=mmap(NULL,st.st_size,PROT_READ,MAP_PRIVATE,f,0);
^~~
dirtycow.c: At top level:
dirtycow.c:27:13: error: storage size of ‘st’ isn’t known
struct stat st;所以问题是,我在OSX上的C语法是错误的,还是OSX不容易受到这种攻击?
发布于 2016-10-21 15:14:44
DirtyCow是一个linux内核漏洞--实现中的一个错误。MacOS X是基于BSD的-完全不同的代码库。虽然原则上可能存在类似的漏洞,但基于Linux的漏洞在MacOS上操作的可能性很小。
https://security.stackexchange.com/questions/140444
复制相似问题