PHP 5.5.37 php_url_parse_ex() buffer overflow read

2016.07.24
Credit: yohgaki
Risk: Medium
Local: Yes
Remote: No
CVE: N/A
CWE: N/A

php_url_prase_ex() read buffer exceeding its limits and segfaults. PHP function parse_url() is not affected since PHP string is terminated by null char always. Patch to fix this: @@ -319,8 +320,9 @@ PHPAPI php_url *php_url_parse_ex(char const *str, size_t length) nohost: if ((p = memchr(s, '?', (ue - s)))) { - pp = strchr(s, '#'); + pp = memchr(s, '#', (ue - s)); if (pp && pp < p) { if (pp - s) {

References:

https://bugs.php.net/bug.php?id=70480


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top