forked from Imagelibrary/rtems
2006-02-08 Thomas Rauscher <trauscher@loytec.com>
PR 890/networking * httpd/webs.c: The webservers enters an infinite loop when a POST request with less data than indicated in the Content-Length header is received. It also consumes additional heap memory and a file descriptor for each invalid POST.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2006-02-08 Thomas Rauscher <trauscher@loytec.com>
|
||||||
|
|
||||||
|
PR 890/networking
|
||||||
|
* httpd/webs.c: The webservers enters an infinite loop when a POST
|
||||||
|
request with less data than indicated in the Content-Length header is
|
||||||
|
received. It also consumes additional heap memory and a file
|
||||||
|
descriptor for each invalid POST.
|
||||||
|
|
||||||
2006-02-01 Joel Sherrill <joel@OARcorp.com>
|
2006-02-01 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* posix/inline/rtems/posix/cond.inl, posix/macros/rtems/posix/cond.inl,
|
* posix/inline/rtems/posix/cond.inl, posix/macros/rtems/posix/cond.inl,
|
||||||
|
|||||||
@@ -583,6 +583,11 @@ static int websGetInput(webs_t wp, char_t **ptext, int *pnbytes)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
} else if (nbytes == 0) { /* EOF or No data available */
|
} else if (nbytes == 0) { /* EOF or No data available */
|
||||||
|
/* Bugfix for POST DoS attack with invalid content length */
|
||||||
|
if (socketEof(wp->sid)) {
|
||||||
|
websDone(wp, 0);
|
||||||
|
}
|
||||||
|
/* End of bugfix */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
} else { /* Valid data */
|
} else { /* Valid data */
|
||||||
|
|||||||
Reference in New Issue
Block a user