#22657 [Opn->Bgs]: Weak parsing in rfc1867.c
| From: | sesser@php.net | Date: | Wed, 12 Mar 2003 22:06:34 +0000 |
| Subject: | #22657 [Opn->Bgs]: Weak parsing in rfc1867.c | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35455@lists.php.net to get a copy of this message | ||
ID: 22657
Updated by: sesser@php.net
Reported By: vesely at tana dot it
-Status: Open
+Status: Bogus
Bug Type: HTTP related
Operating System: Any
PHP Version: 4.3.0
New Comment:
buf_begin can be NULL, no DOS possible -> BOGUS1
searching for ',' is correct this works around a bug
in some IE version -> BOGUS2
Previous Comments:
------------------------------------------------------------------------
[2003-03-12 03:44:37] vesely at tana dot it
Hi,
watch out rfc1867.c around line 342, in function
next_line() there is (was?) the following code:
if (ptr) {
/* ... */
} else {
/* ... */
line[self->bufsize] = 0;
self->buf_begin = ptr; /* <=== */
self->bytes_in_buffer = 0;
}
ptr is obviously NULL, buf_begin should never be NULL
or the program may crash. So this is a potential
vulnerability for DOS attackers who submit long lines.
Since you're there, would you mind to check why at line
721, in the rfc1867_post_handler function, there is
boundary_end = strchr(boundary, ',');
Shouldn't it be ';' (semicolon) rather than ',' (comma)?
(Just wandering)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22657&edit=1