Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
php5.6796
php-CVE-2015-2305.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php-CVE-2015-2305.patch of Package php5.6796
From: Stanislav Malyshev <stas@php.net> Date: Wed, 18 Mar 2015 00:04:57 +0000 (-0700) Subject: Fix bug #69248 - heap overflow vulnerability in regcomp.c X-Git-Tag: php-5.4.39~2 X-Git-Url: http://72.52.91.13:8000/?p=php-src.git;a=commitdiff_plain;h=fb04dcf6dbb48aecd8d2dc986806cb58c8ae5282 Fix bug #69248 - heap overflow vulnerability in regcomp.c Merged from https://github.com/garyhouston/regex/commit/70bc2965604b6b8aaf260049e64c708dddf85334 --- --- ext/ereg/regex/regcomp.c +++ ext/ereg/regex/regcomp.c @@ -117,7 +117,15 @@ int cflags; (NC-1)*sizeof(cat_t)); if (g == NULL) return(REG_ESPACE); - p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ + { + /* Patched for CERT Vulnerability Note VU#695940, Feb 2015. */ + size_t new_ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ + if (new_ssize < len || new_ssize > LONG_MAX / sizeof(sop)) { + free((char *) g); + return REG_INVARG; + } + p->ssize = new_ssize; + } p->strip = (sop *)malloc(p->ssize * sizeof(sop)); p->slen = 0; if (p->strip == NULL) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor