cve_id
stringlengths 13
16
| obtain_all_privilege
stringclasses 3
values | obtain_user_privilege
stringclasses 2
values | obtain_other_privilege
stringclasses 2
values | user_interaction_required
stringclasses 3
values | cvss2_vector_string
stringclasses 106
values | cvss2_access_vector
stringclasses 4
values | cvss2_access_complexity
stringclasses 4
values | cvss2_authentication
stringclasses 3
values | cvss2_confidentiality_impact
stringclasses 4
values | cvss2_integrity_impact
stringclasses 4
values | cvss2_availability_impact
stringclasses 4
values | cvss2_base_score
stringclasses 50
values | cvss3_vector_string
stringclasses 226
values | cvss3_attack_vector
stringclasses 5
values | cvss3_attack_complexity
stringclasses 3
values | cvss3_privileges_required
stringclasses 4
values | cvss3_user_interaction
stringclasses 3
values | cvss3_scope
stringclasses 3
values | cvss3_confidentiality_impact
stringclasses 4
values | cvss3_integrity_impact
stringclasses 4
values | cvss3_availability_impact
stringclasses 4
values | cvss3_base_score
stringclasses 55
values | cvss3_base_severity
stringclasses 5
values | exploitability_score
stringclasses 22
values | impact_score
stringclasses 15
values | ac_insuf_info
stringclasses 3
values | reference_json
stringlengths 221
23.3k
| problemtype_json
stringclasses 200
values | severity
stringclasses 4
values | cve_nodes
stringlengths 2
33.1k
| cve_description
stringlengths 64
1.99k
| cve_last_modified_date
stringlengths 17
17
| cve_published_date
stringlengths 17
17
| cwe_name
stringclasses 125
values | cwe_description
stringclasses 124
values | cwe_extended_description
stringclasses 95
values | cwe_url
stringclasses 124
values | cwe_is_category
int64 0
1
| commit_author
stringlengths 0
34
| commit_author_date
stringlengths 25
25
| commit_msg
stringlengths 0
13.3k
| commit_hash
stringlengths 40
40
| commit_is_merge
stringclasses 1
value | repo_name
stringclasses 467
values | repo_description
stringclasses 459
values | repo_date_created
stringclasses 467
values | repo_date_last_push
stringclasses 467
values | repo_homepage
stringclasses 294
values | repo_owner
stringclasses 470
values | repo_stars
stringclasses 406
values | repo_forks
stringclasses 352
values | function_name
stringlengths 3
120
| function_signature
stringlengths 6
640
| function_parameters
stringlengths 2
302
| function
stringlengths 12
114k
| function_token_count
stringlengths 1
5
| function_before_change
stringclasses 1
value | labels
int64 1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2014-9620 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://mx.gw.com/pipermail/file/2015/001660.html', 'name': '[File] 20150102 file 5.22 is now available', 'refsource': 'MLIST', 'tags': ['Vendor Advisory']}, {'url': 'http://www.debian.org/security/2015/dsa-3121', 'name': 'DSA-3121', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://mx.gw.com/pipermail/file/2014/001653.html', 'name': '[File] 20141216 file 5.21 is now available', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/01/17/9', 'name': '[oss-security] 20150117 Re: CVE request: file(1) DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'name': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'name': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/71715', 'name': '71715', 'refsource': 'BID', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201503-08', 'name': 'GLSA-201503-08', 'refsource': 'GENTOO', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0760.html', 'name': 'RHSA-2016:0760', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-1/', 'name': 'USN-3686-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.08:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.09:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.11:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ELF parser in file 5.08 through 5.21 allows remote attackers to cause a denial of service via a large number of notes.'}] | 2018-06-16T01:29Z | 2015-01-21T18:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Christos Zoulas | 2014-12-16 23:18:40+00:00 | - Add a limit to the number of ELF notes processed (Suggested by Alexander
Cherepanov)
- Restructure ELF note printing so that we don't print the same message
multiple times on repeated notes of the same kind. | ce90e05774dd77d86cfc8dfa6da57b32816841c4 | False | file/file | Read-only mirror of file CVS repository, updated every half hour. NOTE: do not make pull requests here, nor comment any commits, submit them usual way to bug tracker or to the mailing list. Maintainer(s) are not tracking this git mirror. | 2011-01-28 15:20:14 | 2022-08-26 15:47:05 | http://www.darwinsys.com/file/ | file | 922.0 | 297.0 | doshn | doshn( struct magic_set * ms , int clazz , int swap , int fd , off_t off , int num , size_t size , off_t fsize , int * flags , int mach , int strtab) | ['ms', 'clazz', 'swap', 'fd', 'off', 'num', 'size', 'fsize', 'flags', 'mach', 'strtab'] | doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
size_t size, off_t fsize, int *flags, int mach, int strtab)
{
Elf32_Shdr sh32;
Elf64_Shdr sh64;
int stripped = 1;
size_t nbadcap = 0;
void *nbuf;
off_t noff, coff, name_off;
uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */
uint64_t cap_sf1 = 0; /* SunOS 5.x software capabilites */
char name[50];
ssize_t namesize;
if (size != xsh_sizeof) {
if (file_printf(ms, ", corrupted section header size") == -1)
return -1;
return 0;
}
/* Read offset of name section to be able to read section names later */
if (pread(fd, xsh_addr, xsh_sizeof, off + size * strtab) < (ssize_t)xsh_sizeof) {
file_badread(ms);
return -1;
}
name_off = xsh_offset;
for ( ; num; num--) {
/* Read the name of this section. */
if ((namesize = pread(fd, name, sizeof(name) - 1, name_off + xsh_name)) == -1) {
file_badread(ms);
return -1;
}
name[namesize] = '\0';
if (strcmp(name, ".debug_info") == 0)
stripped = 0;
if (pread(fd, xsh_addr, xsh_sizeof, off) < (ssize_t)xsh_sizeof) {
file_badread(ms);
return -1;
}
off += size;
/* Things we can determine before we seek */
switch (xsh_type) {
case SHT_SYMTAB:
#if 0
case SHT_DYNSYM:
#endif
stripped = 0;
break;
default:
if (fsize != SIZE_UNKNOWN && xsh_offset > fsize) {
/* Perhaps warn here */
continue;
}
break;
}
/* Things we can determine when we seek */
switch (xsh_type) {
case SHT_NOTE:
if ((nbuf = malloc(xsh_size)) == NULL) {
file_error(ms, errno, "Cannot allocate memory"
" for note");
return -1;
}
if (pread(fd, nbuf, xsh_size, xsh_offset) < (ssize_t)xsh_size) {
file_badread(ms);
free(nbuf);
return -1;
}
noff = 0;
for (;;) {
if (noff >= (off_t)xsh_size)
break;
noff = donote(ms, nbuf, (size_t)noff,
xsh_size, clazz, swap, 4, flags);
if (noff == 0)
break;
}
free(nbuf);
break;
case SHT_SUNW_cap:
switch (mach) {
case EM_SPARC:
case EM_SPARCV9:
case EM_IA_64:
case EM_386:
case EM_AMD64:
break;
default:
goto skip;
}
if (nbadcap > 5)
break;
if (lseek(fd, xsh_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
coff = 0;
for (;;) {
Elf32_Cap cap32;
Elf64_Cap cap64;
char cbuf[/*CONSTCOND*/
MAX(sizeof cap32, sizeof cap64)];
if ((coff += xcap_sizeof) > (off_t)xsh_size)
break;
if (read(fd, cbuf, (size_t)xcap_sizeof) !=
(ssize_t)xcap_sizeof) {
file_badread(ms);
return -1;
}
if (cbuf[0] == 'A') {
#ifdef notyet
char *p = cbuf + 1;
uint32_t len, tag;
memcpy(&len, p, sizeof(len));
p += 4;
len = getu32(swap, len);
if (memcmp("gnu", p, 3) != 0) {
if (file_printf(ms,
", unknown capability %.3s", p)
== -1)
return -1;
break;
}
p += strlen(p) + 1;
tag = *p++;
memcpy(&len, p, sizeof(len));
p += 4;
len = getu32(swap, len);
if (tag != 1) {
if (file_printf(ms, ", unknown gnu"
" capability tag %d", tag)
== -1)
return -1;
break;
}
// gnu attributes
#endif
break;
}
(void)memcpy(xcap_addr, cbuf, xcap_sizeof);
switch (xcap_tag) {
case CA_SUNW_NULL:
break;
case CA_SUNW_HW_1:
cap_hw1 |= xcap_val;
break;
case CA_SUNW_SF_1:
cap_sf1 |= xcap_val;
break;
default:
if (file_printf(ms,
", with unknown capability "
"0x%" INT64_T_FORMAT "x = 0x%"
INT64_T_FORMAT "x",
(unsigned long long)xcap_tag,
(unsigned long long)xcap_val) == -1)
return -1;
if (nbadcap++ > 2)
coff = xsh_size;
break;
}
}
/*FALLTHROUGH*/
skip:
default:
break;
}
}
if (file_printf(ms, ", %sstripped", stripped ? "" : "not ") == -1)
return -1;
if (cap_hw1) {
const cap_desc_t *cdp;
switch (mach) {
case EM_SPARC:
case EM_SPARC32PLUS:
case EM_SPARCV9:
cdp = cap_desc_sparc;
break;
case EM_386:
case EM_IA_64:
case EM_AMD64:
cdp = cap_desc_386;
break;
default:
cdp = NULL;
break;
}
if (file_printf(ms, ", uses") == -1)
return -1;
if (cdp) {
while (cdp->cd_name) {
if (cap_hw1 & cdp->cd_mask) {
if (file_printf(ms,
" %s", cdp->cd_name) == -1)
return -1;
cap_hw1 &= ~cdp->cd_mask;
}
++cdp;
}
if (cap_hw1)
if (file_printf(ms,
" unknown hardware capability 0x%"
INT64_T_FORMAT "x",
(unsigned long long)cap_hw1) == -1)
return -1;
} else {
if (file_printf(ms,
" hardware capability 0x%" INT64_T_FORMAT "x",
(unsigned long long)cap_hw1) == -1)
return -1;
}
}
if (cap_sf1) {
if (cap_sf1 & SF1_SUNW_FPUSED) {
if (file_printf(ms,
(cap_sf1 & SF1_SUNW_FPKNWN)
? ", uses frame pointer"
: ", not known to use frame pointer") == -1)
return -1;
}
cap_sf1 &= ~SF1_SUNW_MASK;
if (cap_sf1)
if (file_printf(ms,
", with unknown software capability 0x%"
INT64_T_FORMAT "x",
(unsigned long long)cap_sf1) == -1)
return -1;
}
return 0;
} | 1095 | True | 1 |
|
CVE-2014-9620 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://mx.gw.com/pipermail/file/2015/001660.html', 'name': '[File] 20150102 file 5.22 is now available', 'refsource': 'MLIST', 'tags': ['Vendor Advisory']}, {'url': 'http://www.debian.org/security/2015/dsa-3121', 'name': 'DSA-3121', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://mx.gw.com/pipermail/file/2014/001653.html', 'name': '[File] 20141216 file 5.21 is now available', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/01/17/9', 'name': '[oss-security] 20150117 Re: CVE request: file(1) DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'name': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'name': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/71715', 'name': '71715', 'refsource': 'BID', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201503-08', 'name': 'GLSA-201503-08', 'refsource': 'GENTOO', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0760.html', 'name': 'RHSA-2016:0760', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-1/', 'name': 'USN-3686-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.08:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.09:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.11:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ELF parser in file 5.08 through 5.21 allows remote attackers to cause a denial of service via a large number of notes.'}] | 2018-06-16T01:29Z | 2015-01-21T18:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Christos Zoulas | 2014-12-16 23:18:40+00:00 | - Add a limit to the number of ELF notes processed (Suggested by Alexander
Cherepanov)
- Restructure ELF note printing so that we don't print the same message
multiple times on repeated notes of the same kind. | ce90e05774dd77d86cfc8dfa6da57b32816841c4 | False | file/file | Read-only mirror of file CVS repository, updated every half hour. NOTE: do not make pull requests here, nor comment any commits, submit them usual way to bug tracker or to the mailing list. Maintainer(s) are not tracking this git mirror. | 2011-01-28 15:20:14 | 2022-08-26 15:47:05 | http://www.darwinsys.com/file/ | file | 922.0 | 297.0 | file_tryelf | file_tryelf( struct magic_set * ms , int fd , const unsigned char * buf , size_t nbytes) | ['ms', 'fd', 'buf', 'nbytes'] | file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
size_t nbytes)
{
union {
int32_t l;
char c[sizeof (int32_t)];
} u;
int clazz;
int swap;
struct stat st;
off_t fsize;
int flags = 0;
Elf32_Ehdr elf32hdr;
Elf64_Ehdr elf64hdr;
uint16_t type, phnum, shnum;
if (ms->flags & (MAGIC_MIME|MAGIC_APPLE))
return 0;
/*
* ELF executables have multiple section headers in arbitrary
* file locations and thus file(1) cannot determine it from easily.
* Instead we traverse thru all section headers until a symbol table
* one is found or else the binary is stripped.
* Return immediately if it's not ELF (so we avoid pipe2file unless needed).
*/
if (buf[EI_MAG0] != ELFMAG0
|| (buf[EI_MAG1] != ELFMAG1 && buf[EI_MAG1] != OLFMAG1)
|| buf[EI_MAG2] != ELFMAG2 || buf[EI_MAG3] != ELFMAG3)
return 0;
/*
* If we cannot seek, it must be a pipe, socket or fifo.
*/
if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
file_badread(ms);
return -1;
}
if (S_ISREG(st.st_mode) || st.st_size != 0)
fsize = st.st_size;
else
fsize = SIZE_UNKNOWN;
clazz = buf[EI_CLASS];
switch (clazz) {
case ELFCLASS32:
#undef elf_getu
#define elf_getu(a, b) elf_getu32(a, b)
#undef elfhdr
#define elfhdr elf32hdr
#include "elfclass.h"
case ELFCLASS64:
#undef elf_getu
#define elf_getu(a, b) elf_getu64(a, b)
#undef elfhdr
#define elfhdr elf64hdr
#include "elfclass.h"
default:
if (file_printf(ms, ", unknown class %d", clazz) == -1)
return -1;
break;
}
return 0;
} | 265 | True | 1 |
|
CVE-2014-9620 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://mx.gw.com/pipermail/file/2015/001660.html', 'name': '[File] 20150102 file 5.22 is now available', 'refsource': 'MLIST', 'tags': ['Vendor Advisory']}, {'url': 'http://www.debian.org/security/2015/dsa-3121', 'name': 'DSA-3121', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://mx.gw.com/pipermail/file/2014/001653.html', 'name': '[File] 20141216 file 5.21 is now available', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/01/17/9', 'name': '[oss-security] 20150117 Re: CVE request: file(1) DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'name': 'https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'name': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/71715', 'name': '71715', 'refsource': 'BID', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201503-08', 'name': 'GLSA-201503-08', 'refsource': 'GENTOO', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0760.html', 'name': 'RHSA-2016:0760', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-1/', 'name': 'USN-3686-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.08:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.09:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.11:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ELF parser in file 5.08 through 5.21 allows remote attackers to cause a denial of service via a large number of notes.'}] | 2018-06-16T01:29Z | 2015-01-21T18:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Christos Zoulas | 2014-12-16 23:18:40+00:00 | - Add a limit to the number of ELF notes processed (Suggested by Alexander
Cherepanov)
- Restructure ELF note printing so that we don't print the same message
multiple times on repeated notes of the same kind. | ce90e05774dd77d86cfc8dfa6da57b32816841c4 | False | file/file | Read-only mirror of file CVS repository, updated every half hour. NOTE: do not make pull requests here, nor comment any commits, submit them usual way to bug tracker or to the mailing list. Maintainer(s) are not tracking this git mirror. | 2011-01-28 15:20:14 | 2022-08-26 15:47:05 | http://www.darwinsys.com/file/ | file | 922.0 | 297.0 | toomany | toomany( struct magic_set * ms , const char * name , uint16_t num) | ['ms', 'name', 'num'] | toomany(struct magic_set *ms, const char *name, uint16_t num)
{
if (file_printf(ms, ", too many %s header sections (%u)", name, num
) == -1)
return -1;
return 0;
} | 40 | True | 1 |
|
CVE-2014-9621 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://mx.gw.com/pipermail/file/2015/001660.html', 'name': '[File] 20150102 file 5.22 is now available', 'refsource': 'MLIST', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/01/17/9', 'name': '[oss-security] 20150117 Re: CVE request: file(1) DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/file/file/commit/65437cee25199dbd385fb35901bc0011e164276c', 'name': 'https://github.com/file/file/commit/65437cee25199dbd385fb35901bc0011e164276c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://mx.gw.com/pipermail/file/2014/001654.html', 'name': '[File] 20141216 file 5.21 is now available', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'name': 'http://advisories.mageia.org/MGASA-2015-0040.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201503-08', 'name': 'GLSA-201503-08', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-1/', 'name': 'USN-3686-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:file_project:file:5.20:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ELF parser in file 5.16 through 5.21 allows remote attackers to cause a denial of service via a long string.'}] | 2018-06-16T01:29Z | 2015-01-21T18:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Christos Zoulas | 2014-12-16 23:29:42+00:00 | Limit string printing to 100 chars, and add flags I forgot in the previous
commit. | 65437cee25199dbd385fb35901bc0011e164276c | False | file/file | Read-only mirror of file CVS repository, updated every half hour. NOTE: do not make pull requests here, nor comment any commits, submit them usual way to bug tracker or to the mailing list. Maintainer(s) are not tracking this git mirror. | 2011-01-28 15:20:14 | 2022-08-26 15:47:05 | http://www.darwinsys.com/file/ | file | 922.0 | 297.0 | donote | donote( struct magic_set * ms , void * vbuf , size_t offset , size_t size , int clazz , int swap , size_t align , int * flags , uint16_t * notecount) | ['ms', 'vbuf', 'offset', 'size', 'clazz', 'swap', 'align', 'flags', 'notecount'] | donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
int clazz, int swap, size_t align, int *flags, uint16_t *notecount)
{
Elf32_Nhdr nh32;
Elf64_Nhdr nh64;
size_t noff, doff;
uint32_t namesz, descsz;
unsigned char *nbuf = CAST(unsigned char *, vbuf);
if (*notecount == 0)
return 0;
--*notecount;
if (xnh_sizeof + offset > size) {
/*
* We're out of note headers.
*/
return xnh_sizeof + offset;
}
(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
offset += xnh_sizeof;
namesz = xnh_namesz;
descsz = xnh_descsz;
if ((namesz == 0) && (descsz == 0)) {
/*
* We're out of note headers.
*/
return (offset >= size) ? offset : size;
}
if (namesz & 0x80000000) {
(void)file_printf(ms, ", bad note name size 0x%lx",
(unsigned long)namesz);
return 0;
}
if (descsz & 0x80000000) {
(void)file_printf(ms, ", bad note description size 0x%lx",
(unsigned long)descsz);
return 0;
}
noff = offset;
doff = ELF_ALIGN(offset + namesz);
if (offset + namesz > size) {
/*
* We're past the end of the buffer.
*/
return doff;
}
offset = ELF_ALIGN(doff + descsz);
if (doff + descsz > size) {
/*
* We're past the end of the buffer.
*/
return (offset >= size) ? offset : size;
}
if ((*flags & FLAGS_DID_OS_NOTE) == 0) {
if (do_os_note(ms, nbuf, xnh_type, swap,
namesz, descsz, noff, doff, flags))
return size;
}
if ((*flags & FLAGS_DID_BUILD_ID) == 0) {
if (do_bid_note(ms, nbuf, xnh_type, swap,
namesz, descsz, noff, doff, flags))
return size;
}
if ((*flags & FLAGS_DID_NETBSD_PAX) == 0) {
if (do_pax_note(ms, nbuf, xnh_type, swap,
namesz, descsz, noff, doff, flags))
return size;
}
if ((*flags & FLAGS_DID_CORE) == 0) {
if (do_core_note(ms, nbuf, xnh_type, swap,
namesz, descsz, noff, doff, flags, size, clazz))
return size;
}
if (namesz == 7 && strcmp((char *)&nbuf[noff], "NetBSD") == 0) {
switch (xnh_type) {
case NT_NETBSD_VERSION:
return size;
case NT_NETBSD_MARCH:
if (*flags & FLAGS_DID_NETBSD_MARCH)
return size;
if (file_printf(ms, ", compiled for: %.*s", (int)descsz,
(const char *)&nbuf[doff]) == -1)
return size;
break;
case NT_NETBSD_CMODEL:
if (*flags & FLAGS_DID_NETBSD_CMODEL)
return size;
if (file_printf(ms, ", compiler model: %.*s",
(int)descsz, (const char *)&nbuf[doff]) == -1)
return size;
break;
default:
if (*flags & FLAGS_DID_NETBSD_UNKNOWN)
return size;
if (file_printf(ms, ", note=%u", xnh_type) == -1)
return size;
break;
}
return size;
}
return offset;
} | 586 | True | 1 |
|
CVE-2015-8865 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.3 | HIGH | 1.3 | 5.9 | nan | [{'url': 'http://www.php.net/ChangeLog-7.php', 'name': 'http://www.php.net/ChangeLog-7.php', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugs.php.net/bug.php?id=71527', 'name': 'https://bugs.php.net/bug.php?id=71527', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://git.php.net/?p=php-src.git;a=commit;h=fe13566c93f118a15a96320a546c7878fd0cfc5e', 'name': 'http://git.php.net/?p=php-src.git;a=commit;h=fe13566c93f118a15a96320a546c7878fd0cfc5e', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/04/24/1', 'name': '[oss-security] 20160423 Re: CVE request: PHP issues fixed in 7.0.5, 5.6.20 and 5.5.34 releases', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://support.apple.com/HT206567', 'name': 'https://support.apple.com/HT206567', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://bugs.gw.com/view.php?id=522', 'name': 'http://bugs.gw.com/view.php?id=522', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/file/file/commit/6713ca45e7757297381f4b4cdb9cf5e624a9ad36', 'name': 'https://github.com/file/file/commit/6713ca45e7757297381f4b4cdb9cf5e624a9ad36', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.php.net/ChangeLog-5.php', 'name': 'http://www.php.net/ChangeLog-5.php', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.apple.com/archives/security-announce/2016/May/msg00004.html', 'name': 'APPLE-SA-2016-05-16-4', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731', 'name': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3560', 'name': 'DSA-3560', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2952-1', 'name': 'USN-2952-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2952-2', 'name': 'USN-2952-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00057.html', 'name': 'openSUSE-SU-2016:1167', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/85802', 'name': '85802', 'refsource': 'BID', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201701-42', 'name': 'GLSA-201701-42', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/201611-22', 'name': 'GLSA-201611-22', 'refsource': 'GENTOO', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2750.html', 'name': 'RHSA-2016:2750', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-1/', 'name': 'USN-3686-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3686-2/', 'name': 'USN-3686-2', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha5:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:*:*:*:*:*:*:*:*', 'versionEndIncluding': '5.5.33', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*', 'versionEndIncluding': '10.11.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The file_check_mem function in funcs.c in file before 5.23, as used in the Fileinfo component in PHP before 5.5.34, 5.6.x before 5.6.20, and 7.x before 7.0.5, mishandles continuation-level jumps, which allows context-dependent attackers to cause a denial of service (buffer overflow and application crash) or possibly execute arbitrary code via a crafted magic file.'}] | 2018-06-30T01:29Z | 2016-05-20T10:59Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Christos Zoulas | 2015-06-03 18:01:20+00:00 | PR/454: Fix memory corruption when the continuation level jumps by more than
20 in a single step. | 6713ca45e7757297381f4b4cdb9cf5e624a9ad36 | False | file/file | Read-only mirror of file CVS repository, updated every half hour. NOTE: do not make pull requests here, nor comment any commits, submit them usual way to bug tracker or to the mailing list. Maintainer(s) are not tracking this git mirror. | 2011-01-28 15:20:14 | 2022-08-26 15:47:05 | http://www.darwinsys.com/file/ | file | 922.0 | 297.0 | file_check_mem | file_check_mem( struct magic_set * ms , unsigned int level) | ['ms', 'level'] | file_check_mem(struct magic_set *ms, unsigned int level)
{
size_t len;
if (level >= ms->c.len) {
len = (ms->c.len += 20) * sizeof(*ms->c.li);
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
malloc(len) :
realloc(ms->c.li, len));
if (ms->c.li == NULL) {
file_oomem(ms, len);
return -1;
}
}
ms->c.li[level].got_match = 0;
#ifdef ENABLE_CONDITIONALS
ms->c.li[level].last_match = 0;
ms->c.li[level].last_cond = COND_NONE;
#endif /* ENABLE_CONDITIONALS */
return 0;
} | 154 | True | 1 |
CVE-2013-7448 | False | False | False | nan | AV:N/AC:L/Au:N/C:P/I:N/A:N | NETWORK | LOW | NONE | PARTIAL | NONE | NONE | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | NONE | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/5', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/7', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/4', 'name': '[oss-security] 20160218 CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3485', 'name': 'DSA-3485', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/6', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/OpenedHand/didiwiki/pull/1/files', 'name': 'https://github.com/OpenedHand/didiwiki/pull/1/files', 'refsource': 'MISC', 'tags': []}, {'url': 'https://github.com/yarolig/didiwiki/commit/5e5c796617e1712905dc5462b94bd5e6c08d15ea', 'name': 'https://github.com/yarolig/didiwiki/commit/5e5c796617e1712905dc5462b94bd5e6c08d15ea', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:didiwiki_project:didiwiki:*:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Directory traversal vulnerability in wiki.c in didiwiki allows remote attackers to read arbitrary files via the page parameter to api/page/get.'}] | 2016-03-10T19:05Z | 2016-02-23T19:59Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Alexander Izmailov | 2013-10-09 11:48:45+04:00 | page_name_is_good function | 5e5c796617e1712905dc5462b94bd5e6c08d15ea | False | yarolig/didiwiki | null | 2013-10-02 07:17:37 | 2014-09-03 17:41:44 | yarolig | 1.0 | 0.0 | wiki_handle_http_request | wiki_handle_http_request( HttpRequest * req) | ['req'] | wiki_handle_http_request(HttpRequest *req)
{
HttpResponse *res = http_response_new(req);
char *page = http_request_get_path_info(req);
char *command = http_request_get_query_string(req);
char *wikitext = "";
util_dehttpize(page); /* remove any encoding on the requested
page name. */
if (!strcmp(page, "/"))
{
if (access("WikiHome", R_OK) != 0)
wiki_redirect(res, "/WikiHome?create");
page = "/WikiHome";
}
if (!strcmp(page, "/styles.css"))
{
/* Return CSS page */
http_response_set_content_type(res, "text/css");
http_response_printf(res, "%s", CssData);
http_response_send(res);
exit(0);
}
if (!strcmp(page, "/favicon.ico"))
{
/* Return favicon */
http_response_set_content_type(res, "image/ico");
http_response_set_data(res, FaviconData, FaviconDataLen);
http_response_send(res);
exit(0);
}
page = page + 1; /* skip slash */
if (!strncmp(page, "api/", 4))
{
char *p;
page += 4;
for (p=page; *p != '\0'; p++)
if (*p=='?') { *p ='\0'; break; }
wiki_handle_rest_call(req, res, page);
exit(0);
}
/* A little safety. issue a malformed request for any paths,
* There shouldn't need to be any..
*/
if (strchr(page, '/'))
{
http_response_set_status(res, 404, "Not Found");
http_response_printf(res, "<html><body>404 Not Found</body></html>\n");
http_response_send(res);
exit(0);
}
if (!strcmp(page, "Changes"))
{
wiki_show_changes_page(res);
}
else if (!strcmp(page, "ChangesRss"))
{
wiki_show_changes_page_rss(res);
}
else if (!strcmp(page, "Search"))
{
wiki_show_search_results_page(res, http_request_param_get(req, "expr"));
}
else if (!strcmp(page, "Create"))
{
if ( (wikitext = http_request_param_get(req, "title")) != NULL)
{
/* create page and redirect */
wiki_redirect(res, http_request_param_get(req, "title"));
}
else
{
/* show create page form */
wiki_show_create_page(res);
}
}
else
{
/* TODO: dont blindly write wikitext data to disk */
if ( (wikitext = http_request_param_get(req, "wikitext")) != NULL)
{
file_write(page, wikitext);
}
if (access(page, R_OK) == 0) /* page exists */
{
wikitext = file_read(page);
if (!strcmp(command, "edit"))
{
/* print edit page */
wiki_show_edit_page(res, wikitext, page);
}
else
{
wiki_show_page(res, wikitext, page);
}
}
else
{
if (!strcmp(command, "create"))
{
wiki_show_edit_page(res, NULL, page);
}
else
{
char buf[1024];
snprintf(buf, 1024, "%s?create", page);
wiki_redirect(res, buf);
}
}
}
} | 506 | True | 1 |
|
CVE-2013-7448 | False | False | False | nan | AV:N/AC:L/Au:N/C:P/I:N/A:N | NETWORK | LOW | NONE | PARTIAL | NONE | NONE | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | NONE | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/5', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/7', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/4', 'name': '[oss-security] 20160218 CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3485', 'name': 'DSA-3485', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/19/6', 'name': '[oss-security] 20160219 Re: CVE request: didiwiki path traversal vulnerability', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/OpenedHand/didiwiki/pull/1/files', 'name': 'https://github.com/OpenedHand/didiwiki/pull/1/files', 'refsource': 'MISC', 'tags': []}, {'url': 'https://github.com/yarolig/didiwiki/commit/5e5c796617e1712905dc5462b94bd5e6c08d15ea', 'name': 'https://github.com/yarolig/didiwiki/commit/5e5c796617e1712905dc5462b94bd5e6c08d15ea', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:didiwiki_project:didiwiki:*:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Directory traversal vulnerability in wiki.c in didiwiki allows remote attackers to read arbitrary files via the page parameter to api/page/get.'}] | 2016-03-10T19:05Z | 2016-02-23T19:59Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Alexander Izmailov | 2013-10-09 11:48:45+04:00 | page_name_is_good function | 5e5c796617e1712905dc5462b94bd5e6c08d15ea | False | yarolig/didiwiki | null | 2013-10-02 07:17:37 | 2014-09-03 17:41:44 | yarolig | 1.0 | 0.0 | wiki_handle_rest_call | wiki_handle_rest_call( HttpRequest * req , HttpResponse * res , char * func) | ['req', 'res', 'func'] | wiki_handle_rest_call(HttpRequest *req,
HttpResponse *res,
char *func)
{
if (func != NULL && *func != '\0')
{
if (!strcmp(func, "page/get"))
{
char *page = http_request_param_get(req, "page");
if (page == NULL)
page = http_request_get_query_string(req);
if (page && (access(page, R_OK) == 0))
{
http_response_printf(res, "%s", file_read(page));
http_response_send(res);
return;
}
}
else if (!strcmp(func, "page/set"))
{
char *wikitext = NULL, *page = NULL;
if( ( (wikitext = http_request_param_get(req, "text")) != NULL)
&& ( (page = http_request_param_get(req, "page")) != NULL))
{
file_write(page, wikitext);
http_response_printf(res, "success");
http_response_send(res);
return;
}
}
else if (!strcmp(func, "page/delete"))
{
char *page = http_request_param_get(req, "page");
if (page == NULL)
page = http_request_get_query_string(req);
if (page && (unlink(page) > 0))
{
http_response_printf(res, "success");
http_response_send(res);
return;
}
}
else if (!strcmp(func, "page/exists"))
{
char *page = http_request_param_get(req, "page");
if (page == NULL)
page = http_request_get_query_string(req);
if (page && (access(page, R_OK) == 0))
{
http_response_printf(res, "success");
http_response_send(res);
return;
}
}
else if (!strcmp(func, "pages") || !strcmp(func, "search"))
{
WikiPageList **pages = NULL;
int n_pages, i;
char *expr = http_request_param_get(req, "expr");
if (expr == NULL)
expr = http_request_get_query_string(req);
pages = wiki_get_pages(&n_pages, expr);
if (pages)
{
for (i=0; i<n_pages; i++)
{
struct tm *pTm;
char datebuf[64];
pTm = localtime(&pages[i]->mtime);
strftime(datebuf, sizeof(datebuf), "%Y-%m-%d %H:%M", pTm);
http_response_printf(res, "%s\t%s\n", pages[i]->name, datebuf);
}
http_response_send(res);
return;
}
}
}
http_response_set_status(res, 500, "Error");
http_response_printf(res, "<html><body>Failed</body></html>\n");
http_response_send(res);
return;
} | 485 | True | 1 |
|
CVE-2013-7449 | False | False | False | False | AV:N/AC:M/Au:N/C:P/I:P/A:N | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | NONE | 5.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | LOW | LOW | NONE | 6.5 | MEDIUM | 3.9 | 2.5 | nan | [{'url': 'https://github.com/hexchat/hexchat/issues/524', 'name': 'https://github.com/hexchat/hexchat/issues/524', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://hexchat.readthedocs.org/en/latest/changelog.html', 'name': 'http://hexchat.readthedocs.org/en/latest/changelog.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/hexchat/hexchat/commit/c9b63f7f9be01692b03fa15275135a4910a7e02d', 'name': 'https://github.com/hexchat/hexchat/commit/c9b63f7f9be01692b03fa15275135a4910a7e02d', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2945-1', 'name': 'USN-2945-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1081839', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1081839', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-310'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xchat:xchat:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xchat:xchat_gnome:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:hexchat_project:hexchat:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ssl_do_connect function in common/server.c in HexChat before 2.10.2, XChat, and XChat-GNOME does not verify that the server hostname matches a domain name in the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via an arbitrary valid certificate.'}] | 2021-07-20T14:36Z | 2016-04-21T14:59Z | Cryptographic Issues | Weaknesses in this category are related to the design and implementation of data confidentiality and integrity. Frequently these deal with the use of encoding techniques, encryption libraries, and hashing algorithms. The weaknesses in this category could lead to a degradation of the quality data if they are not addressed. | https://cwe.mitre.org/data/definitions/310.html | 1 | TingPing | 2014-11-19 21:43:01-05:00 | ssl: Validate hostnames
Closes #524 | c9b63f7f9be01692b03fa15275135a4910a7e02d | False | hexchat/hexchat | GTK+ IRC client | 2012-07-11 20:42:10 | 2022-08-26 17:40:16 | https://hexchat.github.io | hexchat | 2733.0 | 510.0 | ssl_do_connect | ssl_do_connect( server * serv) | ['serv'] | ssl_do_connect (server * serv)
{
char buf[128];
g_sess = serv->server_session;
if (SSL_connect (serv->ssl) <= 0)
{
char err_buf[128];
int err;
g_sess = NULL;
if ((err = ERR_get_error ()) > 0)
{
ERR_error_string (err, err_buf);
snprintf (buf, sizeof (buf), "(%d) %s", err, err_buf);
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL,
NULL, NULL, 0);
if (ERR_GET_REASON (err) == SSL_R_WRONG_VERSION_NUMBER)
PrintText (serv->server_session, _("Are you sure this is a SSL capable server and port?\n"));
server_cleanup (serv);
if (prefs.hex_net_auto_reconnectonfail)
auto_reconnect (serv, FALSE, -1);
return (0); /* remove it (0) */
}
}
g_sess = NULL;
if (SSL_is_init_finished (serv->ssl))
{
struct cert_info cert_info;
struct chiper_info *chiper_info;
int verify_error;
int i;
if (!_SSL_get_cert_info (&cert_info, serv->ssl))
{
snprintf (buf, sizeof (buf), "* Certification info:");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
snprintf (buf, sizeof (buf), " Subject:");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
for (i = 0; cert_info.subject_word[i]; i++)
{
snprintf (buf, sizeof (buf), " %s", cert_info.subject_word[i]);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
}
snprintf (buf, sizeof (buf), " Issuer:");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
for (i = 0; cert_info.issuer_word[i]; i++)
{
snprintf (buf, sizeof (buf), " %s", cert_info.issuer_word[i]);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
}
snprintf (buf, sizeof (buf), " Public key algorithm: %s (%d bits)",
cert_info.algorithm, cert_info.algorithm_bits);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
/*if (cert_info.rsa_tmp_bits)
{
snprintf (buf, sizeof (buf),
" Public key algorithm uses ephemeral key with %d bits",
cert_info.rsa_tmp_bits);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
}*/
snprintf (buf, sizeof (buf), " Sign algorithm %s",
cert_info.sign_algorithm/*, cert_info.sign_algorithm_bits*/);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
snprintf (buf, sizeof (buf), " Valid since %s to %s",
cert_info.notbefore, cert_info.notafter);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
} else
{
snprintf (buf, sizeof (buf), " * No Certificate");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
}
chiper_info = _SSL_get_cipher_info (serv->ssl); /* static buffer */
snprintf (buf, sizeof (buf), "* Cipher info:");
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL,
0);
snprintf (buf, sizeof (buf), " Version: %s, cipher %s (%u bits)",
chiper_info->version, chiper_info->chiper,
chiper_info->chiper_bits);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL,
0);
verify_error = SSL_get_verify_result (serv->ssl);
switch (verify_error)
{
case X509_V_OK:
/* snprintf (buf, sizeof (buf), "* Verify OK (?)"); */
/* EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); */
break;
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
case X509_V_ERR_CERT_HAS_EXPIRED:
if (serv->accept_invalid_cert)
{
snprintf (buf, sizeof (buf), "* Verify E: %s.? (%d) -- Ignored",
X509_verify_cert_error_string (verify_error),
verify_error);
EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
NULL, 0);
break;
}
default:
snprintf (buf, sizeof (buf), "%s.? (%d)",
X509_verify_cert_error_string (verify_error),
verify_error);
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL, NULL,
NULL, 0);
server_cleanup (serv);
return (0);
}
server_stopconnecting (serv);
/* activate gtk poll */
server_connected (serv);
return (0); /* remove it (0) */
} else
{
if (serv->ssl->session && serv->ssl->session->time + SSLTMOUT < time (NULL))
{
snprintf (buf, sizeof (buf), "SSL handshake timed out");
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL,
NULL, NULL, 0);
server_cleanup (serv); /* ->connecting = FALSE */
if (prefs.hex_net_auto_reconnectonfail)
auto_reconnect (serv, FALSE, -1);
return (0); /* remove it (0) */
}
return (1); /* call it more (1) */
}
} | 867 | True | 1 |
|
CVE-2013-7456 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | LOW | LOW | HIGH | 7.6 | HIGH | 2.8 | 4.7 | nan | [{'url': 'https://bugs.php.net/bug.php?id=72227', 'name': 'https://bugs.php.net/bug.php?id=72227', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://php.net/ChangeLog-7.php', 'name': 'http://php.net/ChangeLog-7.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://php.net/ChangeLog-5.php', 'name': 'http://php.net/ChangeLog-5.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/05/26/3', 'name': '[oss-security] 20160526 Re: Fwd: CVE for PHP 5.5.36 issues', 'refsource': 'MLIST', 'tags': ['Release Notes']}, {'url': 'https://github.com/libgd/libgd/commit/4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a', 'name': 'https://github.com/libgd/libgd/commit/4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/php/php-src/commit/7a1aac3343af85b4af4df5f8844946eaa27394ab?w=1', 'name': 'https://github.com/php/php-src/commit/7a1aac3343af85b4af4df5f8844946eaa27394ab?w=1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731', 'name': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3602', 'name': 'DSA-3602', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3030-1', 'name': 'USN-3030-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3587', 'name': 'DSA-3587', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/90859', 'name': '90859', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2750.html', 'name': 'RHSA-2016:2750', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.1.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha5:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:*:*:*:*:*:*:*:*', 'versionEndIncluding': '5.5.35', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:beta4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.0:alpha1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.6.3:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.1.1, as used in PHP before 5.5.36, 5.6.x before 5.6.22, and 7.x before 7.0.7, allows remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via a crafted image that is mishandled by the imagescale function.'}] | 2018-01-05T02:29Z | 2016-08-07T10:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Chris Reuter | 2013-09-23 18:03:08-04:00 | Fixed memory overrun bug in gdImageScaleTwoPass
_gdContributionsCalc would compute a window size and then adjust
the left and right positions of the window to make a window within
that size. However, it was storing the values in the struct *before*
it made the adjustment. This change fixes that. | 4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | _gdContributionsCalc | _gdContributionsCalc( unsigned int line_size , unsigned int src_size , double scale_d , const interpolation_method pFilter) | ['line_size', 'src_size', 'scale_d', 'pFilter'] | static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsigned int src_size, double scale_d, const interpolation_method pFilter)
{
double width_d;
double scale_f_d = 1.0;
const double filter_width_d = DEFAULT_BOX_RADIUS;
int windows_size;
unsigned int u;
LineContribType *res;
if (scale_d < 1.0) {
width_d = filter_width_d / scale_d;
scale_f_d = scale_d;
} else {
width_d= filter_width_d;
}
windows_size = 2 * (int)ceil(width_d) + 1;
res = _gdContributionsAlloc(line_size, windows_size);
for (u = 0; u < line_size; u++) {
const double dCenter = (double)u / scale_d;
/* get the significant edge points affecting the pixel */
register int iLeft = MAX(0, (int)floor (dCenter - width_d));
int iRight = MIN((int)ceil(dCenter + width_d), (int)src_size - 1);
double dTotalWeight = 0.0;
int iSrc;
res->ContribRow[u].Left = iLeft;
res->ContribRow[u].Right = iRight;
/* Cut edge points to fit in filter window in case of spill-off */
if (iRight - iLeft + 1 > windows_size) {
if (iLeft < ((int)src_size - 1 / 2)) {
iLeft++;
} else {
iRight--;
}
}
for (iSrc = iLeft; iSrc <= iRight; iSrc++) {
dTotalWeight += (res->ContribRow[u].Weights[iSrc-iLeft] = scale_f_d * (*pFilter)(scale_f_d * (dCenter - (double)iSrc)));
}
if (dTotalWeight < 0.0) {
_gdContributionsFree(res);
return NULL;
}
if (dTotalWeight > 0.0) {
for (iSrc = iLeft; iSrc <= iRight; iSrc++) {
res->ContribRow[u].Weights[iSrc-iLeft] /= dTotalWeight;
}
}
}
return res;
} | 349 | True | 1 |
CVE-2016-8670 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/53110871935244816bbb9d131da0bccff734bfe9', 'name': 'https://github.com/libgd/libgd/commit/53110871935244816bbb9d131da0bccff734bfe9', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugs.php.net/bug.php?id=73280', 'name': 'https://bugs.php.net/bug.php?id=73280', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.php.net/ChangeLog-7.php', 'name': 'http://www.php.net/ChangeLog-7.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.php.net/ChangeLog-5.php', 'name': 'http://www.php.net/ChangeLog-5.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/15/1', 'name': '[oss-security] 20161015 CVE Request: libgd: Stack Buffer Overflow in GD dynamicGetbuf', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/93594', 'name': '93594', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3693', 'name': 'DSA-3693', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K21336065?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K21336065?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:*:*:*:*:*:*:*:*', 'versionEndIncluding': '5.6.27', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.6:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.'}] | 2017-11-04T01:29Z | 2017-01-04T20:59Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Christoph M. Becker | 2016-10-12 11:15:32+02:00 | Avoid potentially dangerous signed to unsigned conversion
We make sure to never pass a negative `rlen` as size to memcpy(). See
also <https://bugs.php.net/bug.php?id=73280>.
Patch provided by Emmanuel Law. | 53110871935244816bbb9d131da0bccff734bfe9 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | dynamicGetbuf | dynamicGetbuf( gdIOCtxPtr ctx , void * buf , int len) | ['ctx', 'buf', 'len'] | static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
{
int rlen, remain;
dpIOCtxPtr dctx;
dynamicPtr *dp;
dctx = (dpIOCtxPtr) ctx;
dp = dctx->dp;
remain = dp->logicalSize - dp->pos;
if(remain >= len) {
rlen = len;
} else {
if(remain == 0) {
/* 2.0.34: EOF is incorrect. We use 0 for
* errors and EOF, just like fileGetbuf,
* which is a simple fread() wrapper.
* TBB. Original bug report: Daniel Cowgill. */
return 0; /* NOT EOF */
}
rlen = remain;
}
memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen);
dp->pos += rlen;
return rlen;
} | 113 | True | 1 |
CVE-2016-6906 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'name': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'name': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96503', 'name': '96503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA file, related to the decompression buffer.'}] | 2017-11-04T01:29Z | 2017-03-15T14:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-08-16 16:26:19+02:00 | Fix OOB reads of the TGA decompression buffer
It is possible to craft TGA files which will overflow the decompression
buffer, but not the image's bitmap. Therefore we augment the check for the
bitmap's overflow with a check for the buffer's overflow.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6906 | fb0e0cce0b9f25389ab56604c3547351617e1415 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | read_image_tga | read_image_tga( gdIOCtx * ctx , oTga * tga) | ['ctx', 'tga'] | int read_image_tga( gdIOCtx *ctx, oTga *tga )
{
int pixel_block_size = (tga->bits / 8);
int image_block_size = (tga->width * tga->height) * pixel_block_size;
int* decompression_buffer = NULL;
unsigned char* conversion_buffer = NULL;
int buffer_caret = 0;
int bitmap_caret = 0;
int i = 0;
int encoded_pixels;
int rle_size;
if(overflow2(tga->width, tga->height)) {
return -1;
}
if(overflow2(tga->width * tga->height, pixel_block_size)) {
return -1;
}
if(overflow2(image_block_size, sizeof(int))) {
return -1;
}
/*! \todo Add more image type support.
*/
if (tga->imagetype != TGA_TYPE_RGB && tga->imagetype != TGA_TYPE_RGB_RLE)
return -1;
/*! \brief Allocate memmory for image block
* Allocate a chunk of memory for the image block to be passed into.
*/
tga->bitmap = (int *) gdMalloc(image_block_size * sizeof(int));
if (tga->bitmap == NULL)
return -1;
switch (tga->imagetype) {
case TGA_TYPE_RGB:
/*! \brief Read in uncompressed RGB TGA
* Chunk load the pixel data from an uncompressed RGB type TGA.
*/
conversion_buffer = (unsigned char *) gdMalloc(image_block_size * sizeof(unsigned char));
if (conversion_buffer == NULL) {
return -1;
}
if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) {
gd_error("gd-tga: premature end of image data\n");
gdFree(conversion_buffer);
return -1;
}
while (buffer_caret < image_block_size) {
tga->bitmap[buffer_caret] = (int) conversion_buffer[buffer_caret];
buffer_caret++;
}
gdFree(conversion_buffer);
break;
case TGA_TYPE_RGB_RLE:
/*! \brief Read in RLE compressed RGB TGA
* Chunk load the pixel data from an RLE compressed RGB type TGA.
*/
decompression_buffer = (int*) gdMalloc(image_block_size * sizeof(int));
if (decompression_buffer == NULL) {
return -1;
}
conversion_buffer = (unsigned char *) gdMalloc(image_block_size * sizeof(unsigned char));
if (conversion_buffer == NULL) {
gd_error("gd-tga: premature end of image data\n");
gdFree( decompression_buffer );
return -1;
}
rle_size = gdGetBuf(conversion_buffer, image_block_size, ctx);
if (rle_size <= 0) {
gdFree(conversion_buffer);
gdFree(decompression_buffer);
return -1;
}
buffer_caret = 0;
while( buffer_caret < rle_size) {
decompression_buffer[buffer_caret] = (int)conversion_buffer[buffer_caret];
buffer_caret++;
}
buffer_caret = 0;
while( bitmap_caret < image_block_size ) {
if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) {
encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 );
buffer_caret++;
if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) {
gdFree( decompression_buffer );
gdFree( conversion_buffer );
return -1;
}
for (i = 0; i < encoded_pixels; i++) {
memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size * sizeof(int));
bitmap_caret += pixel_block_size;
}
buffer_caret += pixel_block_size;
} else {
encoded_pixels = decompression_buffer[ buffer_caret ] + 1;
buffer_caret++;
if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) {
gdFree( decompression_buffer );
gdFree( conversion_buffer );
return -1;
}
memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size * sizeof(int));
bitmap_caret += (encoded_pixels * pixel_block_size);
buffer_caret += (encoded_pixels * pixel_block_size);
}
}
gdFree( decompression_buffer );
gdFree( conversion_buffer );
break;
}
return 1;
} | 629 | True | 1 |
CVE-2016-6911 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/pull/353', 'name': 'https://github.com/libgd/libgd/pull/353', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae', 'name': 'https://github.com/libgd/libgd/commit/4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Release Notes', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/95840', 'name': '95840', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3693', 'name': 'DSA-3693', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The dynamicGetbuf function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TIFF image.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-08-02 12:10:33+02:00 | Fix invalid read in gdImageCreateFromTiffPtr()
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, but also positive buffer
overflows have to be handled, in which case 0 has to be returned (cf. commit
75e29a9).
Fixing dynamicGetbuf() exhibits that the corrupt TIFF would still create
the image, because the return value of TIFFReadRGBAImage() is not checked.
We do that, and let createFromTiffRgba() fail if TIFFReadRGBAImage() fails.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6911 | 4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | dynamicGetbuf | dynamicGetbuf( gdIOCtxPtr ctx , void * buf , int len) | ['ctx', 'buf', 'len'] | static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
{
int rlen, remain;
dpIOCtxPtr dctx;
dynamicPtr *dp;
dctx = (dpIOCtxPtr) ctx;
dp = dctx->dp;
remain = dp->logicalSize - dp->pos;
if(remain >= len) {
rlen = len;
} else {
if(remain <= 0) {
/* 2.0.34: EOF is incorrect. We use 0 for
* errors and EOF, just like fileGetbuf,
* which is a simple fread() wrapper.
* TBB. Original bug report: Daniel Cowgill. */
return 0; /* NOT EOF */
}
rlen = remain;
}
memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen);
dp->pos += rlen;
return rlen;
} | 113 | True | 1 |
CVE-2016-6911 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/pull/353', 'name': 'https://github.com/libgd/libgd/pull/353', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae', 'name': 'https://github.com/libgd/libgd/commit/4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Release Notes', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/95840', 'name': '95840', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3693', 'name': 'DSA-3693', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The dynamicGetbuf function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TIFF image.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-08-02 12:10:33+02:00 | Fix invalid read in gdImageCreateFromTiffPtr()
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, but also positive buffer
overflows have to be handled, in which case 0 has to be returned (cf. commit
75e29a9).
Fixing dynamicGetbuf() exhibits that the corrupt TIFF would still create
the image, because the return value of TIFFReadRGBAImage() is not checked.
We do that, and let createFromTiffRgba() fail if TIFFReadRGBAImage() fails.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6911 | 4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | createFromTiffRgba | createFromTiffRgba( TIFF * tif , gdImagePtr im) | ['tif', 'im'] | static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
{
int a;
int x, y;
int alphaBlendingFlag = 0;
int color;
int width = im->sx;
int height = im->sy;
uint32 *buffer;
uint32 rgba;
/* switch off colour merging on target gd image just while we write out
* content - we want to preserve the alpha data until the user chooses
* what to do with the image */
alphaBlendingFlag = im->alphaBlendingFlag;
gdImageAlphaBlending(im, 0);
buffer = (uint32 *) gdCalloc(sizeof(uint32), width * height);
if (!buffer) {
return GD_FAILURE;
}
TIFFReadRGBAImage(tif, width, height, buffer, 0);
for(y = 0; y < height; y++) {
for(x = 0; x < width; x++) {
/* if it doesn't already exist, allocate a new colour,
* else use existing one */
rgba = buffer[(y * width + x)];
a = (0xff - TIFFGetA(rgba)) / 2;
color = gdTrueColorAlpha(TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), a);
/* set pixel colour to this colour */
gdImageSetPixel(im, x, height - y - 1, color);
}
}
gdFree(buffer);
/* now reset colour merge for alpha blending routines */
gdImageAlphaBlending(im, alphaBlendingFlag);
return GD_SUCCESS;
} | 210 | True | 1 |
CVE-2016-6912 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'name': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Patch']}, {'url': 'http://www.securityfocus.com/bid/95843', 'name': '95843', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via large width and height values.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2016-08-16 17:40:23+02:00 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is not, in this case,
because there is a size limitation for WebP, namely that the width and
height must by less than 16383.
We can't change the signature of gdImageWebpCtx() for API compatibility
reasons, so we introduce the static helper _gdImageWebpCtx() which returns
success respective failure, so gdImageWebpPtr() and gdImageWebpPtrEx() can
check the return value. We leave it solely to libwebp for now to report
warnings regarding the failing write.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6912 | a49feeae76d41959d85ee733925a4cf40bac61b2 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWebp | gdImageWebp( gdImagePtr im , FILE * outFile) | ['im', 'outFile'] | BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
{
gdIOCtx *out = gdNewFileCtx(outFile);
if (out == NULL) {
return;
}
gdImageWebpCtx(im, out, -1);
out->gd_free(out);
} | 46 | True | 1 |
CVE-2016-6912 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'name': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Patch']}, {'url': 'http://www.securityfocus.com/bid/95843', 'name': '95843', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via large width and height values.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2016-08-16 17:40:23+02:00 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is not, in this case,
because there is a size limitation for WebP, namely that the width and
height must by less than 16383.
We can't change the signature of gdImageWebpCtx() for API compatibility
reasons, so we introduce the static helper _gdImageWebpCtx() which returns
success respective failure, so gdImageWebpPtr() and gdImageWebpPtrEx() can
check the return value. We leave it solely to libwebp for now to report
warnings regarding the failing write.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6912 | a49feeae76d41959d85ee733925a4cf40bac61b2 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWebpCtx | gdImageWebpCtx( gdImagePtr im , gdIOCtx * outfile , int quality) | ['im', 'outfile', 'quality'] | BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
{
uint8_t *argb;
int x, y;
uint8_t *p;
uint8_t *out;
size_t out_size;
if (im == NULL) {
return;
}
if (!gdImageTrueColor(im)) {
gd_error("Paletter image not supported by webp");
return;
}
if (quality == -1) {
quality = 80;
}
if (overflow2(gdImageSX(im), 4)) {
return;
}
if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) {
return;
}
argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
if (!argb) {
return;
}
p = argb;
for (y = 0; y < gdImageSY(im); y++) {
for (x = 0; x < gdImageSX(im); x++) {
register int c;
register char a;
c = im->tpixels[y][x];
a = gdTrueColorGetAlpha(c);
if (a == 127) {
a = 0;
} else {
a = 255 - ((a << 1) + (a >> 6));
}
*(p++) = gdTrueColorGetRed(c);
*(p++) = gdTrueColorGetGreen(c);
*(p++) = gdTrueColorGetBlue(c);
*(p++) = a;
}
}
out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quality, &out);
if (out_size == 0) {
gd_error("gd-webp encoding failed");
goto freeargb;
}
gdPutBuf(out, out_size, outfile);
free(out);
freeargb:
gdFree(argb);
} | 349 | True | 1 |
CVE-2016-6912 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'name': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Patch']}, {'url': 'http://www.securityfocus.com/bid/95843', 'name': '95843', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via large width and height values.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2016-08-16 17:40:23+02:00 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is not, in this case,
because there is a size limitation for WebP, namely that the width and
height must by less than 16383.
We can't change the signature of gdImageWebpCtx() for API compatibility
reasons, so we introduce the static helper _gdImageWebpCtx() which returns
success respective failure, so gdImageWebpPtr() and gdImageWebpPtrEx() can
check the return value. We leave it solely to libwebp for now to report
warnings regarding the failing write.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6912 | a49feeae76d41959d85ee733925a4cf40bac61b2 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWebpEx | gdImageWebpEx( gdImagePtr im , FILE * outFile , int quality) | ['im', 'outFile', 'quality'] | BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quality)
{
gdIOCtx *out = gdNewFileCtx(outFile);
if (out == NULL) {
return;
}
gdImageWebpCtx(im, out, quality);
out->gd_free(out);
} | 48 | True | 1 |
CVE-2016-6912 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'name': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Patch']}, {'url': 'http://www.securityfocus.com/bid/95843', 'name': '95843', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via large width and height values.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2016-08-16 17:40:23+02:00 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is not, in this case,
because there is a size limitation for WebP, namely that the width and
height must by less than 16383.
We can't change the signature of gdImageWebpCtx() for API compatibility
reasons, so we introduce the static helper _gdImageWebpCtx() which returns
success respective failure, so gdImageWebpPtr() and gdImageWebpPtrEx() can
check the return value. We leave it solely to libwebp for now to report
warnings regarding the failing write.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6912 | a49feeae76d41959d85ee733925a4cf40bac61b2 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWebpPtr | gdImageWebpPtr( gdImagePtr im , int * size) | ['im', 'size'] | BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) {
return NULL;
}
gdImageWebpCtx(im, out, -1);
rv = gdDPExtractData(out, size);
out->gd_free(out);
return rv;
} | 65 | True | 1 |
CVE-2016-6912 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'name': 'https://github.com/libgd/libgd/commit/a49feeae76d41959d85ee733925a4cf40bac61b2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Patch']}, {'url': 'http://www.securityfocus.com/bid/95843', 'name': '95843', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via large width and height values.'}] | 2017-11-04T01:29Z | 2017-01-26T15:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2016-08-16 17:40:23+02:00 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is not, in this case,
because there is a size limitation for WebP, namely that the width and
height must by less than 16383.
We can't change the signature of gdImageWebpCtx() for API compatibility
reasons, so we introduce the static helper _gdImageWebpCtx() which returns
success respective failure, so gdImageWebpPtr() and gdImageWebpPtrEx() can
check the return value. We leave it solely to libwebp for now to report
warnings regarding the failing write.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6912 | a49feeae76d41959d85ee733925a4cf40bac61b2 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWebpPtrEx | gdImageWebpPtrEx( gdImagePtr im , int * size , int quality) | ['im', 'size', 'quality'] | BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quality)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) {
return NULL;
}
gdImageWebpCtx(im, out, quality);
rv = gdDPExtractData(out, size);
out->gd_free(out);
return rv;
} | 67 | True | 1 |
CVE-2016-10166 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/libgd/libgd/commit/60bfb401ad5a4a8ae995dcd36372fe15c71e1a35', 'name': 'https://github.com/libgd/libgd/commit/60bfb401ad5a4a8ae995dcd36372fe15c71e1a35', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/95869', 'name': '95869', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/01/28/6', 'name': '[oss-security] 20170128 Re: CVE Requests: libgd: potential unsigned onderflow, denial-of-service in gdImageCreateFromGd2Ctx and signed overflow in gd_io.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/01/26/1', 'name': '[oss-security] 20170126 CVE Requests: libgd: potential unsigned onderflow, denial-of-service in gdImageCreateFromGd2Ctx and signed overflow in gd_io.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://libgd.github.io/release-2.2.4.html', 'name': 'http://libgd.github.io/release-2.2.4.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2519', 'name': 'RHSA-2019:2519', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3299', 'name': 'RHSA-2019:3299', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-191'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer underflow in the _gdContributionsAlloc function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have unspecified impact via vectors related to decrementing the u variable.'}] | 2017-11-04T01:29Z | 2017-03-15T15:59Z | Integer Underflow (Wrap or Wraparound) | The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result. | This can happen in signed and unsigned cases.
| https://cwe.mitre.org/data/definitions/191.html | 0 | Christoph M. Becker | 2016-08-06 10:08:53+02:00 | Fix potential unsigned underflow
No need to decrease `u`, so we don't do it. While we're at it, we also factor
out the overflow check of the loop, what improves performance and readability.
This issue has been reported by Stefan Esser to [email protected]. | 60bfb401ad5a4a8ae995dcd36372fe15c71e1a35 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | _gdContributionsAlloc | _gdContributionsAlloc( unsigned int line_length , unsigned int windows_size) | ['line_length', 'windows_size'] | static inline LineContribType * _gdContributionsAlloc(unsigned int line_length, unsigned int windows_size)
{
unsigned int u = 0;
LineContribType *res;
int overflow_error = 0;
res = (LineContribType *) gdMalloc(sizeof(LineContribType));
if (!res) {
return NULL;
}
res->WindowSize = windows_size;
res->LineLength = line_length;
if (overflow2(line_length, sizeof(ContributionType))) {
gdFree(res);
return NULL;
}
res->ContribRow = (ContributionType *) gdMalloc(line_length * sizeof(ContributionType));
if (res->ContribRow == NULL) {
gdFree(res);
return NULL;
}
for (u = 0 ; u < line_length ; u++) {
if (overflow2(windows_size, sizeof(double))) {
overflow_error = 1;
} else {
res->ContribRow[u].Weights = (double *) gdMalloc(windows_size * sizeof(double));
}
if (overflow_error == 1 || res->ContribRow[u].Weights == NULL) {
unsigned int i;
u--;
for (i=0;i<=u;i++) {
gdFree(res->ContribRow[i].Weights);
}
gdFree(res->ContribRow);
gdFree(res);
return NULL;
}
}
return res;
} | 251 | True | 1 |
CVE-2016-10167 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/fe9ed49dafa993e3af96b6a5a589efeea9bfb36f', 'name': 'https://github.com/libgd/libgd/commit/fe9ed49dafa993e3af96b6a5a589efeea9bfb36f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/95869', 'name': '95869', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/01/28/6', 'name': '[oss-security] 20170128 Re: CVE Requests: libgd: potential unsigned onderflow, denial-of-service in gdImageCreateFromGd2Ctx and signed overflow in gd_io.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/01/26/1', 'name': '[oss-security] 20170126 CVE Requests: libgd: potential unsigned onderflow, denial-of-service in gdImageCreateFromGd2Ctx and signed overflow in gd_io.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://libgd.github.io/release-2.2.4.html', 'name': 'http://libgd.github.io/release-2.2.4.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.securitytracker.com/id/1037659', 'name': '1037659', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://www.tenable.com/security/tns-2017-04', 'name': 'https://www.tenable.com/security/tns-2017-04', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:3221', 'name': 'RHSA-2017:3221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1296', 'name': 'RHSA-2018:1296', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The gdImageCreateFromGd2Ctx function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (application crash) via a crafted image file.'}] | 2018-05-04T01:29Z | 2017-03-15T15:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Christoph M. Becker | 2016-08-16 18:23:36+02:00 | Fix DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully. | fe9ed49dafa993e3af96b6a5a589efeea9bfb36f | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageCreateFromGd2Ctx | gdImageCreateFromGd2Ctx( gdIOCtxPtr in) | ['in'] | BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
{
int sx, sy;
int i;
int ncx, ncy, nc, cs, cx, cy;
int x, y, ylo, yhi, xlo, xhi;
int vers, fmt;
t_chunk_info *chunkIdx = NULL; /* So we can gdFree it with impunity. */
unsigned char *chunkBuf = NULL; /* So we can gdFree it with impunity. */
int chunkNum = 0;
int chunkMax = 0;
uLongf chunkLen;
int chunkPos = 0;
int compMax = 0;
int bytesPerPixel;
char *compBuf = NULL; /* So we can gdFree it with impunity. */
gdImagePtr im;
/* Get the header */
im =
_gd2CreateFromFile (in, &sx, &sy, &cs, &vers, &fmt, &ncx, &ncy,
&chunkIdx);
if (im == NULL) {
/* No need to free chunkIdx as _gd2CreateFromFile does it for us. */
return 0;
}
bytesPerPixel = im->trueColor ? 4 : 1;
nc = ncx * ncy;
if (gd2_compressed (fmt)) {
/* Find the maximum compressed chunk size. */
compMax = 0;
for (i = 0; (i < nc); i++) {
if (chunkIdx[i].size > compMax) {
compMax = chunkIdx[i].size;
};
};
compMax++;
/* Allocate buffers */
chunkMax = cs * bytesPerPixel * cs;
chunkBuf = gdCalloc (chunkMax, 1);
if (!chunkBuf) {
goto fail;
}
compBuf = gdCalloc (compMax, 1);
if (!compBuf) {
goto fail;
}
GD2_DBG (printf ("Largest compressed chunk is %d bytes\n", compMax));
};
/* if ( (ncx != sx / cs) || (ncy != sy / cs)) { */
/* goto fail2; */
/* }; */
/* Read the data... */
for (cy = 0; (cy < ncy); cy++) {
for (cx = 0; (cx < ncx); cx++) {
ylo = cy * cs;
yhi = ylo + cs;
if (yhi > im->sy) {
yhi = im->sy;
};
GD2_DBG (printf
("Processing Chunk %d (%d, %d), y from %d to %d\n",
chunkNum, cx, cy, ylo, yhi));
if (gd2_compressed (fmt)) {
chunkLen = chunkMax;
if (!_gd2ReadChunk (chunkIdx[chunkNum].offset,
compBuf,
chunkIdx[chunkNum].size,
(char *) chunkBuf, &chunkLen, in)) {
GD2_DBG (printf ("Error reading comproessed chunk\n"));
goto fail;
};
chunkPos = 0;
};
for (y = ylo; (y < yhi); y++) {
xlo = cx * cs;
xhi = xlo + cs;
if (xhi > im->sx) {
xhi = im->sx;
};
/*GD2_DBG(printf("y=%d: ",y)); */
if (!gd2_compressed (fmt)) {
for (x = xlo; x < xhi; x++) {
if (im->trueColor) {
if (!gdGetInt (&im->tpixels[y][x], in)) {
/*printf("EOF while reading\n"); */
/*gdImageDestroy(im); */
/*return 0; */
im->tpixels[y][x] = 0;
}
} else {
int ch;
if (!gdGetByte (&ch, in)) {
/*printf("EOF while reading\n"); */
/*gdImageDestroy(im); */
/*return 0; */
ch = 0;
}
im->pixels[y][x] = ch;
}
}
} else {
for (x = xlo; x < xhi; x++) {
if (im->trueColor) {
/* 2.0.1: work around a gcc bug by being verbose.
TBB */
int a = chunkBuf[chunkPos++] << 24;
int r = chunkBuf[chunkPos++] << 16;
int g = chunkBuf[chunkPos++] << 8;
int b = chunkBuf[chunkPos++];
/* 2.0.11: tpixels */
im->tpixels[y][x] = a + r + g + b;
} else {
im->pixels[y][x] = chunkBuf[chunkPos++];
}
};
};
/*GD2_DBG(printf("\n")); */
};
chunkNum++;
};
};
GD2_DBG (printf ("Freeing memory\n"));
gdFree (chunkBuf);
gdFree (compBuf);
gdFree (chunkIdx);
GD2_DBG (printf ("Done\n"));
return im;
fail:
gdImageDestroy (im);
if (chunkBuf) {
gdFree (chunkBuf);
}
if (compBuf) {
gdFree (compBuf);
}
if (chunkIdx) {
gdFree (chunkIdx);
}
return 0;
} | 751 | True | 1 |
CVE-2016-6906 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'name': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'name': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96503', 'name': '96503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA file, related to the decompression buffer.'}] | 2017-11-04T01:29Z | 2017-03-15T14:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-08-16 16:26:19+02:00 | Fix OOB reads of the TGA decompression buffer
It is possible to craft TGA files which will overflow the decompression
buffer, but not the image's bitmap. Therefore we also have to check for
potential decompression buffer overflows.
This issue had been reported by Ibrahim El-Sayed to [email protected];
a modified case exposing an off-by-one error of the first patch had been
provided by Konrad Beckmann.
This commit is an amendment to commit fb0e0cce, so we use CVE-2016-6906
as well. | 58b6dde319c301b0eae27d12e2a659e067d80558 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | read_image_tga | read_image_tga( gdIOCtx * ctx , oTga * tga) | ['ctx', 'tga'] | int read_image_tga( gdIOCtx *ctx, oTga *tga )
{
int pixel_block_size = (tga->bits / 8);
int image_block_size = (tga->width * tga->height) * pixel_block_size;
int* decompression_buffer = NULL;
unsigned char* conversion_buffer = NULL;
int buffer_caret = 0;
int bitmap_caret = 0;
int i = 0;
int encoded_pixels;
int rle_size;
if(overflow2(tga->width, tga->height)) {
return -1;
}
if(overflow2(tga->width * tga->height, pixel_block_size)) {
return -1;
}
if(overflow2(image_block_size, sizeof(int))) {
return -1;
}
/*! \todo Add more image type support.
*/
if (tga->imagetype != TGA_TYPE_RGB && tga->imagetype != TGA_TYPE_RGB_RLE)
return -1;
/*! \brief Allocate memmory for image block
* Allocate a chunk of memory for the image block to be passed into.
*/
tga->bitmap = (int *) gdMalloc(image_block_size * sizeof(int));
if (tga->bitmap == NULL)
return -1;
switch (tga->imagetype) {
case TGA_TYPE_RGB:
/*! \brief Read in uncompressed RGB TGA
* Chunk load the pixel data from an uncompressed RGB type TGA.
*/
conversion_buffer = (unsigned char *) gdMalloc(image_block_size * sizeof(unsigned char));
if (conversion_buffer == NULL) {
return -1;
}
if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) {
gd_error("gd-tga: premature end of image data\n");
gdFree(conversion_buffer);
return -1;
}
while (buffer_caret < image_block_size) {
tga->bitmap[buffer_caret] = (int) conversion_buffer[buffer_caret];
buffer_caret++;
}
gdFree(conversion_buffer);
break;
case TGA_TYPE_RGB_RLE:
/*! \brief Read in RLE compressed RGB TGA
* Chunk load the pixel data from an RLE compressed RGB type TGA.
*/
decompression_buffer = (int*) gdMalloc(image_block_size * sizeof(int));
if (decompression_buffer == NULL) {
return -1;
}
conversion_buffer = (unsigned char *) gdMalloc(image_block_size * sizeof(unsigned char));
if (conversion_buffer == NULL) {
gd_error("gd-tga: premature end of image data\n");
gdFree( decompression_buffer );
return -1;
}
rle_size = gdGetBuf(conversion_buffer, image_block_size, ctx);
if (rle_size <= 0) {
gdFree(conversion_buffer);
gdFree(decompression_buffer);
return -1;
}
buffer_caret = 0;
while( buffer_caret < rle_size) {
decompression_buffer[buffer_caret] = (int)conversion_buffer[buffer_caret];
buffer_caret++;
}
buffer_caret = 0;
while( bitmap_caret < image_block_size ) {
if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) {
encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 );
buffer_caret++;
if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size
|| buffer_caret + pixel_block_size > rle_size) {
gdFree( decompression_buffer );
gdFree( conversion_buffer );
return -1;
}
for (i = 0; i < encoded_pixels; i++) {
memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size * sizeof(int));
bitmap_caret += pixel_block_size;
}
buffer_caret += pixel_block_size;
} else {
encoded_pixels = decompression_buffer[ buffer_caret ] + 1;
buffer_caret++;
if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size
|| buffer_caret + (encoded_pixels * pixel_block_size) > rle_size) {
gdFree( decompression_buffer );
gdFree( conversion_buffer );
return -1;
}
memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size * sizeof(int));
bitmap_caret += (encoded_pixels * pixel_block_size);
buffer_caret += (encoded_pixels * pixel_block_size);
}
}
gdFree( decompression_buffer );
gdFree( conversion_buffer );
break;
}
return 1;
} | 645 | True | 1 |
CVE-2016-6906 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'name': 'https://github.com/libgd/libgd/commit/fb0e0cce0b9f25389ab56604c3547351617e1415', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'name': 'https://github.com/libgd/libgd/commit/58b6dde319c301b0eae27d12e2a659e067d80558', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'name': 'https://github.com/libgd/libgd/blob/gd-2.2.4/CHANGELOG.md', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96503', 'name': '96503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.debian.org/security/2017/dsa-3777', 'name': 'DSA-3777', 'refsource': 'DEBIAN', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA file, related to the decompression buffer.'}] | 2017-11-04T01:29Z | 2017-03-15T14:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-08-16 16:26:19+02:00 | Fix OOB reads of the TGA decompression buffer
It is possible to craft TGA files which will overflow the decompression
buffer, but not the image's bitmap. Therefore we also have to check for
potential decompression buffer overflows.
This issue had been reported by Ibrahim El-Sayed to [email protected];
a modified case exposing an off-by-one error of the first patch had been
provided by Konrad Beckmann.
This commit is an amendment to commit fb0e0cce, so we use CVE-2016-6906
as well. | 58b6dde319c301b0eae27d12e2a659e067d80558 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | main | main() | [] | int main()
{
gdImagePtr im;
char *buffer;
size_t size;
size = read_test_file(&buffer, "heap_overflow.tga");
im = gdImageCreateFromTgaPtr(size, (void *) buffer);
gdTestAssert(im == NULL);
free(buffer);
return gdNumFailures();
} | 55 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageGifCtx | gdImageGifCtx( gdImagePtr im , gdIOCtxPtr out) | ['im', 'out'] | BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
{
gdImagePtr pim = 0, tim = im;
int interlace, BitsPerPixel;
interlace = im->interlace;
if(im->trueColor) {
/* Expensive, but the only way that produces an
acceptable result: mix down to a palette
based temporary image. */
pim = gdImageCreatePaletteFromTrueColor(im, 1, 256);
if(!pim) {
return;
}
tim = pim;
}
BitsPerPixel = colorstobpp(tim->colorsTotal);
/* All set, let's do it. */
GIFEncode(
out, tim->sx, tim->sy, interlace, 0, tim->transparent, BitsPerPixel,
tim->red, tim->green, tim->blue, tim);
if(pim) {
/* Destroy palette based temporary image. */
gdImageDestroy( pim);
}
} | 118 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageGifPtr | gdImageGifPtr( gdImagePtr im , int * size) | ['im', 'size'] | BGD_DECLARE(void *) gdImageGifPtr(gdImagePtr im, int *size)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) return NULL;
gdImageGifCtx(im, out);
rv = gdDPExtractData(out, size);
out->gd_free(out);
return rv;
} | 60 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageJpegCtx | gdImageJpegCtx( gdImagePtr im , gdIOCtx * outfile , int quality) | ['im', 'outfile', 'quality'] | BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality)
{
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
int i, j, jidx;
/* volatile so we can gdFree it on return from longjmp */
volatile JSAMPROW row = 0;
JSAMPROW rowptr[1];
jmpbuf_wrapper jmpbufw;
JDIMENSION nlines;
char comment[255];
#ifdef JPEG_DEBUG
gd_error_ex(GD_DEBUG, "gd-jpeg: gd JPEG version %s\n", GD_JPEG_VERSION);
gd_error_ex(GD_DEBUG, "gd-jpeg: JPEG library version %d, %d-bit sample values\n", JPEG_LIB_VERSION, BITS_IN_JSAMPLE);
if (!im->trueColor) {
for(i = 0; i < im->colorsTotal; i++) {
if(!im->open[i]) {
gd_error_ex(GD_DEBUG, "gd-jpeg: gd colormap index %d: (%d, %d, %d)\n", i, im->red[i], im->green[i], im->blue[i]);
}
}
}
#endif /* JPEG_DEBUG */
memset(&cinfo, 0, sizeof(cinfo));
memset(&jerr, 0, sizeof(jerr));
cinfo.err = jpeg_std_error(&jerr);
cinfo.client_data = &jmpbufw;
if(setjmp(jmpbufw.jmpbuf) != 0) {
/* we're here courtesy of longjmp */
if(row) {
gdFree(row);
}
return;
}
cinfo.err->emit_message = jpeg_emit_message;
cinfo.err->error_exit = fatal_jpeg_error;
jpeg_create_compress(&cinfo);
cinfo.image_width = im->sx;
cinfo.image_height = im->sy;
cinfo.input_components = 3; /* # of color components per pixel */
cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
jpeg_set_defaults(&cinfo);
cinfo.density_unit = 1;
cinfo.X_density = im->res_x;
cinfo.Y_density = im->res_y;
if(quality >= 0) {
jpeg_set_quality(&cinfo, quality, TRUE);
if (quality >= 90) {
cinfo.comp_info[0].h_samp_factor = 1;
cinfo.comp_info[0].v_samp_factor = 1;
}
}
/* If user requests interlace, translate that to progressive JPEG */
if(gdImageGetInterlaced(im)) {
#ifdef JPEG_DEBUG
gd_error_ex(GD_DEBUG, "gd-jpeg: interlace set, outputting progressive JPEG image\n");
#endif
jpeg_simple_progression(&cinfo);
}
jpeg_gdIOCtx_dest(&cinfo, outfile);
row = (JSAMPROW)gdCalloc(1, cinfo.image_width * cinfo.input_components * sizeof(JSAMPLE));
if(row == 0) {
gd_error("gd-jpeg: error: unable to allocate JPEG row structure: gdCalloc returns NULL\n");
jpeg_destroy_compress(&cinfo);
return;
}
rowptr[0] = row;
jpeg_start_compress(&cinfo, TRUE);
sprintf(comment, "CREATOR: gd-jpeg v%s (using IJG JPEG v%d),", GD_JPEG_VERSION, JPEG_LIB_VERSION);
if(quality >= 0) {
sprintf (comment + strlen(comment), " quality = %d\n", quality);
} else {
strcat(comment + strlen(comment), " default quality\n");
}
jpeg_write_marker(&cinfo, JPEG_COM, (unsigned char *) comment, (unsigned int)strlen(comment));
if(im->trueColor) {
#if BITS_IN_JSAMPLE == 12
gd_error(
"gd-jpeg: error: jpeg library was compiled for 12-bit\n"
"precision. This is mostly useless, because JPEGs on the web are\n"
"8-bit and such versions of the jpeg library won't read or write\n"
"them. GD doesn't support these unusual images. Edit your\n"
"jmorecfg.h file to specify the correct precision and completely\n"
"'make clean' and 'make install' libjpeg again. Sorry.\n"
);
goto error;
#endif /* BITS_IN_JSAMPLE == 12 */
for(i = 0; i < im->sy; i++) {
for(jidx = 0, j = 0; j < im->sx; j++) {
int val = im->tpixels[i][j];
row[jidx++] = gdTrueColorGetRed(val);
row[jidx++] = gdTrueColorGetGreen(val);
row[jidx++] = gdTrueColorGetBlue(val);
}
nlines = jpeg_write_scanlines(&cinfo, rowptr, 1);
if(nlines != 1) {
gd_error("gd_jpeg: warning: jpeg_write_scanlines returns %u -- expected 1\n", nlines);
}
}
} else {
for(i = 0; i < im->sy; i++) {
for(jidx = 0, j = 0; j < im->sx; j++) {
int idx = im->pixels[i][j];
/*
* NB: Although gd RGB values are ints, their max value is
* 255 (see the documentation for gdImageColorAllocate())
* -- perfect for 8-bit JPEG encoding (which is the norm)
*/
#if BITS_IN_JSAMPLE == 8
row[jidx++] = im->red[idx];
row[jidx++] = im->green[idx];
row[jidx++] = im->blue[idx];
#elif BITS_IN_JSAMPLE == 12
row[jidx++] = im->red[idx] << 4;
row[jidx++] = im->green[idx] << 4;
row[jidx++] = im->blue[idx] << 4;
#else
#error IJG JPEG library BITS_IN_JSAMPLE value must be 8 or 12
#endif
}
nlines = jpeg_write_scanlines(&cinfo, rowptr, 1);
if(nlines != 1) {
gd_error("gd_jpeg: warning: jpeg_write_scanlines"
" returns %u -- expected 1\n", nlines);
}
}
}
jpeg_finish_compress(&cinfo);
jpeg_destroy_compress(&cinfo);
gdFree(row);
} | 814 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageJpegPtr | gdImageJpegPtr( gdImagePtr im , int * size , int quality) | ['im', 'size', 'quality'] | BGD_DECLARE(void *) gdImageJpegPtr(gdImagePtr im, int *size, int quality)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) return NULL;
gdImageJpegCtx(im, out, quality);
rv = gdDPExtractData(out, size);
out->gd_free(out);
return rv;
} | 65 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWBMPCtx | gdImageWBMPCtx( gdImagePtr image , int fg , gdIOCtx * out) | ['image', 'fg', 'out'] | BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out)
{
int x, y, pos;
Wbmp *wbmp;
/* create the WBMP */
if((wbmp = createwbmp(gdImageSX(image), gdImageSY(image), WBMP_WHITE)) == NULL) {
gd_error("Could not create WBMP\n");
return;
}
/* fill up the WBMP structure */
pos = 0;
for(y = 0; y < gdImageSY(image); y++) {
for(x = 0; x < gdImageSX(image); x++) {
if(gdImageGetPixel(image, x, y) == fg) {
wbmp->bitmap[pos] = WBMP_BLACK;
}
pos++;
}
}
/* write the WBMP to a gd file descriptor */
if(writewbmp(wbmp, &gd_putout, out)) {
gd_error("Could not save WBMP\n");
}
/* des submitted this bugfix: gdFree the memory. */
freewbmp(wbmp);
} | 147 | True | 1 |
CVE-2019-6978 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'name': 'https://github.com/php/php-src/commit/089f7c0bc28d399b0420aa6ef058e4c1c120b2ae', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/492', 'name': 'https://github.com/libgd/libgd/issues/492', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'name': 'https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html', 'name': '[debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2019/dsa-4384', 'name': 'DSA-4384', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3900-1/', 'name': 'USN-3900-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201903-18', 'name': 'GLSA-201903-18', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html', 'name': 'openSUSE-SU-2019:1148', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html', 'name': 'openSUSE-SU-2019:1140', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2722', 'name': 'RHSA-2019:2722', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/', 'name': 'FEDORA-2019-ab7d22a466', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/', 'name': 'FEDORA-2019-d7f8995451', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/', 'name': 'FEDORA-2019-7a06c0e6b4', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c. NOTE: PHP is unaffected.'}] | 2019-04-05T00:29Z | 2019-01-28T08:29Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Christoph M. Becker | 2019-01-17 11:54:55+01:00 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.
We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.
This potential security issue has been reported by Solmaz Salimi (aka.
Rooney). | 553702980ae89c83f2d6e254d62cf82e204956d0 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageWBMPPtr | gdImageWBMPPtr( gdImagePtr im , int * size , int fg) | ['im', 'size', 'fg'] | BGD_DECLARE(void *) gdImageWBMPPtr(gdImagePtr im, int *size, int fg)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
if (out == NULL) return NULL;
gdImageWBMPCtx(im, fg, out);
rv = gdDPExtractData(out, size);
out->gd_free(out);
return rv;
} | 65 | True | 1 |
CVE-2018-14553 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1599032', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1599032', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'https://github.com/libgd/libgd/pull/580', 'name': 'https://github.com/libgd/libgd/pull/580', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/a93eac0e843148dc2d631c3ba80af17e9c8c860f', 'name': 'https://github.com/libgd/libgd/commit/a93eac0e843148dc2d631c3ba80af17e9c8c860f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/02/msg00014.html', 'name': '[debian-lts-announce] 20200218 [SECURITY] [DLA 2106-1] libgd2 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00020.html', 'name': 'openSUSE-SU-2020:0332', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/', 'name': 'FEDORA-2020-e795f92d79', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4316-2/', 'name': 'USN-4316-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4316-1/', 'name': 'USN-4316-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionStartIncluding': '2.1.1', 'versionEndIncluding': '2.2.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.1.0:-:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.1.0:rc2:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'gdImageClone in gd.c in libgd 2.1.0-rc2 through 2.2.5 has a NULL pointer dereference allowing attackers to crash an application via a specific function call sequence. Only affects PHP when linked with an external libgd (not bundled).'}] | 2021-12-30T22:04Z | 2020-02-11T13:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Fábio Cabral Pacheco | 2019-12-20 12:03:33-03:00 | Fix potential NULL pointer dereference in gdImageClone() | a93eac0e843148dc2d631c3ba80af17e9c8c860f | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageClone | gdImageClone( gdImagePtr src) | ['src'] | BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
gdImagePtr dst;
register int i, x;
if (src->trueColor) {
dst = gdImageCreateTrueColor(src->sx , src->sy);
} else {
dst = gdImageCreate(src->sx , src->sy);
}
if (dst == NULL) {
return NULL;
}
if (src->trueColor == 0) {
dst->colorsTotal = src->colorsTotal;
for (i = 0; i < gdMaxColors; i++) {
dst->red[i] = src->red[i];
dst->green[i] = src->green[i];
dst->blue[i] = src->blue[i];
dst->alpha[i] = src->alpha[i];
dst->open[i] = src->open[i];
}
for (i = 0; i < src->sy; i++) {
for (x = 0; x < src->sx; x++) {
dst->pixels[i][x] = src->pixels[i][x];
}
}
} else {
for (i = 0; i < src->sy; i++) {
for (x = 0; x < src->sx; x++) {
dst->tpixels[i][x] = src->tpixels[i][x];
}
}
}
if (src->styleLength > 0) {
dst->styleLength = src->styleLength;
dst->stylePos = src->stylePos;
for (i = 0; i < src->styleLength; i++) {
dst->style[i] = src->style[i];
}
}
dst->interlace = src->interlace;
dst->alphaBlendingFlag = src->alphaBlendingFlag;
dst->saveAlphaFlag = src->saveAlphaFlag;
dst->AA = src->AA;
dst->AA_color = src->AA_color;
dst->AA_dont_blend = src->AA_dont_blend;
dst->cx1 = src->cx1;
dst->cy1 = src->cy1;
dst->cx2 = src->cx2;
dst->cy2 = src->cy2;
dst->res_x = src->res_x;
dst->res_y = src->res_y;
dst->paletteQuantizationMethod = src->paletteQuantizationMethod;
dst->paletteQuantizationSpeed = src->paletteQuantizationSpeed;
dst->paletteQuantizationMinQuality = src->paletteQuantizationMinQuality;
dst->paletteQuantizationMinQuality = src->paletteQuantizationMinQuality;
dst->interpolation_id = src->interpolation_id;
dst->interpolation = src->interpolation;
if (src->brush) {
dst->brush = gdImageClone(src->brush);
}
if (src->tile) {
dst->tile = gdImageClone(src->tile);
}
if (src->style) {
gdImageSetStyle(dst, src->style, src->styleLength);
}
for (i = 0; i < gdMaxColors; i++) {
dst->brushColorMap[i] = src->brushColorMap[i];
dst->tileColorMap[i] = src->tileColorMap[i];
}
if (src->polyAllocated > 0) {
dst->polyAllocated = src->polyAllocated;
for (i = 0; i < src->polyAllocated; i++) {
dst->polyInts[i] = src->polyInts[i];
}
}
return dst;
} | 632 | True | 1 |
CVE-2015-8877 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/libgd/libgd/issues/173', 'name': 'https://github.com/libgd/libgd/issues/173', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/libgd/libgd/commit/4751b606fa38edc456d627140898a7ec679fcc24', 'name': 'https://github.com/libgd/libgd/commit/4751b606fa38edc456d627140898a7ec679fcc24', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.php.net/ChangeLog-5.php', 'name': 'http://www.php.net/ChangeLog-5.php', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugs.php.net/bug.php?id=70064', 'name': 'https://bugs.php.net/bug.php?id=70064', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://www.debian.org/security/2016/dsa-3587', 'name': 'DSA-3587', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2987-1', 'name': 'USN-2987-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2750.html', 'name': 'RHSA-2016:2750', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.1.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:php:php:*:*:*:*:*:*:*:*', 'versionEndIncluding': '5.6.11', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.'}] | 2018-01-05T02:30Z | 2016-05-22T01:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Vladimir Mitrovic | 2015-08-05 03:01:06+02:00 | gdImageScaleTwoPass memory leak fix
Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and
confirmed by @vapier. This bug actually bit me in production and I'm
very thankful that it was reported with an easy fix.
Fixes #173. | 4751b606fa38edc456d627140898a7ec679fcc24 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageScaleTwoPass | gdImageScaleTwoPass( const gdImagePtr src , const unsigned int new_width , const unsigned int new_height) | ['src', 'new_width', 'new_height'] | gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
const unsigned int new_height)
{
const unsigned int src_width = src->sx;
const unsigned int src_height = src->sy;
gdImagePtr tmp_im = NULL;
gdImagePtr dst = NULL;
/* First, handle the trivial case. */
if (src_width == new_width && src_height == new_height) {
return gdImageClone(src);
}/* if */
/* Convert to truecolor if it isn't; this code requires it. */
if (!src->trueColor) {
gdImagePaletteToTrueColor(src);
}/* if */
/* Scale horizontally unless sizes are the same. */
if (src_width == new_width) {
tmp_im = src;
} else {
tmp_im = gdImageCreateTrueColor(new_width, src_height);
if (tmp_im == NULL) {
return NULL;
}
gdImageSetInterpolationMethod(tmp_im, src->interpolation_id);
_gdScalePass(src, src_width, tmp_im, new_width, src_height, HORIZONTAL);
}/* if .. else*/
/* If vertical sizes match, we're done. */
if (src_height == new_height) {
assert(tmp_im != src);
return tmp_im;
}/* if */
/* Otherwise, we need to scale vertically. */
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst != NULL) {
gdImageSetInterpolationMethod(dst, src->interpolation_id);
_gdScalePass(tmp_im, src_height, dst, new_height, new_width, VERTICAL);
}/* if */
if (src != tmp_im) {
gdFree(tmp_im);
}/* if */
return dst;
}/* gdImageScaleTwoPass*/ | 212 | True | 1 |
|
CVE-2016-5116 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | True | [{'url': 'https://github.com/libgd/libgd/commit/4dc1a2d7931017d3625f2d7cff70a17ce58b53b4', 'name': 'https://github.com/libgd/libgd/commit/4dc1a2d7931017d3625f2d7cff70a17ce58b53b4', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/05/29/5', 'name': '[oss-security] 20160529 Re: CVE Request: libgd - gdCtxPrintf memory leak', 'refsource': 'MLIST', 'tags': ['Mailing List']}, {'url': 'https://github.com/libgd/libgd/issues/211', 'name': 'https://github.com/libgd/libgd/issues/211', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3619', 'name': 'DSA-3619', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-09/msg00078.html', 'name': 'openSUSE-SU-2016:2363', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3030-1', 'name': 'USN-3030-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.34:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.25:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.31:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha6:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.27:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.29:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.23:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.24:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.30:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha5:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.28:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.35:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.37:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.32:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.26:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.33:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.9:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'gd_xbm.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in certain custom PHP 5.5.x configurations, allows context-dependent attackers to obtain sensitive information from process memory or cause a denial of service (stack-based buffer under-read and application crash) via a long name.'}] | 2018-10-30T16:27Z | 2016-08-07T10:59Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Mike Frysinger | 2016-05-14 01:38:18-04:00 | xbm: avoid stack overflow (read) with large names #211
We use the name passed in to printf into a local stack buffer which is
limited to 4000 bytes. So given a large enough value, lots of stack
data is leaked. Rewrite the code to do simple memory copies with most
of the strings to avoid that issue, and only use stack buffer for small
numbers of constant size.
This closes #211. | 4dc1a2d7931017d3625f2d7cff70a17ce58b53b4 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdCtxPrintf | gdCtxPrintf( gdIOCtx * out , const char * format , ...) | ['out', 'format'] | static void gdCtxPrintf(gdIOCtx * out, const char *format, ...)
{
char buf[4096];
int len;
va_list args;
va_start(args, format);
len = vsnprintf(buf, sizeof(buf)-1, format, args);
va_end(args);
out->putBuf(out, buf, len);
} | 68 | True | 1 |
CVE-2016-5116 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | True | [{'url': 'https://github.com/libgd/libgd/commit/4dc1a2d7931017d3625f2d7cff70a17ce58b53b4', 'name': 'https://github.com/libgd/libgd/commit/4dc1a2d7931017d3625f2d7cff70a17ce58b53b4', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/05/29/5', 'name': '[oss-security] 20160529 Re: CVE Request: libgd - gdCtxPrintf memory leak', 'refsource': 'MLIST', 'tags': ['Mailing List']}, {'url': 'https://github.com/libgd/libgd/issues/211', 'name': 'https://github.com/libgd/libgd/issues/211', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3619', 'name': 'DSA-3619', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-09/msg00078.html', 'name': 'openSUSE-SU-2016:2363', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3030-1', 'name': 'USN-3030-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.34:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.19:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.25:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.31:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.21:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha6:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.27:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.29:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:beta4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.23:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.24:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.30:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha5:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.28:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.35:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.37:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.32:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:alpha2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.26:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.33:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:5.5.9:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'gd_xbm.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in certain custom PHP 5.5.x configurations, allows context-dependent attackers to obtain sensitive information from process memory or cause a denial of service (stack-based buffer under-read and application crash) via a long name.'}] | 2018-10-30T16:27Z | 2016-08-07T10:59Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Mike Frysinger | 2016-05-14 01:38:18-04:00 | xbm: avoid stack overflow (read) with large names #211
We use the name passed in to printf into a local stack buffer which is
limited to 4000 bytes. So given a large enough value, lots of stack
data is leaked. Rewrite the code to do simple memory copies with most
of the strings to avoid that issue, and only use stack buffer for small
numbers of constant size.
This closes #211. | 4dc1a2d7931017d3625f2d7cff70a17ce58b53b4 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageXbmCtx | gdImageXbmCtx( gdImagePtr image , char * file_name , int fg , gdIOCtx * out) | ['image', 'file_name', 'fg', 'out'] | BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out)
{
int x, y, c, b, sx, sy, p;
char *name, *f;
size_t i, l;
name = file_name;
if ((f = strrchr(name, '/')) != NULL) name = f+1;
if ((f = strrchr(name, '\\')) != NULL) name = f+1;
name = strdup(name);
if ((f = strrchr(name, '.')) != NULL && !strcasecmp(f, ".XBM")) *f = '\0';
if ((l = strlen(name)) == 0) {
free(name);
name = strdup("image");
} else {
for (i=0; i<l; i++) {
/* only in C-locale isalnum() would work */
if (!isupper(name[i]) && !islower(name[i]) && !isdigit(name[i])) {
name[i] = '_';
}
}
}
gdCtxPrintf(out, "#define %s_width %d\n", name, gdImageSX(image));
gdCtxPrintf(out, "#define %s_height %d\n", name, gdImageSY(image));
gdCtxPrintf(out, "static unsigned char %s_bits[] = {\n ", name);
free(name);
b = 1;
p = 0;
c = 0;
sx = gdImageSX(image);
sy = gdImageSY(image);
for (y = 0; y < sy; y++) {
for (x = 0; x < sx; x++) {
if (gdImageGetPixel(image, x, y) == fg) {
c |= b;
}
if ((b == 128) || (x == sx && y == sy)) {
b = 1;
if (p) {
gdCtxPrintf(out, ", ");
if (!(p%12)) {
gdCtxPrintf(out, "\n ");
p = 12;
}
}
p++;
gdCtxPrintf(out, "0x%02X", c);
c = 0;
} else {
b <<= 1;
}
}
}
gdCtxPrintf(out, "};\n");
} | 414 | True | 1 |
CVE-2016-9933 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/php/php-src/commit/863d37ea66d5c960db08d6f4a2cbd2518f0f80d1', 'name': 'https://github.com/php/php-src/commit/863d37ea66d5c960db08d6f4a2cbd2518f0f80d1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/215', 'name': 'https://github.com/libgd/libgd/issues/215', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/libgd/libgd/commit/77f619d48259383628c3ec4654b1ad578e9eb40e', 'name': 'https://github.com/libgd/libgd/commit/77f619d48259383628c3ec4654b1ad578e9eb40e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugs.php.net/bug.php?id=72696', 'name': 'https://bugs.php.net/bug.php?id=72696', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.php.net/ChangeLog-7.php', 'name': 'http://www.php.net/ChangeLog-7.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.php.net/ChangeLog-5.php', 'name': 'http://www.php.net/ChangeLog-5.php', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/12/12/2', 'name': '[oss-security] 20161212 CVE assignment for PHP 5.6.28, 5.6.29, 7.0.13, 7.0.14 and 7.1.0', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94865', 'name': '94865', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2017-01/msg00002.html', 'name': 'openSUSE-SU-2017:0006', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-12/msg00142.html', 'name': 'openSUSE-SU-2016:3239', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-12/msg00133.html', 'name': 'openSUSE-SU-2016:3228', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3751', 'name': 'DSA-3751', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2017-01/msg00054.html', 'name': 'openSUSE-SU-2017:0081', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2017-01/msg00034.html', 'name': 'openSUSE-SU-2017:0061', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1296', 'name': 'RHSA-2018:1296', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:2.2.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:*:*:*:*:*:*:*:*', 'versionEndIncluding': '5.6.27', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:php:php:7.0.10:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Stack consumption vulnerability in the gdImageFillToBorder function in gd.c in the GD Graphics Library (aka libgd) before 2.2.2, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (segmentation violation) via a crafted imagefilltoborder call that triggers use of a negative color value.'}] | 2018-05-04T01:29Z | 2017-01-04T20:59Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Pierre Joye | 2016-06-04 23:09:01+07:00 | fix #215 gdImageFillToBorder stack-overflow when invalid color is used | 77f619d48259383628c3ec4654b1ad578e9eb40e | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageFillToBorder | gdImageFillToBorder( gdImagePtr im , int x , int y , int border , int color) | ['im', 'x', 'y', 'border', 'color'] | BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
{
int lastBorder;
/* Seek left */
int leftLimit, rightLimit;
int i;
int restoreAlphaBleding;
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
leftLimit = (-1);
restoreAlphaBleding = im->alphaBlendingFlag;
im->alphaBlendingFlag = 0;
if (x >= im->sx) {
x = im->sx - 1;
} else if (x < 0) {
x = 0;
}
if (y >= im->sy) {
y = im->sy - 1;
} else if (y < 0) {
y = 0;
}
for (i = x; (i >= 0); i--) {
if (gdImageGetPixel (im, i, y) == border) {
break;
}
gdImageSetPixel (im, i, y, color);
leftLimit = i;
}
if (leftLimit == (-1)) {
im->alphaBlendingFlag = restoreAlphaBleding;
return;
}
/* Seek right */
rightLimit = x;
for (i = (x + 1); (i < im->sx); i++) {
if (gdImageGetPixel (im, i, y) == border) {
break;
}
gdImageSetPixel (im, i, y, color);
rightLimit = i;
}
/* Look at lines above and below and start paints */
/* Above */
if (y > 0) {
lastBorder = 1;
for (i = leftLimit; (i <= rightLimit); i++) {
int c;
c = gdImageGetPixel (im, i, y - 1);
if (lastBorder) {
if ((c != border) && (c != color)) {
gdImageFillToBorder (im, i, y - 1, border, color);
lastBorder = 0;
}
} else if ((c == border) || (c == color)) {
lastBorder = 1;
}
}
}
/* Below */
if (y < ((im->sy) - 1)) {
lastBorder = 1;
for (i = leftLimit; (i <= rightLimit); i++) {
int c = gdImageGetPixel (im, i, y + 1);
if (lastBorder) {
if ((c != border) && (c != color)) {
gdImageFillToBorder (im, i, y + 1, border, color);
lastBorder = 0;
}
} else if ((c == border) || (c == color)) {
lastBorder = 1;
}
}
}
im->alphaBlendingFlag = restoreAlphaBleding;
} | 476 | True | 1 |
CVE-2016-6214 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 6.5 | MEDIUM | 2.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/10ef1dca63d62433fda13309b4a228782db823f7', 'name': 'https://github.com/libgd/libgd/commit/10ef1dca63d62433fda13309b4a228782db823f7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.debian.org/security/2016/dsa-3619', 'name': 'DSA-3619', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://libgd.github.io/release-2.2.3.html', 'name': 'https://libgd.github.io/release-2.2.3.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/13/12', 'name': '[oss-security] 20160713 Re: CVE Request: A read out-of-bands was found in the parsing of TGA files using libgd', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/13/5', 'name': '[oss-security] 20160713 Re: CVE Request: A read out-of-bands was found in the parsing of TGA files using libgd', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/247#issuecomment-232084241', 'name': 'https://github.com/libgd/libgd/issues/247#issuecomment-232084241', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-09/msg00078.html', 'name': 'openSUSE-SU-2016:2363', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-08/msg00086.html', 'name': 'openSUSE-SU-2016:2117', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3060-1', 'name': 'USN-3060-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.3 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA file.'}] | 2018-10-30T16:27Z | 2016-08-12T15:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-07-12 19:23:13+02:00 | Unsupported TGA bpp/alphabit combinations should error gracefully
Currently, only 24bpp without alphabits and 32bpp with 8 alphabits are
really supported. All other combinations will be rejected with a warning. | 10ef1dca63d62433fda13309b4a228782db823f7 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | gdImageCreateFromTgaCtx | gdImageCreateFromTgaCtx( gdIOCtx * ctx) | ['ctx'] | BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx)
{
int bitmap_caret = 0;
oTga *tga = NULL;
/* int pixel_block_size = 0;
int image_block_size = 0; */
volatile gdImagePtr image = NULL;
int x = 0;
int y = 0;
tga = (oTga *) gdMalloc(sizeof(oTga));
if (!tga) {
return NULL;
}
tga->bitmap = NULL;
tga->ident = NULL;
if (read_header_tga(ctx, tga) < 0) {
free_tga(tga);
return NULL;
}
/*TODO: Will this be used?
pixel_block_size = tga->bits / 8;
image_block_size = (tga->width * tga->height) * pixel_block_size;
*/
if (read_image_tga(ctx, tga) < 0) {
free_tga(tga);
return NULL;
}
image = gdImageCreateTrueColor((int)tga->width, (int)tga->height );
if (image == 0) {
free_tga( tga );
return NULL;
}
/*! \brief Populate GD image object
* Copy the pixel data from our tga bitmap buffer into the GD image
* Disable blending and save the alpha channel per default
*/
if (tga->alphabits) {
gdImageAlphaBlending(image, 0);
gdImageSaveAlpha(image, 1);
}
/* TODO: use alphabits as soon as we support 24bit and other alpha bps (ie != 8bits) */
for (y = 0; y < tga->height; y++) {
register int *tpix = image->tpixels[y];
for ( x = 0; x < tga->width; x++, tpix++) {
if (tga->bits == TGA_BPP_24) {
*tpix = gdTrueColor(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret]);
bitmap_caret += 3;
} else if (tga->bits == TGA_BPP_32 || tga->alphabits) {
register int a = tga->bitmap[bitmap_caret + 3];
*tpix = gdTrueColorAlpha(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret], gdAlphaMax - (a >> 1));
bitmap_caret += 4;
}
}
}
if (tga->flipv && tga->fliph) {
gdImageFlipBoth(image);
} else if (tga->flipv) {
gdImageFlipVertical(image);
} else if (tga->fliph) {
gdImageFlipHorizontal(image);
}
free_tga(tga);
return image;
} | 388 | True | 1 |
CVE-2016-6214 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 6.5 | MEDIUM | 2.8 | 3.6 | nan | [{'url': 'https://github.com/libgd/libgd/commit/10ef1dca63d62433fda13309b4a228782db823f7', 'name': 'https://github.com/libgd/libgd/commit/10ef1dca63d62433fda13309b4a228782db823f7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.debian.org/security/2016/dsa-3619', 'name': 'DSA-3619', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://libgd.github.io/release-2.2.3.html', 'name': 'https://libgd.github.io/release-2.2.3.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/13/12', 'name': '[oss-security] 20160713 Re: CVE Request: A read out-of-bands was found in the parsing of TGA files using libgd', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/13/5', 'name': '[oss-security] 20160713 Re: CVE Request: A read out-of-bands was found in the parsing of TGA files using libgd', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/libgd/libgd/issues/247#issuecomment-232084241', 'name': 'https://github.com/libgd/libgd/issues/247#issuecomment-232084241', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-09/msg00078.html', 'name': 'openSUSE-SU-2016:2363', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-08/msg00086.html', 'name': 'openSUSE-SU-2016:2117', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3060-1', 'name': 'USN-3060-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.2.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.3 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA file.'}] | 2018-10-30T16:27Z | 2016-08-12T15:59Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Christoph M. Becker | 2016-07-12 19:23:13+02:00 | Unsupported TGA bpp/alphabit combinations should error gracefully
Currently, only 24bpp without alphabits and 32bpp with 8 alphabits are
really supported. All other combinations will be rejected with a warning. | 10ef1dca63d62433fda13309b4a228782db823f7 | False | libgd/libgd | GD Graphics Library | 2015-01-22 08:50:57 | 2022-08-24 10:01:33 | http://libgd.org | libgd | 760.0 | 241.0 | read_header_tga | read_header_tga( gdIOCtx * ctx , oTga * tga) | ['ctx', 'tga'] | int read_header_tga(gdIOCtx *ctx, oTga *tga)
{
unsigned char header[18];
if (gdGetBuf(header, sizeof(header), ctx) < 18) {
gd_error("fail to read header");
return -1;
}
tga->identsize = header[0];
tga->colormaptype = header[1];
tga->imagetype = header[2];
tga->colormapstart = header[3] + (header[4] << 8);
tga->colormaplength = header[5] + (header[6] << 8);
tga->colormapbits = header[7];
tga->xstart = header[8] + (header[9] << 8);
tga->ystart = header[10] + (header[11] << 8);
tga->width = header[12] + (header[13] << 8);
tga->height = header[14] + (header[15] << 8);
tga->bits = header[16];
tga->alphabits = header[17] & 0x0f;
tga->fliph = (header[17] & 0x10) ? 1 : 0;
tga->flipv = (header[17] & 0x20) ? 0 : 1;
#if DEBUG
printf("format bps: %i\n", tga->bits);
printf("flip h/v: %i / %i\n", tga->fliph, tga->flipv);
printf("alpha: %i\n", tga->alphabits);
printf("wxh: %i %i\n", tga->width, tga->height);
#endif
switch(tga->bits) {
case 8:
case 16:
case 24:
case 32:
break;
default:
gd_error("bps %i not supported", tga->bits);
return -1;
break;
}
tga->ident = NULL;
if (tga->identsize > 0) {
tga->ident = (char *) gdMalloc(tga->identsize * sizeof(char));
if(tga->ident == NULL) {
return -1;
}
gdGetBuf(tga->ident, tga->identsize, ctx);
}
return 1;
} | 399 | True | 1 |
CVE-2014-0063 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'name': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65719', 'name': '65719', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple stack-based buffer overflows in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to cause a denial of service (crash) or possibly execute arbitrary code via vectors related to an incorrect MAXDATELEN constant and datetime values involving (1) intervals, (2) timestamps, or (3) timezones, a different vulnerability than CVE-2014-0065.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Noah Misch | 2014-02-17 09:33:31-05:00 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone name.
The long input was rejected needlessly; the long output caused
interval_out() to overrun its buffer. ECPG's pgtypes library has a copy
of the vulnerable functions, which bore the same vulnerabilities along
with some of its own. In contrast to the server, certain long inputs
caused stack overflow rather than failing cleanly. Back-patch to 8.4
(all supported versions).
Reported by Daniel Schüssler, reviewed by Tom Lane.
Security: CVE-2014-0063 | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | PGTYPESdate_from_asc | PGTYPESdate_from_asc( char * str , char ** endptr) | ['str', 'endptr'] | PGTYPESdate_from_asc(char *str, char **endptr)
{
date dDate;
fsec_t fsec;
struct tm tt,
*tm = &tt;
int dtype;
int nf;
char *field[MAXDATEFIELDS];
int ftype[MAXDATEFIELDS];
char lowstr[MAXDATELEN + 1];
char *realptr;
char **ptr = (endptr != NULL) ? endptr : &realptr;
bool EuroDates = FALSE;
errno = 0;
if (strlen(str) >= sizeof(lowstr))
{
errno = PGTYPES_DATE_BAD_DATE;
return INT_MIN;
}
if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, EuroDates) != 0)
{
errno = PGTYPES_DATE_BAD_DATE;
return INT_MIN;
}
switch (dtype)
{
case DTK_DATE:
break;
case DTK_EPOCH:
if (GetEpochTime(tm) < 0)
{
errno = PGTYPES_DATE_BAD_DATE;
return INT_MIN;
}
break;
default:
errno = PGTYPES_DATE_BAD_DATE;
return INT_MIN;
}
dDate = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
return dDate;
} | 228 | True | 1 |
CVE-2014-0063 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'name': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65719', 'name': '65719', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple stack-based buffer overflows in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to cause a denial of service (crash) or possibly execute arbitrary code via vectors related to an incorrect MAXDATELEN constant and datetime values involving (1) intervals, (2) timestamps, or (3) timezones, a different vulnerability than CVE-2014-0065.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Noah Misch | 2014-02-17 09:33:31-05:00 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone name.
The long input was rejected needlessly; the long output caused
interval_out() to overrun its buffer. ECPG's pgtypes library has a copy
of the vulnerable functions, which bore the same vulnerabilities along
with some of its own. In contrast to the server, certain long inputs
caused stack overflow rather than failing cleanly. Back-patch to 8.4
(all supported versions).
Reported by Daniel Schüssler, reviewed by Tom Lane.
Security: CVE-2014-0063 | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | PGTYPESinterval_from_asc | PGTYPESinterval_from_asc( char * str , char ** endptr) | ['str', 'endptr'] | PGTYPESinterval_from_asc(char *str, char **endptr)
{
interval *result = NULL;
fsec_t fsec;
struct tm tt,
*tm = &tt;
int dtype;
int nf;
char *field[MAXDATEFIELDS];
int ftype[MAXDATEFIELDS];
char lowstr[MAXDATELEN + MAXDATEFIELDS];
char *realptr;
char **ptr = (endptr != NULL) ? endptr : &realptr;
tm->tm_year = 0;
tm->tm_mon = 0;
tm->tm_mday = 0;
tm->tm_hour = 0;
tm->tm_min = 0;
tm->tm_sec = 0;
fsec = 0;
if (strlen(str) >= sizeof(lowstr))
{
errno = PGTYPES_INTVL_BAD_INTERVAL;
return NULL;
}
if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
(DecodeInterval(field, ftype, nf, &dtype, tm, &fsec) != 0 &&
DecodeISO8601Interval(str, &dtype, tm, &fsec) != 0))
{
errno = PGTYPES_INTVL_BAD_INTERVAL;
return NULL;
}
result = (interval *) pgtypes_alloc(sizeof(interval));
if (!result)
return NULL;
if (dtype != DTK_DELTA)
{
errno = PGTYPES_INTVL_BAD_INTERVAL;
free(result);
return NULL;
}
if (tm2interval(tm, fsec, result) != 0)
{
errno = PGTYPES_INTVL_BAD_INTERVAL;
free(result);
return NULL;
}
errno = 0;
return result;
} | 279 | True | 1 |
CVE-2014-0063 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'name': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65719', 'name': '65719', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple stack-based buffer overflows in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to cause a denial of service (crash) or possibly execute arbitrary code via vectors related to an incorrect MAXDATELEN constant and datetime values involving (1) intervals, (2) timestamps, or (3) timezones, a different vulnerability than CVE-2014-0065.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Noah Misch | 2014-02-17 09:33:31-05:00 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone name.
The long input was rejected needlessly; the long output caused
interval_out() to overrun its buffer. ECPG's pgtypes library has a copy
of the vulnerable functions, which bore the same vulnerabilities along
with some of its own. In contrast to the server, certain long inputs
caused stack overflow rather than failing cleanly. Back-patch to 8.4
(all supported versions).
Reported by Daniel Schüssler, reviewed by Tom Lane.
Security: CVE-2014-0063 | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | PGTYPEStimestamp_from_asc | PGTYPEStimestamp_from_asc( char * str , char ** endptr) | ['str', 'endptr'] | PGTYPEStimestamp_from_asc(char *str, char **endptr)
{
timestamp result;
#ifdef HAVE_INT64_TIMESTAMP
int64 noresult = 0;
#else
double noresult = 0.0;
#endif
fsec_t fsec;
struct tm tt,
*tm = &tt;
int dtype;
int nf;
char *field[MAXDATEFIELDS];
int ftype[MAXDATEFIELDS];
char lowstr[MAXDATELEN + MAXDATEFIELDS];
char *realptr;
char **ptr = (endptr != NULL) ? endptr : &realptr;
if (strlen(str) >= sizeof(lowstr))
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
return (noresult);
}
if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, 0) != 0)
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
return (noresult);
}
switch (dtype)
{
case DTK_DATE:
if (tm2timestamp(tm, fsec, NULL, &result) != 0)
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
return (noresult);
}
break;
case DTK_EPOCH:
result = SetEpochTimestamp();
break;
case DTK_LATE:
TIMESTAMP_NOEND(result);
break;
case DTK_EARLY:
TIMESTAMP_NOBEGIN(result);
break;
case DTK_INVALID:
errno = PGTYPES_TS_BAD_TIMESTAMP;
return (noresult);
default:
errno = PGTYPES_TS_BAD_TIMESTAMP;
return (noresult);
}
/* AdjustTimestampForTypmod(&result, typmod); */
/*
* Since it's difficult to test for noresult, make sure errno is 0 if no
* error occurred.
*/
errno = 0;
return result;
} | 260 | True | 1 |
CVE-2014-0063 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'name': 'https://github.com/postgres/postgres/commit/4318daecc959886d001a6e79c6ea853e8b1dfb4b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065226', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65719', 'name': '65719', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple stack-based buffer overflows in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to cause a denial of service (crash) or possibly execute arbitrary code via vectors related to an incorrect MAXDATELEN constant and datetime values involving (1) intervals, (2) timestamps, or (3) timezones, a different vulnerability than CVE-2014-0065.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Noah Misch | 2014-02-17 09:33:31-05:00 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone name.
The long input was rejected needlessly; the long output caused
interval_out() to overrun its buffer. ECPG's pgtypes library has a copy
of the vulnerable functions, which bore the same vulnerabilities along
with some of its own. In contrast to the server, certain long inputs
caused stack overflow rather than failing cleanly. Back-patch to 8.4
(all supported versions).
Reported by Daniel Schüssler, reviewed by Tom Lane.
Security: CVE-2014-0063 | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | main | main( void) | ['void'] | main(void)
{
/* exec sql begin declare section */
#line 52 "dt_test2.pgc"
date date1 ;
#line 53 "dt_test2.pgc"
timestamp ts1 , ts2 ;
#line 54 "dt_test2.pgc"
char * text ;
#line 55 "dt_test2.pgc"
interval * i1 ;
#line 56 "dt_test2.pgc"
date * dc ;
/* exec sql end declare section */
#line 57 "dt_test2.pgc"
int i, j;
char *endptr;
ECPGdebug(1, stderr);
ts1 = PGTYPEStimestamp_from_asc("2003-12-04 17:34:29", NULL);
text = PGTYPEStimestamp_to_asc(ts1);
printf("timestamp: %s\n", text);
free(text);
date1 = PGTYPESdate_from_timestamp(ts1);
dc = PGTYPESdate_new();
*dc = date1;
text = PGTYPESdate_to_asc(*dc);
printf("Date of timestamp: %s\n", text);
free(text);
PGTYPESdate_free(dc);
for (i = 0; dates[i]; i++)
{
bool err = false;
date1 = PGTYPESdate_from_asc(dates[i], &endptr);
if (date1 == INT_MIN) {
err = true;
}
text = PGTYPESdate_to_asc(date1);
printf("Date[%d]: %s (%c - %c)\n",
i, err ? "-" : text,
endptr ? 'N' : 'Y',
err ? 'T' : 'F');
free(text);
if (!err)
{
for (j = 0; times[j]; j++)
{
int length = strlen(dates[i])
+ 1
+ strlen(times[j])
+ 1;
char* t = malloc(length);
sprintf(t, "%s %s", dates[i], times[j]);
ts1 = PGTYPEStimestamp_from_asc(t, NULL);
text = PGTYPEStimestamp_to_asc(ts1);
if (i != 19 || j != 3) /* timestamp as integer or double differ for this case */
printf("TS[%d,%d]: %s\n",
i, j, errno ? "-" : text);
free(text);
free(t);
}
}
}
ts1 = PGTYPEStimestamp_from_asc("2004-04-04 23:23:23", NULL);
for (i = 0; intervals[i]; i++)
{
interval *ic;
i1 = PGTYPESinterval_from_asc(intervals[i], &endptr);
if (*endptr)
printf("endptr set to %s\n", endptr);
if (!i1)
{
printf("Error parsing interval %d\n", i);
continue;
}
j = PGTYPEStimestamp_add_interval(&ts1, i1, &ts2);
if (j < 0)
continue;
text = PGTYPESinterval_to_asc(i1);
printf("interval[%d]: %s\n", i, text ? text : "-");
free(text);
ic = PGTYPESinterval_new();
PGTYPESinterval_copy(i1, ic);
text = PGTYPESinterval_to_asc(i1);
printf("interval_copy[%d]: %s\n", i, text ? text : "-");
free(text);
PGTYPESinterval_free(ic);
PGTYPESinterval_free(i1);
}
return (0);
} | 488 | True | 1 |
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | queryin | queryin( char * buf) | ['buf'] | queryin(char *buf)
{
QPRS_STATE state;
int32 i;
ltxtquery *query;
int32 commonlen;
ITEM *ptr;
NODE *tmp;
int32 pos = 0;
#ifdef BS_DEBUG
char pbuf[16384],
*cur;
#endif
/* init state */
state.buf = buf;
state.state = WAITOPERAND;
state.count = 0;
state.num = 0;
state.str = NULL;
/* init list of operand */
state.sumlen = 0;
state.lenop = 64;
state.curop = state.op = (char *) palloc(state.lenop);
*(state.curop) = '\0';
/* parse query & make polish notation (postfix, but in reverse order) */
makepol(&state);
if (!state.num)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
errdetail("Empty query.")));
/* make finish struct */
commonlen = COMPUTESIZE(state.num, state.sumlen);
query = (ltxtquery *) palloc(commonlen);
SET_VARSIZE(query, commonlen);
query->size = state.num;
ptr = GETQUERY(query);
/* set item in polish notation */
for (i = 0; i < state.num; i++)
{
ptr[i].type = state.str->type;
ptr[i].val = state.str->val;
ptr[i].distance = state.str->distance;
ptr[i].length = state.str->length;
ptr[i].flag = state.str->flag;
tmp = state.str->next;
pfree(state.str);
state.str = tmp;
}
/* set user friendly-operand view */
memcpy((void *) GETOPERAND(query), (void *) state.op, state.sumlen);
pfree(state.op);
/* set left operand's position for every operator */
pos = 0;
findoprnd(ptr, &pos);
return query;
} | 343 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | queryin | queryin( char * buf) | ['buf'] | queryin(char *buf)
{
QPRS_STATE state;
int32 i;
ltxtquery *query;
int32 commonlen;
ITEM *ptr;
NODE *tmp;
int32 pos = 0;
#ifdef BS_DEBUG
char pbuf[16384],
*cur;
#endif
/* init state */
state.buf = buf;
state.state = WAITOPERAND;
state.count = 0;
state.num = 0;
state.str = NULL;
/* init list of operand */
state.sumlen = 0;
state.lenop = 64;
state.curop = state.op = (char *) palloc(state.lenop);
*(state.curop) = '\0';
/* parse query & make polish notation (postfix, but in reverse order) */
makepol(&state);
if (!state.num)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
errdetail("Empty query.")));
/* make finish struct */
commonlen = COMPUTESIZE(state.num, state.sumlen);
query = (ltxtquery *) palloc(commonlen);
SET_VARSIZE(query, commonlen);
query->size = state.num;
ptr = GETQUERY(query);
/* set item in polish notation */
for (i = 0; i < state.num; i++)
{
ptr[i].type = state.str->type;
ptr[i].val = state.str->val;
ptr[i].distance = state.str->distance;
ptr[i].length = state.str->length;
ptr[i].flag = state.str->flag;
tmp = state.str->next;
pfree(state.str);
state.str = tmp;
}
/* set user friendly-operand view */
memcpy((void *) GETOPERAND(query), (void *) state.op, state.sumlen);
pfree(state.op);
/* set left operand's position for every operator */
pos = 0;
findoprnd(ptr, &pos);
return query;
} | 343 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | path_in | path_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | path_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
PATH *path;
int isopen;
char *s;
int npts;
int size;
int depth = 0;
if ((npts = pair_count(str, ',')) <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type path: \"%s\"", str)));
s = str;
while (isspace((unsigned char) *s))
s++;
/* skip single leading paren */
if ((*s == LDELIM) && (strrchr(s, LDELIM) == s))
{
s++;
depth++;
}
size = offsetof(PATH, p[0]) +sizeof(path->p[0]) * npts;
path = (PATH *) palloc(size);
SET_VARSIZE(path, size);
path->npts = npts;
if ((!path_decode(TRUE, npts, s, &isopen, &s, &(path->p[0])))
&& (!((depth == 0) && (*s == '\0'))) && !((depth >= 1) && (*s == RDELIM)))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type path: \"%s\"", str)));
path->closed = (!isopen);
/* prevent instability in unused pad bytes */
path->dummy = 0;
PG_RETURN_PATH_P(path);
} | 269 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | path_in | path_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | path_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
PATH *path;
int isopen;
char *s;
int npts;
int size;
int depth = 0;
if ((npts = pair_count(str, ',')) <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type path: \"%s\"", str)));
s = str;
while (isspace((unsigned char) *s))
s++;
/* skip single leading paren */
if ((*s == LDELIM) && (strrchr(s, LDELIM) == s))
{
s++;
depth++;
}
size = offsetof(PATH, p[0]) +sizeof(path->p[0]) * npts;
path = (PATH *) palloc(size);
SET_VARSIZE(path, size);
path->npts = npts;
if ((!path_decode(TRUE, npts, s, &isopen, &s, &(path->p[0])))
&& (!((depth == 0) && (*s == '\0'))) && !((depth >= 1) && (*s == RDELIM)))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type path: \"%s\"", str)));
path->closed = (!isopen);
/* prevent instability in unused pad bytes */
path->dummy = 0;
PG_RETURN_PATH_P(path);
} | 269 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | poly_in | poly_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | poly_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
POLYGON *poly;
int npts;
int size;
int isopen;
char *s;
if ((npts = pair_count(str, ',')) <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type polygon: \"%s\"", str)));
size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * npts;
poly = (POLYGON *) palloc0(size); /* zero any holes */
SET_VARSIZE(poly, size);
poly->npts = npts;
if ((!path_decode(FALSE, npts, str, &isopen, &s, &(poly->p[0])))
|| (*s != '\0'))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type polygon: \"%s\"", str)));
make_bound_box(poly);
PG_RETURN_POLYGON_P(poly);
} | 180 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | poly_in | poly_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | poly_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
POLYGON *poly;
int npts;
int size;
int isopen;
char *s;
if ((npts = pair_count(str, ',')) <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type polygon: \"%s\"", str)));
size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * npts;
poly = (POLYGON *) palloc0(size); /* zero any holes */
SET_VARSIZE(poly, size);
poly->npts = npts;
if ((!path_decode(FALSE, npts, str, &isopen, &s, &(poly->p[0])))
|| (*s != '\0'))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type polygon: \"%s\"", str)));
make_bound_box(poly);
PG_RETURN_POLYGON_P(poly);
} | 180 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | parse_tsquery | parse_tsquery( char * buf , PushFunction pushval , Datum opaque , bool isplain) | ['buf', 'pushval', 'opaque', 'isplain'] | parse_tsquery(char *buf,
PushFunction pushval,
Datum opaque,
bool isplain)
{
struct TSQueryParserStateData state;
int i;
TSQuery query;
int commonlen;
QueryItem *ptr;
ListCell *cell;
/* init state */
state.buffer = buf;
state.buf = buf;
state.state = (isplain) ? WAITSINGLEOPERAND : WAITFIRSTOPERAND;
state.count = 0;
state.polstr = NIL;
/* init value parser's state */
state.valstate = init_tsvector_parser(state.buffer, true, true);
/* init list of operand */
state.sumlen = 0;
state.lenop = 64;
state.curop = state.op = (char *) palloc(state.lenop);
*(state.curop) = '\0';
/* parse query & make polish notation (postfix, but in reverse order) */
makepol(&state, pushval, opaque);
close_tsvector_parser(state.valstate);
if (list_length(state.polstr) == 0)
{
ereport(NOTICE,
(errmsg("text-search query doesn't contain lexemes: \"%s\"",
state.buffer)));
query = (TSQuery) palloc(HDRSIZETQ);
SET_VARSIZE(query, HDRSIZETQ);
query->size = 0;
return query;
}
/* Pack the QueryItems in the final TSQuery struct to return to caller */
commonlen = COMPUTESIZE(list_length(state.polstr), state.sumlen);
query = (TSQuery) palloc0(commonlen);
SET_VARSIZE(query, commonlen);
query->size = list_length(state.polstr);
ptr = GETQUERY(query);
/* Copy QueryItems to TSQuery */
i = 0;
foreach(cell, state.polstr)
{
QueryItem *item = (QueryItem *) lfirst(cell);
switch (item->type)
{
case QI_VAL:
memcpy(&ptr[i], item, sizeof(QueryOperand));
break;
case QI_VALSTOP:
ptr[i].type = QI_VALSTOP;
break;
case QI_OPR:
memcpy(&ptr[i], item, sizeof(QueryOperator));
break;
default:
elog(ERROR, "unrecognized QueryItem type: %d", item->type);
}
i++;
}
/* Copy all the operand strings to TSQuery */
memcpy((void *) GETOPERAND(query), (void *) state.op, state.sumlen);
pfree(state.op);
/* Set left operand pointers for every operator. */
findoprnd(ptr, query->size);
return query;
} | 402 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | parse_tsquery | parse_tsquery( char * buf , PushFunction pushval , Datum opaque , bool isplain) | ['buf', 'pushval', 'opaque', 'isplain'] | parse_tsquery(char *buf,
PushFunction pushval,
Datum opaque,
bool isplain)
{
struct TSQueryParserStateData state;
int i;
TSQuery query;
int commonlen;
QueryItem *ptr;
ListCell *cell;
/* init state */
state.buffer = buf;
state.buf = buf;
state.state = (isplain) ? WAITSINGLEOPERAND : WAITFIRSTOPERAND;
state.count = 0;
state.polstr = NIL;
/* init value parser's state */
state.valstate = init_tsvector_parser(state.buffer, true, true);
/* init list of operand */
state.sumlen = 0;
state.lenop = 64;
state.curop = state.op = (char *) palloc(state.lenop);
*(state.curop) = '\0';
/* parse query & make polish notation (postfix, but in reverse order) */
makepol(&state, pushval, opaque);
close_tsvector_parser(state.valstate);
if (list_length(state.polstr) == 0)
{
ereport(NOTICE,
(errmsg("text-search query doesn't contain lexemes: \"%s\"",
state.buffer)));
query = (TSQuery) palloc(HDRSIZETQ);
SET_VARSIZE(query, HDRSIZETQ);
query->size = 0;
return query;
}
/* Pack the QueryItems in the final TSQuery struct to return to caller */
commonlen = COMPUTESIZE(list_length(state.polstr), state.sumlen);
query = (TSQuery) palloc0(commonlen);
SET_VARSIZE(query, commonlen);
query->size = list_length(state.polstr);
ptr = GETQUERY(query);
/* Copy QueryItems to TSQuery */
i = 0;
foreach(cell, state.polstr)
{
QueryItem *item = (QueryItem *) lfirst(cell);
switch (item->type)
{
case QI_VAL:
memcpy(&ptr[i], item, sizeof(QueryOperand));
break;
case QI_VALSTOP:
ptr[i].type = QI_VALSTOP;
break;
case QI_OPR:
memcpy(&ptr[i], item, sizeof(QueryOperator));
break;
default:
elog(ERROR, "unrecognized QueryItem type: %d", item->type);
}
i++;
}
/* Copy all the operand strings to TSQuery */
memcpy((void *) GETOPERAND(query), (void *) state.op, state.sumlen);
pfree(state.op);
/* Set left operand pointers for every operator. */
findoprnd(ptr, query->size);
return query;
} | 402 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | txid_snapshot_recv | txid_snapshot_recv( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | txid_snapshot_recv(PG_FUNCTION_ARGS)
{
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
TxidSnapshot *snap;
txid last = 0;
int nxip;
int i;
int avail;
int expect;
txid xmin,
xmax;
/*
* load nxip and check for nonsense.
*
* (nxip > avail) check is against int overflows in 'expect'.
*/
nxip = pq_getmsgint(buf, 4);
avail = buf->len - buf->cursor;
expect = 8 + 8 + nxip * 8;
if (nxip < 0 || nxip > avail || expect > avail)
goto bad_format;
xmin = pq_getmsgint64(buf);
xmax = pq_getmsgint64(buf);
if (xmin == 0 || xmax == 0 || xmin > xmax || xmax > MAX_TXID)
goto bad_format;
snap = palloc(TXID_SNAPSHOT_SIZE(nxip));
snap->xmin = xmin;
snap->xmax = xmax;
snap->nxip = nxip;
SET_VARSIZE(snap, TXID_SNAPSHOT_SIZE(nxip));
for (i = 0; i < nxip; i++)
{
txid cur = pq_getmsgint64(buf);
if (cur <= last || cur < xmin || cur >= xmax)
goto bad_format;
snap->xip[i] = cur;
last = cur;
}
PG_RETURN_POINTER(snap);
bad_format:
elog(ERROR, "invalid snapshot data");
return (Datum) NULL;
} | 235 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | txid_snapshot_recv | txid_snapshot_recv( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | txid_snapshot_recv(PG_FUNCTION_ARGS)
{
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
TxidSnapshot *snap;
txid last = 0;
int nxip;
int i;
int avail;
int expect;
txid xmin,
xmax;
/*
* load nxip and check for nonsense.
*
* (nxip > avail) check is against int overflows in 'expect'.
*/
nxip = pq_getmsgint(buf, 4);
avail = buf->len - buf->cursor;
expect = 8 + 8 + nxip * 8;
if (nxip < 0 || nxip > avail || expect > avail)
goto bad_format;
xmin = pq_getmsgint64(buf);
xmax = pq_getmsgint64(buf);
if (xmin == 0 || xmax == 0 || xmin > xmax || xmax > MAX_TXID)
goto bad_format;
snap = palloc(TXID_SNAPSHOT_SIZE(nxip));
snap->xmin = xmin;
snap->xmax = xmax;
snap->nxip = nxip;
SET_VARSIZE(snap, TXID_SNAPSHOT_SIZE(nxip));
for (i = 0; i < nxip; i++)
{
txid cur = pq_getmsgint64(buf);
if (cur <= last || cur < xmin || cur >= xmax)
goto bad_format;
snap->xip[i] = cur;
last = cur;
}
PG_RETURN_POINTER(snap);
bad_format:
elog(ERROR, "invalid snapshot data");
return (Datum) NULL;
} | 235 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | bit_in | bit_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | bit_in(PG_FUNCTION_ARGS)
{
char *input_string = PG_GETARG_CSTRING(0);
#ifdef NOT_USED
Oid typelem = PG_GETARG_OID(1);
#endif
int32 atttypmod = PG_GETARG_INT32(2);
VarBit *result; /* The resulting bit string */
char *sp; /* pointer into the character string */
bits8 *r; /* pointer into the result */
int len, /* Length of the whole data structure */
bitlen, /* Number of bits in the bit string */
slen; /* Length of the input string */
bool bit_not_hex; /* false = hex string true = bit string */
int bc;
bits8 x = 0;
/* Check that the first character is a b or an x */
if (input_string[0] == 'b' || input_string[0] == 'B')
{
bit_not_hex = true;
sp = input_string + 1;
}
else if (input_string[0] == 'x' || input_string[0] == 'X')
{
bit_not_hex = false;
sp = input_string + 1;
}
else
{
/*
* Otherwise it's binary. This allows things like cast('1001' as bit)
* to work transparently.
*/
bit_not_hex = true;
sp = input_string;
}
slen = strlen(sp);
/* Determine bitlength from input string */
if (bit_not_hex)
bitlen = slen;
else
bitlen = slen * 4;
/*
* Sometimes atttypmod is not supplied. If it is supplied we need to make
* sure that the bitstring fits.
*/
if (atttypmod <= 0)
atttypmod = bitlen;
else if (bitlen != atttypmod)
ereport(ERROR,
(errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH),
errmsg("bit string length %d does not match type bit(%d)",
bitlen, atttypmod)));
len = VARBITTOTALLEN(atttypmod);
/* set to 0 so that *r is always initialised and string is zero-padded */
result = (VarBit *) palloc0(len);
SET_VARSIZE(result, len);
VARBITLEN(result) = atttypmod;
r = VARBITS(result);
if (bit_not_hex)
{
/* Parse the bit representation of the string */
/* We know it fits, as bitlen was compared to atttypmod */
x = HIGHBIT;
for (; *sp; sp++)
{
if (*sp == '1')
*r |= x;
else if (*sp != '0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid binary digit",
*sp)));
x >>= 1;
if (x == 0)
{
x = HIGHBIT;
r++;
}
}
}
else
{
/* Parse the hex representation of the string */
for (bc = 0; *sp; sp++)
{
if (*sp >= '0' && *sp <= '9')
x = (bits8) (*sp - '0');
else if (*sp >= 'A' && *sp <= 'F')
x = (bits8) (*sp - 'A') + 10;
else if (*sp >= 'a' && *sp <= 'f')
x = (bits8) (*sp - 'a') + 10;
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
{
*r++ |= x;
bc = 0;
}
else
{
*r = x << 4;
bc = 1;
}
}
}
PG_RETURN_VARBIT_P(result);
} | 460 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | bit_in | bit_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | bit_in(PG_FUNCTION_ARGS)
{
char *input_string = PG_GETARG_CSTRING(0);
#ifdef NOT_USED
Oid typelem = PG_GETARG_OID(1);
#endif
int32 atttypmod = PG_GETARG_INT32(2);
VarBit *result; /* The resulting bit string */
char *sp; /* pointer into the character string */
bits8 *r; /* pointer into the result */
int len, /* Length of the whole data structure */
bitlen, /* Number of bits in the bit string */
slen; /* Length of the input string */
bool bit_not_hex; /* false = hex string true = bit string */
int bc;
bits8 x = 0;
/* Check that the first character is a b or an x */
if (input_string[0] == 'b' || input_string[0] == 'B')
{
bit_not_hex = true;
sp = input_string + 1;
}
else if (input_string[0] == 'x' || input_string[0] == 'X')
{
bit_not_hex = false;
sp = input_string + 1;
}
else
{
/*
* Otherwise it's binary. This allows things like cast('1001' as bit)
* to work transparently.
*/
bit_not_hex = true;
sp = input_string;
}
slen = strlen(sp);
/* Determine bitlength from input string */
if (bit_not_hex)
bitlen = slen;
else
bitlen = slen * 4;
/*
* Sometimes atttypmod is not supplied. If it is supplied we need to make
* sure that the bitstring fits.
*/
if (atttypmod <= 0)
atttypmod = bitlen;
else if (bitlen != atttypmod)
ereport(ERROR,
(errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH),
errmsg("bit string length %d does not match type bit(%d)",
bitlen, atttypmod)));
len = VARBITTOTALLEN(atttypmod);
/* set to 0 so that *r is always initialised and string is zero-padded */
result = (VarBit *) palloc0(len);
SET_VARSIZE(result, len);
VARBITLEN(result) = atttypmod;
r = VARBITS(result);
if (bit_not_hex)
{
/* Parse the bit representation of the string */
/* We know it fits, as bitlen was compared to atttypmod */
x = HIGHBIT;
for (; *sp; sp++)
{
if (*sp == '1')
*r |= x;
else if (*sp != '0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid binary digit",
*sp)));
x >>= 1;
if (x == 0)
{
x = HIGHBIT;
r++;
}
}
}
else
{
/* Parse the hex representation of the string */
for (bc = 0; *sp; sp++)
{
if (*sp >= '0' && *sp <= '9')
x = (bits8) (*sp - '0');
else if (*sp >= 'A' && *sp <= 'F')
x = (bits8) (*sp - 'A') + 10;
else if (*sp >= 'a' && *sp <= 'f')
x = (bits8) (*sp - 'a') + 10;
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
{
*r++ |= x;
bc = 0;
}
else
{
*r = x << 4;
bc = 1;
}
}
}
PG_RETURN_VARBIT_P(result);
} | 460 | True | 1 |
|
CVE-2014-0064 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1065230', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://support.apple.com/kb/HT6448', 'name': 'http://support.apple.com/kb/HT6448', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html', 'name': 'APPLE-SA-2014-10-16-3', 'refsource': 'APPLE', 'tags': []}, {'url': 'https://support.apple.com/kb/HT6536', 'name': 'https://support.apple.com/kb/HT6536', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10705', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/65725', 'name': '65725', 'refsource': 'BID', 'tags': []}, {'url': 'http://secunia.com/advisories/61307', 'name': '61307', 'refsource': 'SECUNIA', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2017-3236626.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2120-1', 'name': 'USN-2120-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0249.html', 'name': 'RHSA-2014:0249', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0211.html', 'name': 'RHSA-2014:0211', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00038.html', 'name': 'openSUSE-SU-2014:0368', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-updates/2014-03/msg00018.html', 'name': 'openSUSE-SU-2014:0345', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.18:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*', 'versionEndIncluding': '8.4.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.17:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:8.4.16:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the path_in and other unspecified functions in PostgreSQL before 8.4.20, 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact and attack vectors, which trigger a buffer overflow. NOTE: this identifier has been SPLIT due to different affected versions; use CVE-2014-2669 for the hstore vector.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | varbit_in | varbit_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | varbit_in(PG_FUNCTION_ARGS)
{
char *input_string = PG_GETARG_CSTRING(0);
#ifdef NOT_USED
Oid typelem = PG_GETARG_OID(1);
#endif
int32 atttypmod = PG_GETARG_INT32(2);
VarBit *result; /* The resulting bit string */
char *sp; /* pointer into the character string */
bits8 *r; /* pointer into the result */
int len, /* Length of the whole data structure */
bitlen, /* Number of bits in the bit string */
slen; /* Length of the input string */
bool bit_not_hex; /* false = hex string true = bit string */
int bc;
bits8 x = 0;
/* Check that the first character is a b or an x */
if (input_string[0] == 'b' || input_string[0] == 'B')
{
bit_not_hex = true;
sp = input_string + 1;
}
else if (input_string[0] == 'x' || input_string[0] == 'X')
{
bit_not_hex = false;
sp = input_string + 1;
}
else
{
bit_not_hex = true;
sp = input_string;
}
slen = strlen(sp);
/* Determine bitlength from input string */
if (bit_not_hex)
bitlen = slen;
else
bitlen = slen * 4;
/*
* Sometimes atttypmod is not supplied. If it is supplied we need to make
* sure that the bitstring fits.
*/
if (atttypmod <= 0)
atttypmod = bitlen;
else if (bitlen > atttypmod)
ereport(ERROR,
(errcode(ERRCODE_STRING_DATA_RIGHT_TRUNCATION),
errmsg("bit string too long for type bit varying(%d)",
atttypmod)));
len = VARBITTOTALLEN(bitlen);
/* set to 0 so that *r is always initialised and string is zero-padded */
result = (VarBit *) palloc0(len);
SET_VARSIZE(result, len);
VARBITLEN(result) = Min(bitlen, atttypmod);
r = VARBITS(result);
if (bit_not_hex)
{
/* Parse the bit representation of the string */
/* We know it fits, as bitlen was compared to atttypmod */
x = HIGHBIT;
for (; *sp; sp++)
{
if (*sp == '1')
*r |= x;
else if (*sp != '0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid binary digit",
*sp)));
x >>= 1;
if (x == 0)
{
x = HIGHBIT;
r++;
}
}
}
else
{
/* Parse the hex representation of the string */
for (bc = 0; *sp; sp++)
{
if (*sp >= '0' && *sp <= '9')
x = (bits8) (*sp - '0');
else if (*sp >= 'A' && *sp <= 'F')
x = (bits8) (*sp - 'A') + 10;
else if (*sp >= 'a' && *sp <= 'f')
x = (bits8) (*sp - 'a') + 10;
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
{
*r++ |= x;
bc = 0;
}
else
{
*r = x << 4;
bc = 1;
}
}
}
PG_RETURN_VARBIT_P(result);
} | 463 | True | 1 |
|
CVE-2014-2669 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | [{'url': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'name': 'https://github.com/postgres/postgres/commit/31400a673325147e1205326008e32135a78b4d8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2864', 'name': 'DSA-2864', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.debian.org/security/2014/dsa-2865', 'name': 'DSA-2865', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'name': 'http://wiki.postgresql.org/wiki/20140220securityrelease', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/about/news/1506/', 'name': 'http://www.postgresql.org/about/news/1506/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.postgresql.org/support/security/', 'name': 'http://www.postgresql.org/support/security/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0469.html', 'name': 'RHSA-2014:0469', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2014-0221.html', 'name': 'RHSA-2014:0221', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.13:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.8:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.9:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.14:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.15:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.2.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:postgresql:postgresql:9.0.8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in contrib/hstore/hstore_io.c in PostgreSQL 9.0.x before 9.0.16, 9.1.x before 9.1.12, 9.2.x before 9.2.7, and 9.3.x before 9.3.3 allow remote authenticated users to have unspecified impact via vectors related to the (1) hstore_recv, (2) hstore_from_arrays, and (3) hstore_from_array functions in contrib/hstore/hstore_io.c; and the (4) hstoreArrayToPairs function in contrib/hstore/hstore_op.c, which triggers a buffer overflow. NOTE: this issue was SPLIT from CVE-2014-0064 because it has a different set of affected versions.'}] | 2017-12-16T02:29Z | 2014-03-31T14:58Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Noah Misch | 2014-02-17 09:33:31-05:00 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly thereafter.
Coverity identified the path_in() vulnerability; code inspection led to
the rest. In passing, add check_stack_depth() to prevent stack overflow
in related functions.
Back-patch to 8.4 (all supported versions). The non-comment hstore
changes touch code that did not exist in 8.4, so that part stops at 9.0.
Noah Misch and Heikki Linnakangas, reviewed by Tom Lane.
Security: CVE-2014-0064 | 31400a673325147e1205326008e32135a78b4d8a | False | postgres/postgres | Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch | 2010-09-21 11:35:45 | 2022-08-27 16:16:37 | https://www.postgresql.org/ | postgres | 10835.0 | 3447.0 | varbit_in | varbit_in( PG_FUNCTION_ARGS) | ['PG_FUNCTION_ARGS'] | varbit_in(PG_FUNCTION_ARGS)
{
char *input_string = PG_GETARG_CSTRING(0);
#ifdef NOT_USED
Oid typelem = PG_GETARG_OID(1);
#endif
int32 atttypmod = PG_GETARG_INT32(2);
VarBit *result; /* The resulting bit string */
char *sp; /* pointer into the character string */
bits8 *r; /* pointer into the result */
int len, /* Length of the whole data structure */
bitlen, /* Number of bits in the bit string */
slen; /* Length of the input string */
bool bit_not_hex; /* false = hex string true = bit string */
int bc;
bits8 x = 0;
/* Check that the first character is a b or an x */
if (input_string[0] == 'b' || input_string[0] == 'B')
{
bit_not_hex = true;
sp = input_string + 1;
}
else if (input_string[0] == 'x' || input_string[0] == 'X')
{
bit_not_hex = false;
sp = input_string + 1;
}
else
{
bit_not_hex = true;
sp = input_string;
}
slen = strlen(sp);
/* Determine bitlength from input string */
if (bit_not_hex)
bitlen = slen;
else
bitlen = slen * 4;
/*
* Sometimes atttypmod is not supplied. If it is supplied we need to make
* sure that the bitstring fits.
*/
if (atttypmod <= 0)
atttypmod = bitlen;
else if (bitlen > atttypmod)
ereport(ERROR,
(errcode(ERRCODE_STRING_DATA_RIGHT_TRUNCATION),
errmsg("bit string too long for type bit varying(%d)",
atttypmod)));
len = VARBITTOTALLEN(bitlen);
/* set to 0 so that *r is always initialised and string is zero-padded */
result = (VarBit *) palloc0(len);
SET_VARSIZE(result, len);
VARBITLEN(result) = Min(bitlen, atttypmod);
r = VARBITS(result);
if (bit_not_hex)
{
/* Parse the bit representation of the string */
/* We know it fits, as bitlen was compared to atttypmod */
x = HIGHBIT;
for (; *sp; sp++)
{
if (*sp == '1')
*r |= x;
else if (*sp != '0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid binary digit",
*sp)));
x >>= 1;
if (x == 0)
{
x = HIGHBIT;
r++;
}
}
}
else
{
/* Parse the hex representation of the string */
for (bc = 0; *sp; sp++)
{
if (*sp >= '0' && *sp <= '9')
x = (bits8) (*sp - '0');
else if (*sp >= 'A' && *sp <= 'F')
x = (bits8) (*sp - 'A') + 10;
else if (*sp >= 'a' && *sp <= 'f')
x = (bits8) (*sp - 'a') + 10;
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
{
*r++ |= x;
bc = 0;
}
else
{
*r = x << 4;
bc = 1;
}
}
}
PG_RETURN_VARBIT_P(result);
} | 463 | True | 1 |
|
CVE-2019-11925 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/f1cd34e63c2a0d9702be3d41462db7bfd0ae7da3', 'name': 'https://github.com/facebook/hhvm/commit/f1cd34e63c2a0d9702be3d41462db7bfd0ae7da3', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://www.facebook.com/security/advisories/cve-2019-11925', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11925', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://hhvm.com/blog/2019/09/03/security-update.html', 'name': 'https://hhvm.com/blog/2019/09/03/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.30.9', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.15.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.16.0', 'versionEndIncluding': '4.16.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.17.0', 'versionEndIncluding': '4.17.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.18.0', 'versionEndIncluding': '4.18.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.19.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20.0', 'versionEndIncluding': '4.20.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks when processing the JPEG APP12 block marker in the GD extension could allow access to out-of-bounds memory via a maliciously constructed invalid JPEG input. This issue affects HHVM versions prior to 3.30.9, all versions between 4.0.0 and 4.8.3, all versions between 4.9.0 and 4.15.2, and versions 4.16.0 to 4.16.3, 4.17.0 to 4.17.2, 4.18.0 to 4.18.1, 4.19.0, 4.20.0 to 4.20.1.'}] | 2019-10-09T23:45Z | 2019-09-06T19:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Dhaval Kapil | 2019-09-03 17:16:28-07:00 | exif_process_APP12: Fix length calculation for second tag to prevent information leak
Summary:
buffer + 2+l1+1 points to the second tag. The maximum length of the buffer is length. Hence, the max length of the tag is length - (2+l1+1). Instead, the length passed is length - 2 - l1 + 1 which leads to a 2 byte overflow. If the last character of buffer is not null, this would lead to an out of bounds read of size 2.
Fixes CVE-2019-11925
Reviewed By: fredemmott
Differential Revision: D16930333
fbshipit-source-id: aad9cccaef3c678abc53bfd549aff6b582082a90 | f1cd34e63c2a0d9702be3d41462db7bfd0ae7da3 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::exif_process_APP12 | HPHP::exif_process_APP12( image_info_type * ImageInfo , char * buffer , size_t length) | ['ImageInfo', 'buffer', 'length'] | static void exif_process_APP12(image_info_type *ImageInfo,
char *buffer, size_t length) {
size_t l1, l2=0;
if ((l1 = php_strnlen(buffer+2, length-2)) > 0) {
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company",
TAG_NONE, TAG_FMT_STRING, l1, buffer+2);
if (length > 2+l1+1) {
l2 = php_strnlen(buffer+2+l1+1, length-2-l1+1);
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Info",
TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1);
}
}
} | 118 | True | 1 |
CVE-2019-11929 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-11929', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11929', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2019/09/25/security-update.html', 'name': 'https://hhvm.com/blog/2019/09/25/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/dbeb9a56a638e3fdcef8b691c2a2967132dae692', 'name': 'https://github.com/facebook/hhvm/commit/dbeb9a56a638e3fdcef8b691c2a2967132dae692', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.19.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.22.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.23.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.19.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.20.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.20.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.20.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.21.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.18.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.30.10', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.5', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks when formatting numbers in number_format allows read/write access to out-of-bounds memory, potentially leading to remote code execution. This issue affects HHVM versions prior to 3.30.10, all versions between 4.0.0 and 4.8.5, all versions between 4.9.0 and 4.18.2, and versions 4.19.0, 4.19.1, 4.20.0, 4.20.1, 4.20.2, 4.21.0, 4.22.0, 4.23.0.'}] | 2019-10-10T17:14Z | 2019-10-02T19:15Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Dhaval Kapil | 2019-09-18 01:44:34-07:00 | string_number_format: Correctly handles return value of snprintf
Summary: `snprintf` can return a value greater than the number of bytes copied. In case the first byte of the string is not a digit (could be '-'), size of `tmpstr` was being updated without checking `tmplen`. This resulted in either an assertion error or a heap overflow depending on whether the assertion is compiled or not.
Reviewed By: mofarrell, qianxuweiren
Differential Revision: D17327899
fbshipit-source-id: ee53875d21e02608c6d870388eecf1464de24ff1 | dbeb9a56a638e3fdcef8b691c2a2967132dae692 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::string_number_format | HPHP::string_number_format( double d , int dec , const String & dec_point , const String & thousand_sep) | ['d', 'dec', 'dec_point', 'thousand_sep'] | String string_number_format(double d, int dec,
const String& dec_point,
const String& thousand_sep) {
char *tmpbuf = nullptr, *resbuf;
char *s, *t; /* source, target */
char *dp;
int integral;
int tmplen, reslen=0;
int count=0;
int is_negative=0;
if (d < 0) {
is_negative = 1;
d = -d;
}
if (dec < 0) dec = 0;
d = php_math_round(d, dec);
// departure from PHP: we got rid of dependencies on spprintf() here.
String tmpstr(63, ReserveString);
tmpbuf = tmpstr.mutableData();
tmplen = snprintf(tmpbuf, 64, "%.*F", dec, d);
if (tmplen < 0) return empty_string();
if (tmpbuf == nullptr || !isdigit((int)tmpbuf[0])) {
tmpstr.setSize(tmplen);
return tmpstr;
}
if (tmplen >= 64) {
// Uncommon, asked for more than 64 chars worth of precision
tmpstr = String(tmplen, ReserveString);
tmpbuf = tmpstr.mutableData();
tmplen = snprintf(tmpbuf, tmplen + 1, "%.*F", dec, d);
if (tmplen < 0) return empty_string();
if (tmpbuf == nullptr || !isdigit((int)tmpbuf[0])) {
tmpstr.setSize(tmplen);
return tmpstr;
}
}
/* find decimal point, if expected */
if (dec) {
dp = strpbrk(tmpbuf, ".,");
} else {
dp = nullptr;
}
/* calculate the length of the return buffer */
if (dp) {
integral = dp - tmpbuf;
} else {
/* no decimal point was found */
integral = tmplen;
}
/* allow for thousand separators */
if (!thousand_sep.empty()) {
if (integral + thousand_sep.size() * ((integral-1) / 3) < integral) {
/* overflow */
raise_error("String overflow");
}
integral += ((integral-1) / 3) * thousand_sep.size();
}
reslen = integral;
if (dec) {
reslen += dec;
if (!dec_point.empty()) {
if (reslen + dec_point.size() < dec_point.size()) {
/* overflow */
raise_error("String overflow");
}
reslen += dec_point.size();
}
}
/* add a byte for minus sign */
if (is_negative) {
reslen++;
}
String resstr(reslen, ReserveString);
resbuf = resstr.mutableData();
s = tmpbuf+tmplen-1;
t = resbuf+reslen-1;
/* copy the decimal places.
* Take care, as the sprintf implementation may return less places than
* we requested due to internal buffer limitations */
if (dec) {
int declen = dp ? s - dp : 0;
int topad = dec > declen ? dec - declen : 0;
/* pad with '0's */
while (topad--) {
*t-- = '0';
}
if (dp) {
s -= declen + 1; /* +1 to skip the point */
t -= declen;
/* now copy the chars after the point */
memcpy(t + 1, dp + 1, declen);
}
/* add decimal point */
if (!dec_point.empty()) {
memcpy(t + (1 - dec_point.size()), dec_point.data(), dec_point.size());
t -= dec_point.size();
}
}
/* copy the numbers before the decimal point, adding thousand
* separator every three digits */
while(s >= tmpbuf) {
*t-- = *s--;
if (thousand_sep && (++count%3)==0 && s>=tmpbuf) {
memcpy(t + (1 - thousand_sep.size()),
thousand_sep.data(),
thousand_sep.size());
t -= thousand_sep.size();
}
}
/* and a minus sign, if needed */
if (is_negative) {
*t-- = '-';
}
resstr.setSize(reslen);
return resstr;
} | 657 | True | 1 |
CVE-2019-11936 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/f57df6d8cf33cb14c40f52287da29360e7003373', 'name': 'https://github.com/facebook/hhvm/commit/f57df6d8cf33cb14c40f52287da29360e7003373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.facebook.com/security/advisories/cve-2019-11936', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11936', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'name': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.30.12', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.23.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.24.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.25.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.26.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.27.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Various APC functions accept keys containing null bytes as input, leading to premature truncation of input. This issue affects HHVM versions prior to 3.30.12, all versions between 4.0.0 and 4.8.5, all versions between 4.9.0 and 4.23.1, as well as 4.24.0, 4.25.0, 4.26.0, 4.27.0, 4.28.0, and 4.28.1.'}] | 2021-09-14T12:03Z | 2019-12-04T17:16Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | William Lee | 2019-10-28 12:52:00-07:00 | Prevent APC keys with nulls
Summary:
This diff prevents storing APC keys that contain the null byte.
APC uses a backing data structure ConcurrentTableSharedStore that uses const char* as its key type. This leads to situations where inserting APC keys with null bytes will cause key truncation, like so...
localhost> p apc_clear_cache();
true
localhost> p apc_fetch("test")
false
localhost> p apc_fetch("test\x00suffix")
false
localhost> p apc_add("test\x00suffix", 5)
true
localhost> p apc_fetch("test")
5
localhost> p apc_fetch("test\x00suffix")
false
This change will make APC throw an error if a key containing a null byte is passed to the store/add methods.
Reviewed By: markw65
Differential Revision: D17608626
fbshipit-source-id: 915e179f41e66c99c718364ec4a8639d204c4ea2 | f57df6d8cf33cb14c40f52287da29360e7003373 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_FUNCTION | HPHP::HHVM_FUNCTION(apc_add,const Variant&key_or_array,const Variant&var,int64_t ttl) | [] | Variant HHVM_FUNCTION(apc_add,
const Variant& key_or_array,
const Variant& var /* = null */,
int64_t ttl /* = 0 */) {
if (!apcExtension::Enable) return false;
if (key_or_array.isArray()) {
Array valuesArr = key_or_array.toArray();
// errors stores all keys corresponding to entries that could not be cached
ArrayInit errors(valuesArr.size(), ArrayInit::Map{});
for (ArrayIter iter(valuesArr); iter; ++iter) {
Variant key = iter.first();
if (!key.isString()) {
throw_invalid_argument("apc key: (not a string)");
return false;
}
Variant v = iter.second();
if (!apc_store().add(key.toString(), v, ttl)) {
errors.add(key, -1);
}
}
return errors.toVariant();
}
if (!key_or_array.isString()) {
throw_invalid_argument("apc key: (not a string)");
return false;
}
String strKey = key_or_array.toString();
return apc_store().add(strKey, var, ttl);
} | 197 | True | 1 |
CVE-2019-11936 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/f57df6d8cf33cb14c40f52287da29360e7003373', 'name': 'https://github.com/facebook/hhvm/commit/f57df6d8cf33cb14c40f52287da29360e7003373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.facebook.com/security/advisories/cve-2019-11936', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11936', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'name': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.30.12', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.23.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.24.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.25.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.26.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.27.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Various APC functions accept keys containing null bytes as input, leading to premature truncation of input. This issue affects HHVM versions prior to 3.30.12, all versions between 4.0.0 and 4.8.5, all versions between 4.9.0 and 4.23.1, as well as 4.24.0, 4.25.0, 4.26.0, 4.27.0, 4.28.0, and 4.28.1.'}] | 2021-09-14T12:03Z | 2019-12-04T17:16Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | William Lee | 2019-10-28 12:52:00-07:00 | Prevent APC keys with nulls
Summary:
This diff prevents storing APC keys that contain the null byte.
APC uses a backing data structure ConcurrentTableSharedStore that uses const char* as its key type. This leads to situations where inserting APC keys with null bytes will cause key truncation, like so...
localhost> p apc_clear_cache();
true
localhost> p apc_fetch("test")
false
localhost> p apc_fetch("test\x00suffix")
false
localhost> p apc_add("test\x00suffix", 5)
true
localhost> p apc_fetch("test")
5
localhost> p apc_fetch("test\x00suffix")
false
This change will make APC throw an error if a key containing a null byte is passed to the store/add methods.
Reviewed By: markw65
Differential Revision: D17608626
fbshipit-source-id: 915e179f41e66c99c718364ec4a8639d204c4ea2 | f57df6d8cf33cb14c40f52287da29360e7003373 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_FUNCTION | HPHP::HHVM_FUNCTION(apc_store,const Variant&key_or_array,const Variant&var,int64_t ttl) | [] | Variant HHVM_FUNCTION(apc_store,
const Variant& key_or_array,
const Variant& var /* = null */,
int64_t ttl /* = 0 */) {
if (!apcExtension::Enable) return Variant(false);
if (key_or_array.isArray()) {
Array valuesArr = key_or_array.toArray();
for (ArrayIter iter(valuesArr); iter; ++iter) {
Variant key = iter.first();
if (!key.isString()) {
throw_invalid_argument("apc key: (not a string)");
return Variant(false);
}
Variant v = iter.second();
apc_store().set(key.toString(), v, ttl);
}
return Variant(ArrayData::Create());
}
if (!key_or_array.isString()) {
throw_invalid_argument("apc key: (not a string)");
return Variant(false);
}
String strKey = key_or_array.toString();
apc_store().set(strKey, var, ttl);
return Variant(true);
} | 183 | True | 1 |
CVE-2019-11935 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-11935', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11935', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/1c518555dba6ceb45d5ba61845b96e261219c3b7', 'name': 'https://github.com/facebook/hhvm/commit/1c518555dba6ceb45d5ba61845b96e261219c3b7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'name': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.30.12', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.23.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.24.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.25.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.26.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.27.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks when processing a string in mb_ereg_replace allows access to out-of-bounds memory. This issue affects HHVM versions prior to 3.30.12, all versions between 4.0.0 and 4.8.5, all versions between 4.9.0 and 4.23.1, as well as 4.24.0, 4.25.0, 4.26.0, 4.27.0, 4.28.0, and 4.28.1.'}] | 2019-12-11T18:32Z | 2019-12-04T17:16Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Shaunak Kishore | 2019-10-28 20:20:37-07:00 | Fix buffer overflow in mb_ereg_replace
Summary:
This diff has already been landed to release and to open-source branches. We're now landing it on master.
CVE-2019-11935
Reviewed By: jjergus
Differential Revision: D18177934
fbshipit-source-id: d108a59e38c67f5f5e835febd7255307605ba62c | 1c518555dba6ceb45d5ba61845b96e261219c3b7 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::_php_mb_regex_ereg_replace_exec | HPHP::_php_mb_regex_ereg_replace_exec( const Variant & pattern , const String & replacement , const String & str , const String & option , OnigOptionType options) | ['pattern', 'replacement', 'str', 'option', 'options'] | static Variant _php_mb_regex_ereg_replace_exec(const Variant& pattern,
const String& replacement,
const String& str,
const String& option,
OnigOptionType options) {
const char *p;
php_mb_regex_t *re;
OnigSyntaxType *syntax;
OnigRegion *regs = nullptr;
StringBuffer out_buf;
int i, err, eval, n;
OnigUChar *pos;
OnigUChar *string_lim;
char pat_buf[2];
const mbfl_encoding *enc;
{
const char *current_enc_name;
current_enc_name = php_mb_regex_mbctype2name(MBSTRG(current_mbctype));
if (current_enc_name == nullptr ||
(enc = mbfl_name2encoding(current_enc_name)) == nullptr) {
raise_warning("Unknown error");
return false;
}
}
eval = 0;
{
if (!option.empty()) {
_php_mb_regex_init_options(option.data(), option.size(),
&options, &syntax, &eval);
} else {
options |= MBSTRG(regex_default_options);
syntax = MBSTRG(regex_default_syntax);
}
}
String spattern;
if (pattern.isString()) {
spattern = pattern.toString();
} else {
/* FIXME: this code is not multibyte aware! */
pat_buf[0] = pattern.toByte();
pat_buf[1] = '\0';
spattern = String(pat_buf, 1, CopyString);
}
/* create regex pattern buffer */
re = php_mbregex_compile_pattern(spattern, options,
MBSTRG(current_mbctype), syntax);
if (re == nullptr) {
return false;
}
if (eval) {
throw_not_supported("ereg_replace", "dynamic coding");
}
/* do the actual work */
err = 0;
pos = (OnigUChar*)str.data();
string_lim = (OnigUChar*)(str.data() + str.size());
regs = onig_region_new();
while (err >= 0) {
err = onig_search(re, (OnigUChar *)str.data(), (OnigUChar *)string_lim,
pos, (OnigUChar *)string_lim, regs, 0);
if (err <= -2) {
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
onig_error_code_to_str(err_str, err);
raise_warning("mbregex search failure: %s", err_str);
break;
}
if (err >= 0) {
#if moriyoshi_0
if (regs->beg[0] == regs->end[0]) {
raise_warning("Empty regular expression");
break;
}
#endif
/* copy the part of the string before the match */
out_buf.append((const char *)pos,
(OnigUChar *)(str.data() + regs->beg[0]) - pos);
/* copy replacement and backrefs */
i = 0;
p = replacement.data();
while (i < replacement.size()) {
int fwd = (int)php_mb_mbchar_bytes_ex(p, enc);
n = -1;
if ((replacement.size() - i) >= 2 && fwd == 1 &&
p[0] == '\\' && p[1] >= '0' && p[1] <= '9') {
n = p[1] - '0';
}
if (n >= 0 && n < regs->num_regs) {
if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] &&
regs->end[n] <= str.size()) {
out_buf.append(str.data() + regs->beg[n],
regs->end[n] - regs->beg[n]);
}
p += 2;
i += 2;
} else {
out_buf.append(p, fwd);
p += fwd;
i += fwd;
}
}
n = regs->end[0];
if ((pos - (OnigUChar *)str.data()) < n) {
pos = (OnigUChar *)(str.data() + n);
} else {
if (pos < string_lim) {
out_buf.append((const char *)pos, 1);
}
pos++;
}
} else { /* nomatch */
/* stick that last bit of string on our output */
if (string_lim - pos > 0) {
out_buf.append((const char *)pos, string_lim - pos);
}
}
onig_region_free(regs, 0);
}
if (regs != nullptr) {
onig_region_free(regs, 1);
}
if (err <= -2) {
return false;
}
return out_buf.detach();
} | 803 | True | 1 |
CVE-2019-11930 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'name': 'https://hhvm.com/blog/2019/10/28/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://www.facebook.com/security/advisories/cve-2019-11930', 'name': 'https://www.facebook.com/security/advisories/cve-2019-11930', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/524d2e60cfe910406ec6109e4286d7edd545ab36', 'name': 'https://github.com/facebook/hhvm/commit/524d2e60cfe910406ec6109e4286d7edd545ab36', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-763'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.8.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.30.12', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.23.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.24.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.25.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.26.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.27.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.28.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An invalid free in mb_detect_order can cause the application to crash or potentially result in remote code execution. This issue affects HHVM versions prior to 3.30.12, all versions between 4.0.0 and 4.8.5, all versions between 4.9.0 and 4.23.1, as well as 4.24.0, 4.25.0, 4.26.0, 4.27.0, 4.28.0, and 4.28.1.'}] | 2020-10-06T18:23Z | 2019-12-04T17:16Z | Release of Invalid Pointer or Reference | The application attempts to return a memory resource to the system, but calls the wrong release function or calls the appropriate release function incorrectly. |
This weakness can take several forms, such as:
The memory was allocated, explicitly or implicitly, via one memory management method and deallocated using a different, non-compatible function (CWE-762).
The function calls or memory management routines chosen are appropriate, however they are used incorrectly, such as in CWE-761.
| https://cwe.mitre.org/data/definitions/763.html | 0 | Dhaval Kapil | 2019-10-28 23:06:25-07:00 | ext_mbstring: Fix invalid free() in php_mb_parse_encoding
Summary:
A chunk of memory allocated by 'req::calloc_noptrs' was being freed by 'free'. The former internally calls 'calloc' and returns a pointer at an index sizeof(MallocNode) inside the allocated buffer. This led to freeing invalid memory.
CVE-2019-11930
Reviewed By: jjergus
Differential Revision: D18179908
fbshipit-source-id: 0e3fe77628e0b9dee8361e712b8abac59ae5ed22 | 524d2e60cfe910406ec6109e4286d7edd545ab36 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::php_mb_parse_encoding | HPHP::php_mb_parse_encoding( const Variant & encoding , mbfl_encoding ** * return_list , int * return_size , bool persistent) | ['encoding', 'return_list', 'return_size', 'persistent'] | static bool php_mb_parse_encoding(const Variant& encoding,
mbfl_encoding ***return_list,
int *return_size, bool persistent) {
bool ret;
if (encoding.isArray()) {
ret = php_mb_parse_encoding_array(encoding.toArray(),
return_list, return_size,
persistent ? 1 : 0);
} else {
String enc = encoding.toString();
ret = php_mb_parse_encoding_list(enc.data(), enc.size(),
return_list, return_size,
persistent ? 1 : 0);
}
if (!ret) {
if (return_list && *return_list) {
free(*return_list);
*return_list = nullptr;
}
return_size = 0;
}
return ret;
} | 128 | True | 1 |
CVE-2020-1893 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/bd586671a3c22eb2f07e55f11b3ce64e1f7961e7', 'name': 'https://github.com/facebook/hhvm/commit/bd586671a3c22eb2f07e55f11b3ce64e1f7961e7', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://hhvm.com/blog/2020/02/20/security-update.html', 'name': 'https://hhvm.com/blog/2020/02/20/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.44.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.43.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.42.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.41.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.40.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.39.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.45.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.8.7', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.32.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndIncluding': '4.38.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks when decoding JSON in TryParse reads out of bounds memory, potentially leading to DOS. This issue affects HHVM 4.45.0, 4.44.0, 4.43.0, 4.42.0, 4.41.0, 4.40.0, 4.39.0, versions between 4.33.0 and 4.38.0 (inclusive), versions between 4.9.0 and 4.32.0 (inclusive), and versions prior to 4.8.7.'}] | 2020-03-05T20:36Z | 2020-03-03T15:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Mark Williams | 2020-02-20 15:41:33-08:00 | Fix a buffer-overrun in SimpleParser
Summary: In the failure case, we might have already consumed the entire string.
Reviewed By: binliu19, ottoni
Differential Revision: D19610775
fbshipit-source-id: d387df15994a310f5a31cfbb5fa11679997f7ae7 | bd586671a3c22eb2f07e55f11b3ce64e1f7961e7 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::SimpleParser::TryParse | HPHP::SimpleParser::TryParse( const char * inp , int length , TypedValue * buf , Variant & out , JSONContainerType container_type , bool is_tsimplejson) | ['inp', 'length', 'buf', 'out', 'container_type', 'is_tsimplejson'] | static bool TryParse(const char* inp, int length,
TypedValue* buf, Variant& out,
JSONContainerType container_type, bool is_tsimplejson) {
SimpleParser parser(inp, length, buf, container_type, is_tsimplejson);
bool ok = parser.parseValue();
parser.skipSpace();
if (!ok || parser.p != inp + length) {
// Unsupported, malformed, or trailing garbage. Release entire stack.
tvDecRefRange(buf, parser.top);
return false;
}
out = Variant::attach(*--parser.top);
return true;
} | 98 | True | 1 |
CVE-2020-1888 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://hhvm.com/blog/2020/02/20/security-update.html', 'name': 'https://hhvm.com/blog/2020/02/20/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/b3679121bb3c7017ff04b4c08402ffff5cf59b13', 'name': 'https://github.com/facebook/hhvm/commit/b3679121bb3c7017ff04b4c08402ffff5cf59b13', 'refsource': 'CONFIRM', 'tags': ['Patch']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.44.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.43.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.42.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.41.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.40.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.39.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.45.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.8.7', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9.0', 'versionEndIncluding': '4.32.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndIncluding': '4.38.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks when decoding JSON in handleBackslash reads out of bounds memory, potentially leading to DOS. This issue affects HHVM 4.45.0, 4.44.0, 4.43.0, 4.42.0, 4.41.0, 4.40.0, 4.39.0, versions between 4.33.0 and 4.38.0 (inclusive), versions between 4.9.0 and 4.32.0 (inclusive), and versions prior to 4.8.7.'}] | 2020-03-05T20:23Z | 2020-03-03T15:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Mark Williams | 2020-02-20 15:41:33-08:00 | Fix buffer overrun in SimpleParser::handleBackslash
Summary:
It read 4 chars, then checked for validity, but any of them could have
been the end of the string, so check after each one instead.
Reviewed By: oulgen
Differential Revision: D19611163
fbshipit-source-id: 3da0a39555cb85a93f4fd98048368f17cf37e2e4 | b3679121bb3c7017ff04b4c08402ffff5cf59b13 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::SimpleParser::handleBackslash | HPHP::SimpleParser::handleBackslash( signed char & out) | ['out'] | bool handleBackslash(signed char& out) {
char ch = *p++;
switch (ch) {
case 0: return false;
case '"': out = ch; return true;
case '\\': out = ch; return true;
case '/': out = ch; return true;
case 'b': out = '\b'; return true;
case 'f': out = '\f'; return true;
case 'n': out = '\n'; return true;
case 'r': out = '\r'; return true;
case 't': out = '\t'; return true;
case 'u': {
if (UNLIKELY(is_tsimplejson)) {
auto const ch1 = *p++;
auto const ch2 = *p++;
auto const dch3 = dehexchar(*p++);
auto const dch4 = dehexchar(*p++);
if (UNLIKELY(ch1 != '0' || ch2 != '0' || dch3 < 0 || dch4 < 0)) {
return false;
}
out = (dch3 << 4) | dch4;
return true;
} else {
uint16_t u16cp = 0;
for (int i = 0; i < 4; i++) {
auto const hexv = dehexchar(*p++);
if (hexv < 0) return false; // includes check for end of string
u16cp <<= 4;
u16cp |= hexv;
}
if (u16cp > 0x7f) {
return false;
} else {
out = u16cp;
return true;
}
}
}
default: return false;
}
} | 278 | True | 1 |
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserialize | HPHP::serialize::FBUnserializer<V>::unserialize( folly :: StringPiece serialized) | ['serialized'] | inline typename V::VariantType FBUnserializer<V>::unserialize(
folly::StringPiece serialized) {
FBUnserializer<V> unserializer(serialized);
return unserializer.unserializeThing();
} | 30 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserializeList | HPHP::serialize::FBUnserializer<V>::unserializeList() | [] | inline typename V::VectorType FBUnserializer<V>::unserializeList() {
p_ += CODE_SIZE;
// the list size is written so we can reserve it in the vector
// in future. Skip past it for now.
unserializeInt64();
typename V::VectorType ret = V::createVector();
size_t code = nextCode();
while (code != FB_SERIALIZE_STOP) {
V::vectorAppend(ret, unserializeThing());
code = nextCode();
}
p_ += CODE_SIZE;
return ret;
} | 69 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserializeMap | HPHP::serialize::FBUnserializer<V>::unserializeMap() | [] | inline typename V::MapType FBUnserializer<V>::unserializeMap() {
p_ += CODE_SIZE;
typename V::MapType ret = V::createMap();
size_t code = nextCode();
while (code != FB_SERIALIZE_STOP) {
switch (code) {
case FB_SERIALIZE_VARCHAR:
case FB_SERIALIZE_STRING:
{
auto key = unserializeString();
auto value = unserializeThing();
V::mapSet(ret, std::move(key), std::move(value));
}
break;
default:
{
auto key = unserializeInt64();
auto value = unserializeThing();
V::mapSet(ret, std::move(key), std::move(value));
}
}
code = nextCode();
}
p_ += CODE_SIZE;
return ret;
} | 144 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserializeSet | HPHP::serialize::FBUnserializer<V>::unserializeSet() | [] | inline typename V::SetType FBUnserializer<V>::unserializeSet() {
p_ += CODE_SIZE;
// the set size is written so we can reserve it in the set
// in future. Skip past it for now.
unserializeInt64();
typename V::SetType ret = V::createSet();
size_t code = nextCode();
while (code != FB_SERIALIZE_STOP) {
V::setAppend(ret, unserializeThing());
code = nextCode();
}
p_ += CODE_SIZE;
return ret;
} | 69 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserializeThing | HPHP::serialize::FBUnserializer<V>::unserializeThing() | [] | inline typename V::VariantType FBUnserializer<V>::unserializeThing() {
size_t code = nextCode();
switch (code) {
case FB_SERIALIZE_BYTE:
case FB_SERIALIZE_I16:
case FB_SERIALIZE_I32:
case FB_SERIALIZE_I64:
return V::fromInt64(unserializeInt64());
case FB_SERIALIZE_VARCHAR:
case FB_SERIALIZE_STRING:
return V::fromString(unserializeString());
case FB_SERIALIZE_STRUCT:
return V::fromMap(unserializeMap());
case FB_SERIALIZE_NULL:
++p_;
return V::createNull();
case FB_SERIALIZE_DOUBLE:
return V::fromDouble(unserializeDouble());
case FB_SERIALIZE_BOOLEAN:
return V::fromBool(unserializeBoolean());
case FB_SERIALIZE_VECTOR:
return V::fromVector(unserializeVector());
case FB_SERIALIZE_LIST:
return V::fromVector(unserializeList());
case FB_SERIALIZE_SET:
return V::fromSet(unserializeSet());
default:
throw UnserializeError("Invalid code: " + folly::to<std::string>(code)
+ " at location " + folly::to<std::string>(p_));
}
} | 186 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::serialize::FBUnserializer<V>::unserializeVector | HPHP::serialize::FBUnserializer<V>::unserializeVector() | [] | inline typename V::VectorType FBUnserializer<V>::unserializeVector() {
p_ += CODE_SIZE;
typename V::VectorType ret = V::createVector();
size_t code = nextCode();
while (code != FB_SERIALIZE_STOP) {
V::vectorAppend(ret, unserializeThing());
code = nextCode();
}
p_ += CODE_SIZE;
return ret;
} | 65 | True | 1 |
|
CVE-2020-1898 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'name': 'https://github.com/facebook/hhvm/commit/1746dfb11fc0048366f34669e74318b8278a684c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-674'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fb_unserialize function did not impose a depth limit for nested deserialization. That meant a maliciously constructed string could cause deserialization to recurse, leading to stack exhaustion. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-17T19:50Z | 2021-03-11T01:15Z | Uncontrolled Recursion | The product does not properly control the amount of recursion which takes place, consuming excessive resources, such as allocated memory or the program stack. | https://cwe.mitre.org/data/definitions/674.html | 0 | jjergus | 2020-06-29 11:36:00-07:00 | CVE-2020-1898
Don't allow for unlimited nesting in FBUnserialize or fb_compact_unserialize | 1746dfb11fc0048366f34669e74318b8278a684c | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::VariantControllerImpl::setAppend | HPHP::VariantControllerImpl::setAppend( SetType & set , const VariantType & v) | ['set', 'v'] | static void setAppend(SetType& set, const VariantType& v) {
auto value_type = type(v);
if (value_type != HPHP::serialize::Type::INT64 &&
value_type != HPHP::serialize::Type::STRING) {
throw HPHP::serialize::UnserializeError(
"Unsupported keyset element of type " +
folly::to<std::string>(value_type));
}
set.append(v);
} | 74 | True | 1 |
|
CVE-2020-1899 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:N | NETWORK | LOW | NONE | PARTIAL | NONE | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | NONE | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/facebook/hhvm/commit/1107228a5128d3ca1c4add8ac1635d933cbbe2e9', 'name': 'https://github.com/facebook/hhvm/commit/1107228a5128d3ca1c4add8ac1635d933cbbe2e9', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'name': 'https://hhvm.com/blog/2020/06/30/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.58.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.59.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.60.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.61.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.62.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.57.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.33.0', 'versionEndExcluding': '4.56.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.32.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unserialize() function supported a type code, "S", which was meant to be supported only for APC serialization. This type code allowed arbitrary memory addresses to be accessed as if they were static StringData objects. This issue affected HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.'}] | 2021-03-18T14:14Z | 2021-03-11T01:15Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | jjergus | 2020-06-29 11:37:01-07:00 | CVE-2020-1899
VariableUnserializer should only recognize type 'S' in APCSerialization mode | 1107228a5128d3ca1c4add8ac1635d933cbbe2e9 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::VariableUnserializer::matchString | HPHP::VariableUnserializer::matchString( folly :: StringPiece str) | ['str'] | bool VariableUnserializer::matchString(folly::StringPiece str) {
const char* p = m_buf;
assertx(p <= m_end);
int total = 0;
if (*p == 'S') {
total = 2 + 8 + 1;
if (p + total > m_end) return false;
p++;
if (*p++ != ':') return false;
auto const sd = *reinterpret_cast<StringData*const*>(p);
assertx(sd->isStatic());
if (str.compare(sd->slice()) != 0) return false;
p += size_t(8);
} else {
const auto ss = str.size();
if (ss >= 100) return false;
int digits = ss >= 10 ? 2 : 1;
total = 2 + digits + 2 + ss + 2;
if (p + total > m_end) return false;
if (*p++ != 's') return false;
if (*p++ != ':') return false;
if (digits == 2) {
if (*p++ != '0' + ss/10) return false;
if (*p++ != '0' + ss%10) return false;
} else {
if (*p++ != '0' + ss) return false;
}
if (*p++ != ':') return false;
if (*p++ != '\"') return false;
if (memcmp(p, str.data(), ss)) return false;
p += ss;
if (*p++ != '\"') return false;
}
if (*p++ != ';') return false;
assertx(m_buf + total == p);
m_buf = p;
return true;
} | 336 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::PCRECache::dump | HPHP::PCRECache::dump( const std :: string & filename) | ['filename'] | void PCRECache::dump(const std::string& filename) {
std::ofstream out(filename.c_str());
switch (m_kind) {
case CacheKind::Static:
for (auto& it : *m_staticCache) {
out << it.first->data() << "\n";
}
break;
case CacheKind::Lru:
case CacheKind::Scalable:
{
std::vector<LRUCacheKey> keys;
if (m_kind == CacheKind::Lru) {
m_lruCache->snapshotKeys(keys);
} else {
m_scalableCache->snapshotKeys(keys);
}
for (auto& key: keys) {
out << key.c_str() << "\n";
}
}
break;
}
out.close();
} | 140 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::PCRECache::dump | HPHP::PCRECache::dump( const std :: string & filename) | ['filename'] | void PCRECache::dump(const std::string& filename) {
std::ofstream out(filename.c_str());
switch (m_kind) {
case CacheKind::Static:
for (auto& it : *m_staticCache) {
out << it.first->data() << "\n";
}
break;
case CacheKind::Lru:
case CacheKind::Scalable:
{
std::vector<LRUCacheKey> keys;
if (m_kind == CacheKind::Lru) {
m_lruCache->snapshotKeys(keys);
} else {
m_scalableCache->snapshotKeys(keys);
}
for (auto& key: keys) {
out << key.c_str() << "\n";
}
}
break;
}
out.close();
} | 140 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::pcre_dump_cache | HPHP::pcre_dump_cache( const std :: string & filename) | ['filename'] | void pcre_dump_cache(const std::string& filename) {
s_pcreCache.dump(filename);
} | 18 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::pcre_dump_cache | HPHP::pcre_dump_cache( const std :: string & filename) | ['filename'] | void pcre_dump_cache(const std::string& filename) {
s_pcreCache.dump(filename);
} | 18 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::StringUtil::Crypt | HPHP::StringUtil::Crypt( const String & input , const char * salt) | ['input', 'salt'] | String StringUtil::Crypt(const String& input, const char *salt /* = "" */) {
if (salt && salt[0] == '\0') {
raise_notice("crypt(): No salt parameter was specified."
" You must use a randomly generated salt and a strong"
" hash function to produce a secure hash.");
}
return String(string_crypt(input.c_str(), salt), AttachString);
} | 53 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::StringUtil::Crypt | HPHP::StringUtil::Crypt( const String & input , const char * salt) | ['input', 'salt'] | String StringUtil::Crypt(const String& input, const char *salt /* = "" */) {
if (salt && salt[0] == '\0') {
raise_notice("crypt(): No salt parameter was specified."
" You must use a randomly generated salt and a strong"
" hash function to produce a secure hash.");
}
return String(string_crypt(input.c_str(), salt), AttachString);
} | 53 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::DOMNode::doc | HPHP::DOMNode::doc() const | [] | req::ptr<XMLDocumentData> doc() const { return m_node->doc(); } | 13 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::DOMNode::doc | HPHP::DOMNode::doc() const | [] | req::ptr<XMLDocumentData> doc() const { return m_node->doc(); } | 13 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | gdImageCreateTrueColor | gdImageCreateTrueColor( int sx , int sy) | ['sx', 'sy'] | gdImagePtr gdImageCreateTrueColor (int sx, int sy)
{
int i;
gdImagePtr im;
if (overflow2(sx, sy)) {
return NULL;
}
if (overflow2(sizeof(unsigned char *), sy)) {
return NULL;
}
if (overflow2(sizeof(int) + sizeof(unsigned char), sx * sy)) {
return NULL;
}
// Check for OOM before doing a potentially large allocation.
auto allocsz = sizeof(gdImage)
+ sy * (sizeof(int *) + sizeof(unsigned char *))
+ sx * sy * (sizeof(int) + sizeof(unsigned char));
if (UNLIKELY(precheckOOM(allocsz))) {
// Don't throw here because GD might need to do its own cleanup.
return NULL;
}
im = (gdImage *) gdMalloc(sizeof(gdImage));
memset(im, 0, sizeof(gdImage));
im->tpixels = (int **) gdMalloc(sizeof(int *) * sy);
im->AA_opacity = (unsigned char **) gdMalloc(sizeof(unsigned char *) * sy);
im->polyInts = 0;
im->polyAllocated = 0;
im->brush = 0;
im->tile = 0;
im->style = 0;
for (i = 0; i < sy; i++) {
im->tpixels[i] = (int *) gdCalloc(sx, sizeof(int));
im->AA_opacity[i] = (unsigned char *) gdCalloc(sx, sizeof(unsigned char));
}
im->sx = sx;
im->sy = sy;
im->transparent = (-1);
im->interlace = 0;
im->trueColor = 1;
/* 2.0.2: alpha blending is now on by default, and saving of alpha is
* off by default. This allows font antialiasing to work as expected
* on the first try in JPEGs -- quite important -- and also allows
* for smaller PNGs when saving of alpha channel is not really
* desired, which it usually isn't!
*/
im->saveAlphaFlag = 0;
im->alphaBlendingFlag = 1;
im->thick = 1;
im->AA = 0;
im->AA_polygon = 0;
im->cx1 = 0;
im->cy1 = 0;
im->cx2 = im->sx - 1;
im->cy2 = im->sy - 1;
im->interpolation = NULL;
im->interpolation_id = GD_BILINEAR_FIXED;
return im;
} | 396 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | gdImageCreateTrueColor | gdImageCreateTrueColor( int sx , int sy) | ['sx', 'sy'] | gdImagePtr gdImageCreateTrueColor (int sx, int sy)
{
int i;
gdImagePtr im;
if (overflow2(sx, sy)) {
return NULL;
}
if (overflow2(sizeof(unsigned char *), sy)) {
return NULL;
}
if (overflow2(sizeof(int) + sizeof(unsigned char), sx * sy)) {
return NULL;
}
// Check for OOM before doing a potentially large allocation.
auto allocsz = sizeof(gdImage)
+ sy * (sizeof(int *) + sizeof(unsigned char *))
+ sx * sy * (sizeof(int) + sizeof(unsigned char));
if (UNLIKELY(precheckOOM(allocsz))) {
// Don't throw here because GD might need to do its own cleanup.
return NULL;
}
im = (gdImage *) gdMalloc(sizeof(gdImage));
memset(im, 0, sizeof(gdImage));
im->tpixels = (int **) gdMalloc(sizeof(int *) * sy);
im->AA_opacity = (unsigned char **) gdMalloc(sizeof(unsigned char *) * sy);
im->polyInts = 0;
im->polyAllocated = 0;
im->brush = 0;
im->tile = 0;
im->style = 0;
for (i = 0; i < sy; i++) {
im->tpixels[i] = (int *) gdCalloc(sx, sizeof(int));
im->AA_opacity[i] = (unsigned char *) gdCalloc(sx, sizeof(unsigned char));
}
im->sx = sx;
im->sy = sy;
im->transparent = (-1);
im->interlace = 0;
im->trueColor = 1;
/* 2.0.2: alpha blending is now on by default, and saving of alpha is
* off by default. This allows font antialiasing to work as expected
* on the first try in JPEGs -- quite important -- and also allows
* for smaller PNGs when saving of alpha channel is not really
* desired, which it usually isn't!
*/
im->saveAlphaFlag = 0;
im->alphaBlendingFlag = 1;
im->thick = 1;
im->AA = 0;
im->AA_polygon = 0;
im->cx1 = 0;
im->cy1 = 0;
im->cx2 = im->sx - 1;
im->cy2 = im->sy - 1;
im->interpolation = NULL;
im->interpolation_id = GD_BILINEAR_FIXED;
return im;
} | 396 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_FUNCTION | HPHP::HHVM_FUNCTION( ldap_escape , const String & value , const String & ignores , int flags) | ['ldap_escape', 'value', 'ignores', 'flags'] | String HHVM_FUNCTION(ldap_escape,
const String& value,
const String& ignores /* = "" */,
int flags /* = 0 */) {
char esc[256] = {};
if (flags & k_LDAP_ESCAPE_FILTER) { // llvm.org/bugs/show_bug.cgi?id=18389
esc['*'*1u] = esc['('*1u] = esc[')'*1u] = esc['\0'*1u] = esc['\\'*1u] = 1;
}
if (flags & k_LDAP_ESCAPE_DN) {
esc[','*1u] = esc['='*1u] = esc['+'*1u] = esc['<'*1u] = esc['\\'*1u] = 1;
esc['>'*1u] = esc[';'*1u] = esc['"'*1u] = esc['#'*1u] = 1;
}
if (!flags) {
memset(esc, 1, sizeof(esc));
}
for (int i = 0; i < ignores.size(); i++) {
esc[(unsigned char)ignores[i]] = 0;
}
char hex[] = "0123456789abcdef";
String result(3 * value.size(), ReserveString);
char *rdata = result.get()->mutableData(), *r = rdata;
for (int i = 0; i < value.size(); i++) {
auto c = (unsigned char)value[i];
if (esc[c]) {
*r++ = '\\';
*r++ = hex[c >> 4];
*r++ = hex[c & 0xf];
} else {
*r++ = c;
}
}
result.setSize(r - rdata);
return result;
} | 332 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_FUNCTION | HPHP::HHVM_FUNCTION( ldap_escape , const String & value , const String & ignores , int flags) | ['ldap_escape', 'value', 'ignores', 'flags'] | String HHVM_FUNCTION(ldap_escape,
const String& value,
const String& ignores /* = "" */,
int flags /* = 0 */) {
char esc[256] = {};
if (flags & k_LDAP_ESCAPE_FILTER) { // llvm.org/bugs/show_bug.cgi?id=18389
esc['*'*1u] = esc['('*1u] = esc[')'*1u] = esc['\0'*1u] = esc['\\'*1u] = 1;
}
if (flags & k_LDAP_ESCAPE_DN) {
esc[','*1u] = esc['='*1u] = esc['+'*1u] = esc['<'*1u] = esc['\\'*1u] = 1;
esc['>'*1u] = esc[';'*1u] = esc['"'*1u] = esc['#'*1u] = 1;
}
if (!flags) {
memset(esc, 1, sizeof(esc));
}
for (int i = 0; i < ignores.size(); i++) {
esc[(unsigned char)ignores[i]] = 0;
}
char hex[] = "0123456789abcdef";
String result(3 * value.size(), ReserveString);
char *rdata = result.get()->mutableData(), *r = rdata;
for (int i = 0; i < value.size(); i++) {
auto c = (unsigned char)value[i];
if (esc[c]) {
*r++ = '\\';
*r++ = hex[c >> 4];
*r++ = hex[c & 0xf];
} else {
*r++ = c;
}
}
result.setSize(r - rdata);
return result;
} | 332 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_METHOD | HPHP::HHVM_METHOD( XMLReader , expand , const Variant & basenode) | ['XMLReader', 'expand', 'basenode'] | Variant HHVM_METHOD(XMLReader, expand,
const Variant& basenode /* = null */) {
auto* data = Native::data<XMLReader>(this_);
req::ptr<XMLDocumentData> doc;
xmlDocPtr docp = nullptr;
SYNC_VM_REGS_SCOPED();
if (!basenode.isNull()) {
auto dombasenode = Native::data<DOMNode>(basenode.toObject());
doc = dombasenode->doc();
docp = doc->docp();
if (docp == nullptr) {
raise_warning("Invalid State Error");
return false;
}
}
if (data->m_ptr) {
xmlNodePtr node = xmlTextReaderExpand(data->m_ptr);
if (node == nullptr) {
raise_warning("An Error Occurred while expanding");
return false;
} else {
xmlNodePtr nodec = xmlDocCopyNode(node, docp, 1);
if (nodec == nullptr) {
raise_notice("Cannot expand this node type");
return false;
} else {
return php_dom_create_object(nodec, doc);
}
}
}
raise_warning("Load Data before trying to read");
return false;
} | 188 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_METHOD | HPHP::HHVM_METHOD( XMLReader , expand , const Variant & basenode) | ['XMLReader', 'expand', 'basenode'] | Variant HHVM_METHOD(XMLReader, expand,
const Variant& basenode /* = null */) {
auto* data = Native::data<XMLReader>(this_);
req::ptr<XMLDocumentData> doc;
xmlDocPtr docp = nullptr;
SYNC_VM_REGS_SCOPED();
if (!basenode.isNull()) {
auto dombasenode = Native::data<DOMNode>(basenode.toObject());
doc = dombasenode->doc();
docp = doc->docp();
if (docp == nullptr) {
raise_warning("Invalid State Error");
return false;
}
}
if (data->m_ptr) {
xmlNodePtr node = xmlTextReaderExpand(data->m_ptr);
if (node == nullptr) {
raise_warning("An Error Occurred while expanding");
return false;
} else {
xmlNodePtr nodec = xmlDocCopyNode(node, docp, 1);
if (nodec == nullptr) {
raise_notice("Cannot expand this node type");
return false;
} else {
return php_dom_create_object(nodec, doc);
}
}
}
raise_warning("Load Data before trying to read");
return false;
} | 188 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::AdminRequestHandler::handleDumpStaticStringsRequest | HPHP::AdminRequestHandler::handleDumpStaticStringsRequest( const std :: string & , const std :: string & filename) | ['filename'] | bool AdminRequestHandler::handleDumpStaticStringsRequest(
const std::string& /*cmd*/, const std::string& filename) {
auto const& list = lookupDefinedStaticStrings();
std::ofstream out(filename.c_str());
SCOPE_EXIT { out.close(); };
for (auto item : list) {
out << formatStaticString(item);
if (RuntimeOption::EvalPerfDataMap) {
auto const len = std::min<size_t>(item->size(), 255);
std::string str(item->data(), len);
// Only print the first line (up to 255 characters). Since we want '\0' in
// the list of characters to avoid, we need to use the version of
// `find_first_of()' with explicit length.
auto cutOffPos = str.find_first_of("\r\n", 0, 3);
if (cutOffPos != std::string::npos) str.erase(cutOffPos);
Debug::DebugInfo::recordDataMap(item->mutableData(),
item->mutableData() + item->size(),
"Str-" + str);
}
}
return true;
} | 172 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::AdminRequestHandler::handleDumpStaticStringsRequest | HPHP::AdminRequestHandler::handleDumpStaticStringsRequest( const std :: string & , const std :: string & filename) | ['filename'] | bool AdminRequestHandler::handleDumpStaticStringsRequest(
const std::string& /*cmd*/, const std::string& filename) {
auto const& list = lookupDefinedStaticStrings();
std::ofstream out(filename.c_str());
SCOPE_EXIT { out.close(); };
for (auto item : list) {
out << formatStaticString(item);
if (RuntimeOption::EvalPerfDataMap) {
auto const len = std::min<size_t>(item->size(), 255);
std::string str(item->data(), len);
// Only print the first line (up to 255 characters). Since we want '\0' in
// the list of characters to avoid, we need to use the version of
// `find_first_of()' with explicit length.
auto cutOffPos = str.find_first_of("\r\n", 0, 3);
if (cutOffPos != std::string::npos) str.erase(cutOffPos);
Debug::DebugInfo::recordDataMap(item->mutableData(),
item->mutableData() + item->size(),
"Str-" + str);
}
}
return true;
} | 172 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::AdminRequestHandler::handleRequest | HPHP::AdminRequestHandler::handleRequest( Transport * transport) | ['transport'] | void AdminRequestHandler::handleRequest(Transport *transport) {
transport->addHeader("Content-Type", "text/plain");
std::string cmd = transport->getCommand();
do {
if (cmd == "" || cmd == "help") {
string usage =
"/stop: stop the web server\n"
" instance-id optional, if specified, instance ID has to match\n"
"/oom-kill: abort all requests whose memory usage exceed\n"
" Server.RequestMemoryOOMKillBytes\n"
"/free-mem: ask allocator to release unused memory to system\n"
"/prepare-to-stop: ask the server to prepare for stopping\n"
"/flush-profile: flush profiling counters (in -fprofile-gen builds)\n"
"/flush-logs: trigger batching log-writers to flush all content\n"
"/translate: translate hex encoded stacktrace in 'stack' param\n"
" stack required, stack trace to translate\n"
" build-id optional, if specified, build ID has to match\n"
" bare optional, whether to display frame ordinates\n"
"/build-id: returns build id that's passed in from command line"
"\n"
"/instance-id: instance id that's passed in from command line\n"
"/compiler-id: returns the compiler id that built this app\n"
"/config-id: returns the config id passed in from command line\n"
"/repo-schema: return the repo schema id used by this app\n"
"/ini-get-all: dump all settings as JSON\n"
"/check-load: how many threads are actively handling requests\n"
"/check-queued: how many http requests are queued waiting to be\n"
" handled\n"
"/check-health: return json containing basic load/usage stats\n"
"/check-ev: how many http requests are active by libevent\n"
"/check-pl-load: how many pagelet threads are actively handling\n"
" requests\n"
"/check-pl-queued: how many pagelet requests are queued waiting to\n"
" be handled\n"
"/check-sql: report SQL table statistics\n"
"/check-sat how many satellite threads are actively handling\n"
" requests and queued waiting to be handled\n"
"/status.xml: show server status in XML\n"
"/status.json: show server status in JSON\n"
"/status.html: show server status in HTML\n"
"/rqtrace-stats: show aggregate request trace stats in JSON\n"
"/memory.xml: show memory status in XML\n"
"/memory.json: show memory status in JSON\n"
"/memory.html: show memory status in HTML\n"
"/statcache-clear: clear the stat cache entries\n"
"/stats-on: main switch: enable server stats\n"
"/stats-off: main switch: disable server stats\n"
"/stats-clear: clear all server stats\n"
"/stats-web: turn on/off server page stats (CPU and gen time)\n"
"/stats-mem: turn on/off memory statistics\n"
"/stats-sql: turn on/off SQL statistics\n"
"/stats-mutex: turn on/off mutex statistics\n"
" sampling optional, default 1000\n"
"/stats.keys: list all available keys\n"
" from optional, <timestamp>, or <-n> second ago\n"
" to optional, <timestamp>, or <-n> second ago\n"
"/stats.kvp: show server stats in key-value pairs\n"
" from optional, <timestamp>, or <-n> second ago\n"
" to optional, <timestamp>, or <-n> second ago\n"
" agg optional, aggragation: *, url, code\n"
" keys optional, <key>,<key/hit>,<key/sec>,<:regex:>\n"
" url optional, only stats of this page or URL\n"
" code optional, only stats of pages returning this code\n"
"/xenon-snap: generate a Xenon snapshot, which is logged later\n"
"/hugepage: show stats about hugepage usage\n"
"/jit-des-info: show information about deserialized profile data\n"
"/const-ss: get const_map_size\n"
"/static-strings: get number of static strings\n"
"/static-strings-rds: ... that correspond to defined constants\n"
"/dump-static-strings: dump static strings to /tmp/static_strings\n"
"/random-static-strings: return randomly selected static strings\n"
" count number of strings to return, default 1\n"
"/dump-apc: dump all current value in APC to /tmp/apc_dump\n"
"/dump-apc-prefix: dump a key prefix contents from APC to\n"
" /tmp/apc_dump_prefix\n"
" prefix required, the prefix to dump\n"
" count optional, the number of keys to dump, default 1\n"
"/dump-apc-info: show basic APC stats\n"
"/dump-apc-meta: dump meta information for all objects in APC to\n"
" /tmp/apc_dump_meta\n"
"/advise-out-apc: forcibly madvise out APC prime data\n"
"/random-apc: dump the key and size of a random APC entry\n"
" count number of entries to return\n"
"/treadmill: dump treadmill information\n"
"/pcre-cache-size: get pcre cache map size\n"
"/dump-pcre-cache: dump cached pcre's to /tmp/pcre_cache\n"
"/dump-array-info: dump array tracer info to /tmp/array_tracer_dump\n"
"/invalidate-units: remove specified files from the unit cache\n"
" path absolute path of files to invalidate\n"
"/start-stacktrace-profiler: set enable_stacktrace_profiler to true\n"
"/relocate: relocate translations\n"
" random optional, default false, relocate random subset\n"
" all optional, default false, relocate all translations\n"
" time optional, default 20 (seconds)\n"
#ifdef HPHP_TRACE
"/trace-request: write trace for next request(s) to "
+ RuntimeOption::getTraceOutputFile() + "\n"
" spec module:level,... spec; see hphp/util/trace.h\n"
" count optional, total requests to trace (default: 1)\n"
" url optional, trace only if URL contains \'url\'\n"
#endif
#ifdef GOOGLE_CPU_PROFILER
"/prof-cpu-on: turn on CPU profiler\n"
"/prof-cpu-off: turn off CPU profiler\n"
#endif
#ifdef EXECUTION_PROFILER
"/prof-exe: returns sampled execution profile\n"
#endif
"/vm-tcspace: show space used by translator caches\n"
"/vm-tcaddr: show addresses of translation cache sections\n"
"/vm-dump-tc: dump translation cache to /tmp/tc_dump_a and\n"
" /tmp/tc_dump_astub\n"
"/vm-namedentities:show size of the NamedEntityTable\n"
"/proxy: set up request proxy\n"
" origin URL to proxy requests to\n"
" percentage percentage of requests to proxy\n"
"/load-factor: get or set load factor\n"
" set optional, set new load factor (default 1.0,\n"
" valid range [-1.0, 10.0])\n"
"/queue-discount: get/set how much we discount the queue-length \n"
" set optional, set discount value (default 0,\n"
" valid range [0, 10000])\n"
"/warmup-status: Describes state of JIT warmup.\n"
" Returns empty string if warmed up.\n"
;
#ifdef USE_TCMALLOC
if (MallocExtensionInstance) {
usage.append(
"/tcmalloc-stats: get internal tcmalloc stats\n"
"/tcmalloc-set-tc: set max mem tcmalloc thread-cache can use\n"
);
}
#endif
#ifdef USE_JEMALLOC
if (mallctl) {
usage.append(
"/jemalloc-stats: get internal jemalloc stats\n"
"/jemalloc-stats-print:\n"
" get comprehensive jemalloc stats in\n"
" human-readable form\n"
"/jemalloc-prof-activate:\n"
" activate heap profiling\n"
"/jemalloc-prof-deactivate:\n"
" deactivate heap profiling\n"
"/jemalloc-prof-dump:\n"
" dump heap profile\n"
" file optional, filesystem path\n"
"/jemalloc-prof-request:\n"
" dump thread-local heap profile in\n"
" the next request that runs\n"
" file optional, filesystem path\n"
);
#ifdef ENABLE_HHPROF
usage.append(
"/hhprof/start: start profiling\n"
" requestType \"all\" or \"next\"*\n"
" url profile next matching url for \"next\"\n"
" lgSample lg sample rate\n"
" profileType \"current\"* or \"cumulative\"\n"
"/hhprof/status: configuration and current dump status\n"
"/hhprof/stop: stop profiling\n"
"/pprof/cmdline: program command line\n"
"/pprof/heap: heap dump\n"
"/pprof/symbol: symbol lookup\n"
);
#endif // ENABLE_HHPROF
}
#endif // USE_JEMALLOC
AdminCommandExt::iterate([&](AdminCommandExt* ace) {
usage.append(ace->usage());
return false;
});
transport->sendString(usage);
break;
}
bool needs_password = (cmd != "build-id") && (cmd != "compiler-id") &&
(cmd != "instance-id") && (cmd != "flush-logs") &&
(cmd != "warmup-status") && (cmd != "config-id")
#if defined(ENABLE_HHPROF) && defined(USE_JEMALLOC)
&& (mallctl == nullptr || (
(cmd != "hhprof/start")
&& (cmd != "hhprof/status")
&& (cmd != "hhprof/stop")
&& (cmd != "pprof/cmdline")
&& (cmd != "pprof/heap")
&& (cmd != "pprof/symbol")))
#endif
;
// When configured, we allow read-only stats to be read without a password.
if (needs_password && !RuntimeOption::AdminServerStatsNeedPassword) {
if ((strncmp(cmd.c_str(), "memory.", 7) == 0) ||
(strncmp(cmd.c_str(), "stats.", 6) == 0) ||
(strncmp(cmd.c_str(), "check-", 6) == 0) ||
(strncmp(cmd.c_str(), "static-strings", 14) == 0) ||
cmd == "hugepage" || cmd == "pcre-cache-size" ||
cmd == "vm-tcspace" || cmd == "vm-tcaddr" ||
cmd == "vm-namedentities" || cmd == "jemalloc-stats") {
needs_password = false;
}
}
if (needs_password && !RuntimeOption::HashedAdminPasswords.empty()) {
bool matched = false;
#ifdef HAVE_CRYPTO_PWHASH_STR
const auto password = transport->getParam("auth");
for (const std::string& hash : RuntimeOption::HashedAdminPasswords) {
if (crypto_pwhash_str_verify(hash.data(),
password.data(),
password.size()) == 0) {
matched = true;
break;
}
}
#endif
if (!matched) {
transport->sendString("Unauthorized", 401);
break;
}
} else if (needs_password && !RuntimeOption::AdminPasswords.empty()) {
std::set<std::string>::const_iterator iter =
RuntimeOption::AdminPasswords.find(transport->getParam("auth"));
if (iter == RuntimeOption::AdminPasswords.end()) {
transport->sendString("Unauthorized", 401);
break;
}
} else {
if (needs_password && !RuntimeOption::AdminPassword.empty() &&
RuntimeOption::AdminPassword != transport->getParam("auth")) {
transport->sendString("Unauthorized", 401);
break;
}
}
if (cmd == "stop") {
string instanceId = transport->getParam("instance-id");
if (!instanceId.empty() && instanceId != RuntimeOption::InstanceId) {
transport->sendString("Instance ID doesn't match.", 500);
break;
}
transport->sendString("OK\n");
Logger::Info("Got admin port stop request from %s",
transport->getRemoteHost());
HttpServer::Server->stop();
break;
}
if (cmd == "oom-kill") {
Logger::Info("Invoking OOM killer upon admin port request from %s",
transport->getRemoteHost());
auto const server = HttpServer::Server->getPageServer();
RequestInfo::InvokeOOMKiller(server->getActiveWorker());
transport->sendString("OOM killer invoked");
break;
}
if (cmd == "free-mem") {
const auto before = Process::GetMemUsageMb();
std::string errStr;
if (purge_all(&errStr)) {
const auto after = Process::GetMemUsageMb();
transport->sendString(
folly::sformat("Purged {} -> {} MB RSS", before, after).c_str());
} else {
transport->sendString(errStr.c_str(), 500);
}
break;
}
if (cmd == "prepare-to-stop") {
Logger::Info("Got admin port prepare-to-stop request from %s",
transport->getRemoteHost());
MemInfo info, newInfo;
Process::GetMemoryInfo(info);
HttpServer::PrepareToStop();
// We may consider purge_all() here, too. But since requests
// are still coming in, it may not be very useful, and has some
// performance penalties.
// TODO: evaluate the effect of sync() and uncomment if
// desirable. It is blocking and can take some time, so do it
// in a separate thread.
// std::thread t{sync};
// t.detach();
transport->sendString("OK\n");
Process::GetMemoryInfo(newInfo);
Logger::FInfo("free/cached/buffer {}/{}/{} -> {}/{}/{}",
info.freeMb, info.cachedMb, info.buffersMb,
newInfo.freeMb, newInfo.cachedMb, newInfo.buffersMb);
break;
}
if (cmd == "flush-profile") {
HttpServer::ProfileFlush();
// send the response *after* flushing, so the caller knows the
// data has been updated.
transport->sendString("OK\n");
break;
}
if (cmd == "flush-logs") {
transport->sendString("OK\n");
Logger::FlushAll();
HttpRequestHandler::GetAccessLog().flushAllWriters();
AdminRequestHandler::GetAccessLog().flushAllWriters();
RPCRequestHandler::GetAccessLog().flushAllWriters();
break;
}
if (cmd == "set-log-level") {
string result("OK\n");
string level = transport->getParam("level");
if (level == "None") {
Logger::LogLevel = Logger::LogNone;
} else if (level == "Error") {
Logger::LogLevel = Logger::LogError;
} else if (level == "Warning") {
Logger::LogLevel = Logger::LogWarning;
} else if (level == "Info") {
Logger::LogLevel = Logger::LogInfo;
} else if (level == "Verbose") {
Logger::LogLevel = Logger::LogVerbose;
} else {
result = "Failed to set log level\n";
}
transport->sendString(result);
break;
}
#ifdef HPHP_TRACE
if (cmd == "trace-request") {
Trace::ensureInit(RuntimeOption::getTraceOutputFile());
// Just discard any existing task.
delete s_traceTask.exchange(
new TraceTask{transport->getParam("spec"),
transport->getParam("url"),
std::max(transport->getInt64Param("count"), 1ll)},
std::memory_order_acq_rel);
transport->sendString("OK\n");
break;
}
#endif
if (cmd == "build-id") {
transport->sendString(RuntimeOption::BuildId, 200);
break;
}
if (cmd == "instance-id") {
transport->sendString(RuntimeOption::InstanceId, 200);
break;
}
if (cmd == "compiler-id") {
transport->sendString(compilerId().begin(), 200);
break;
}
if (cmd == "config-id") {
transport->sendString(std::to_string(RuntimeOption::ConfigId), 200);
break;
}
if (cmd == "repo-schema") {
transport->sendString(repoSchemaId().begin(), 200);
break;
}
if (cmd == "translate") {
string buildId = transport->getParam("build-id");
if (!buildId.empty() && buildId != RuntimeOption::BuildId) {
transport->sendString("Build ID doesn't match.", 500);
break;
}
string translated = translate_stack(transport->getParam("stack").c_str(),
transport->getParam("bare").empty());
transport->sendString(translated);
break;
}
if (strncmp(cmd.c_str(), "check", 5) == 0 &&
handleCheckRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "status", 6) == 0 &&
handleStatusRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(),"memory", 6) == 0 &&
handleMemoryRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "stats", 5) == 0 &&
handleStatsRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "prof", 4) == 0 &&
handleProfileRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "dump-apc", 8) == 0 &&
handleDumpCacheRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "invalidate-units", 16) == 0 &&
handleInvalidateUnitRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "xenon-snap", 10) == 0) {
static int64_t s_lastSampleTime = 0;
auto const current = TimeStamp::Current();
if (current > s_lastSampleTime) {
s_lastSampleTime = current;
Xenon::getInstance().surpriseAll();
}
transport->sendString("a Xenon sample will be collected\n", 200);
break;
}
if (strncmp(cmd.c_str(), "hugepage", 9) == 0) {
#if USE_JEMALLOC_EXTENT_HOOKS
std::string msg =
folly::sformat("{} 1G huge pages active\n", num_1g_pages());
if (auto a = alloc::lowArena()) {
msg += a->reportStats();
}
if (auto a = alloc::highArena()) {
msg += a->reportStats();
}
transport->sendString(msg, 200);
#else
transport->sendString("", 200);
#endif
break;
}
if (strncmp(cmd.c_str(), "jit-des-info", 13) == 0) {
if (!jit::ProfData::wasDeserialized()) {
transport->sendString("", 200);
break;
}
auto msg = folly::sformat("{}:{}",
jit::ProfData::buildHost()->slice(),
jit::ProfData::buildTime());
transport->sendString(msg, 200);
}
if (strncmp(cmd.c_str(), "const-ss", 8) == 0 &&
handleConstSizeRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "static-strings", 14) == 0 &&
handleStaticStringsRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "dump-static-strings", 19) == 0) {
auto filename = transport->getParam("file");
if (filename == "") filename = "/tmp/static_strings";
handleDumpStaticStringsRequest(cmd, filename);
transport->sendString("OK\n");
break;
}
if (strncmp(cmd.c_str(), "random-static-strings", 21) == 0) {
handleRandomStaticStringsRequest(cmd, transport);
break;
}
if (strncmp(cmd.c_str(), "vm-", 3) == 0 &&
handleVMRequest(cmd, transport)) {
break;
}
if (cmd == "proxy") {
handleProxyRequest(cmd, transport);
break;
}
if (cmd == "statcache-clear") {
StatCache::clearCache();
break;
}
if (cmd == "pcre-cache-size") {
std::ostringstream size;
size << preg_pcre_cache_size() << endl;
transport->sendString(size.str());
break;
}
if (cmd == "dump-pcre-cache") {
auto filename = transport->getParam("file");
if (filename == "") filename = "/tmp/pcre_cache";
pcre_dump_cache(filename);
transport->sendString("OK\n");
break;
}
if (cmd == "start-stacktrace-profiler") {
enable_stacktrace_profiler = true;
transport->sendString("OK\n");
break;
}
if (cmd == "warmup-status") {
transport->sendString(jit::tc::warmupStatusString());
break;
}
if (cmd == "advise-out-apc") {
if (!apcExtension::Enable) {
transport->sendString("No APC\n");
break;
}
apc_advise_out();
transport->sendString("Done\n");
break;
}
if (strncmp(cmd.c_str(), "random-apc", 10) == 0 &&
handleRandomApcRequest(cmd, transport)) {
break;
}
if (cmd == "treadmill") {
transport->sendString(Treadmill::dumpTreadmillInfo());
break;
}
if (cmd == "load-factor") {
auto const factorStr = transport->getParam("set");
if (factorStr.empty()) {
std::ostringstream oss;
oss << std::fixed << std::setprecision(3)
<< HttpServer::LoadFactor.load();
transport->sendString(oss.str());
break;
}
double factor = 1.0;
if (sscanf(factorStr.c_str(), "%lf", &factor) < 1 ||
factor > 10 || factor < -1) {
transport->sendString("Invalid load factor spec: " + factorStr, 400);
break;
}
HttpServer::LoadFactor.store(factor, std::memory_order_relaxed);
transport->sendString(folly::sformat("Load factor updated to {}\n",
factor));
Logger::Info("Load factor updated to %lf", factor);
break;
}
if (cmd == "queue-discount") {
auto const discountStr = transport->getParam("set");
if (discountStr.empty()) {
transport->sendString(folly::to<string>(
HttpServer::QueueDiscount.load(std::memory_order_relaxed)));
break;
}
int queue_discount = 0;
if (sscanf(discountStr.c_str(), "%d", &queue_discount) < 1 ||
queue_discount > 10000 || queue_discount < 0) {
transport->sendString("Invalid queue discount spec: " +
discountStr, 400);
break;
}
HttpServer::QueueDiscount.store(queue_discount,
std::memory_order_relaxed);
transport->sendString(folly::sformat("Queue Discount updated to {}\n",
queue_discount));
Logger::Info("Queue Discount updated to %d", queue_discount);
break;
}
if (cmd == "ini-get-all") {
auto out = IniSetting::GetAllAsJSON();
transport->sendString(out.c_str());
break;
}
if (cmd == "numa-info") {
std::ostringstream out;
#ifdef HAVE_NUMA
out << "use_numa: " << use_numa << endl;
out << "numa_num_nodes: " << numa_num_nodes << endl;
out << "numa_node_mask: " << numa_node_mask << endl;
out << "numa_node_set: " << numa_node_set << endl;
#else
out << "HAVE_NUMA not defined" << endl;
#endif
transport->sendString(out.str());
break;
}
#ifdef USE_JEMALLOC
assertx(mallctlnametomib && mallctlbymib);
if (cmd == "jemalloc-stats") {
// jemalloc stats update is periodically triggered in the
// host-health-monitor thread.
uint32_t error = 0;
auto call_mallctl = [&](const char* statName) {
size_t value = 0;
if (mallctlRead<size_t, true>(statName, &value) != 0) {
error = 1;
}
return value;
};
size_t allocated = call_mallctl("stats.allocated");
size_t active = call_mallctl("stats.active");
size_t mapped = call_mallctl("stats.mapped");
#if USE_JEMALLOC_EXTENT_HOOKS
size_t low_mapped = 0;
// The low range [1G, 4G) is divided into two ranges, and shared by 3
// arenas.
low_mapped += alloc::getRange(alloc::AddrRangeClass::VeryLow).used();
low_mapped += alloc::getRange(alloc::AddrRangeClass::Low).used();
#else
size_t low_mapped = call_mallctl(
folly::sformat("stats.arenas.{}.mapped",
low_arena).c_str());
#endif
std::ostringstream stats;
stats << "<jemalloc-stats>" << endl;
stats << " <allocated>" << allocated << "</allocated>" << endl;
stats << " <active>" << active << "</active>" << endl;
stats << " <mapped>" << mapped << "</mapped>" << endl;
stats << " <low_mapped>" << low_mapped << "</low_mapped>" << endl;
stats << "</jemalloc-stats>" << endl;
transport->sendString(stats.str());
break;
}
if (cmd == "jemalloc-stats-print") {
malloc_write mwo;
malloc_write_init(&mwo);
malloc_stats_print(malloc_write_cb, (void *)&mwo, "");
if (mwo.oom) {
malloc_write_fini(&mwo);
transport->sendString("OOM\n");
break;
}
transport->sendString(mwo.s == nullptr ? "" : mwo.s);
malloc_write_fini(&mwo);
break;
}
if (cmd == "jemalloc-prof-activate") {
if (jemalloc_pprof_enable()) {
transport->sendString("Error in mallctl(\"prof.active\", true)\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-deactivate") {
if (jemalloc_pprof_disable()) {
transport->sendString("Error in mallctl(\"prof.active\", false)\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-dump") {
string f = transport->getParam("file");
if (jemalloc_pprof_dump(f, true)) {
transport->sendString("Error in mallctl(\"prof.dump\", " + f + ")\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-request") {
auto f = transport->getParam("file");
bool success = MemoryManager::triggerProfiling(f);
if (success) {
transport->sendString("OK\n");
} else {
transport->sendString("Request profiling already triggered\n");
}
break;
}
#ifdef ENABLE_HHPROF
if (cmd == "hhprof/start") {
HHProf::HandleHHProfStart(transport);
break;
}
if (cmd == "hhprof/status") {
HHProf::HandleHHProfStatus(transport);
break;
}
if (cmd == "hhprof/stop") {
HHProf::HandleHHProfStop(transport);
break;
}
if (cmd == "pprof/cmdline") {
HHProf::HandlePProfCmdline(transport);
break;
}
if (cmd == "pprof/heap") {
HHProf::HandlePProfHeap(transport);
break;
}
if (cmd == "pprof/symbol") {
HHProf::HandlePProfSymbol(transport);
break;
}
#endif // ENABLE_HHPROF
#endif // USE_JEMALLOC
if (cmd == "rqtrace-stats") {
std::stringstream out;
bool first = true;
out << "{" << endl;
auto appendStat =
[&](folly::StringPiece name, folly::StringPiece kind, int64_t value) {
out << folly::format(
"{} \"{}_{}\":{}\n", first ? "" : ",", name, kind, value);
first = false;
};
rqtrace::visit_process_stats(
[&] (const StringData* name, rqtrace::EventStats stats) {
appendStat(name->data(), "duration", stats.total_duration);
appendStat(name->data(), "count", stats.total_count);
}
);
out << "}" << endl;
transport->sendString(out.str());
break;
}
if (AdminCommandExt::iterate([&](AdminCommandExt* ace) {
return ace->handleRequest(transport);
})) {
break;
}
transport->sendString("Unknown command: " + cmd + "\n", 404);
} while (0);
transport->onSendEnd();
} | 3483 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::AdminRequestHandler::handleRequest | HPHP::AdminRequestHandler::handleRequest( Transport * transport) | ['transport'] | void AdminRequestHandler::handleRequest(Transport *transport) {
transport->addHeader("Content-Type", "text/plain");
std::string cmd = transport->getCommand();
do {
if (cmd == "" || cmd == "help") {
string usage =
"/stop: stop the web server\n"
" instance-id optional, if specified, instance ID has to match\n"
"/oom-kill: abort all requests whose memory usage exceed\n"
" Server.RequestMemoryOOMKillBytes\n"
"/free-mem: ask allocator to release unused memory to system\n"
"/prepare-to-stop: ask the server to prepare for stopping\n"
"/flush-profile: flush profiling counters (in -fprofile-gen builds)\n"
"/flush-logs: trigger batching log-writers to flush all content\n"
"/translate: translate hex encoded stacktrace in 'stack' param\n"
" stack required, stack trace to translate\n"
" build-id optional, if specified, build ID has to match\n"
" bare optional, whether to display frame ordinates\n"
"/build-id: returns build id that's passed in from command line"
"\n"
"/instance-id: instance id that's passed in from command line\n"
"/compiler-id: returns the compiler id that built this app\n"
"/config-id: returns the config id passed in from command line\n"
"/repo-schema: return the repo schema id used by this app\n"
"/ini-get-all: dump all settings as JSON\n"
"/check-load: how many threads are actively handling requests\n"
"/check-queued: how many http requests are queued waiting to be\n"
" handled\n"
"/check-health: return json containing basic load/usage stats\n"
"/check-ev: how many http requests are active by libevent\n"
"/check-pl-load: how many pagelet threads are actively handling\n"
" requests\n"
"/check-pl-queued: how many pagelet requests are queued waiting to\n"
" be handled\n"
"/check-sql: report SQL table statistics\n"
"/check-sat how many satellite threads are actively handling\n"
" requests and queued waiting to be handled\n"
"/status.xml: show server status in XML\n"
"/status.json: show server status in JSON\n"
"/status.html: show server status in HTML\n"
"/rqtrace-stats: show aggregate request trace stats in JSON\n"
"/memory.xml: show memory status in XML\n"
"/memory.json: show memory status in JSON\n"
"/memory.html: show memory status in HTML\n"
"/statcache-clear: clear the stat cache entries\n"
"/stats-on: main switch: enable server stats\n"
"/stats-off: main switch: disable server stats\n"
"/stats-clear: clear all server stats\n"
"/stats-web: turn on/off server page stats (CPU and gen time)\n"
"/stats-mem: turn on/off memory statistics\n"
"/stats-sql: turn on/off SQL statistics\n"
"/stats-mutex: turn on/off mutex statistics\n"
" sampling optional, default 1000\n"
"/stats.keys: list all available keys\n"
" from optional, <timestamp>, or <-n> second ago\n"
" to optional, <timestamp>, or <-n> second ago\n"
"/stats.kvp: show server stats in key-value pairs\n"
" from optional, <timestamp>, or <-n> second ago\n"
" to optional, <timestamp>, or <-n> second ago\n"
" agg optional, aggragation: *, url, code\n"
" keys optional, <key>,<key/hit>,<key/sec>,<:regex:>\n"
" url optional, only stats of this page or URL\n"
" code optional, only stats of pages returning this code\n"
"/xenon-snap: generate a Xenon snapshot, which is logged later\n"
"/hugepage: show stats about hugepage usage\n"
"/jit-des-info: show information about deserialized profile data\n"
"/const-ss: get const_map_size\n"
"/static-strings: get number of static strings\n"
"/static-strings-rds: ... that correspond to defined constants\n"
"/dump-static-strings: dump static strings to /tmp/static_strings\n"
"/random-static-strings: return randomly selected static strings\n"
" count number of strings to return, default 1\n"
"/dump-apc: dump all current value in APC to /tmp/apc_dump\n"
"/dump-apc-prefix: dump a key prefix contents from APC to\n"
" /tmp/apc_dump_prefix\n"
" prefix required, the prefix to dump\n"
" count optional, the number of keys to dump, default 1\n"
"/dump-apc-info: show basic APC stats\n"
"/dump-apc-meta: dump meta information for all objects in APC to\n"
" /tmp/apc_dump_meta\n"
"/advise-out-apc: forcibly madvise out APC prime data\n"
"/random-apc: dump the key and size of a random APC entry\n"
" count number of entries to return\n"
"/treadmill: dump treadmill information\n"
"/pcre-cache-size: get pcre cache map size\n"
"/dump-pcre-cache: dump cached pcre's to /tmp/pcre_cache\n"
"/dump-array-info: dump array tracer info to /tmp/array_tracer_dump\n"
"/invalidate-units: remove specified files from the unit cache\n"
" path absolute path of files to invalidate\n"
"/start-stacktrace-profiler: set enable_stacktrace_profiler to true\n"
"/relocate: relocate translations\n"
" random optional, default false, relocate random subset\n"
" all optional, default false, relocate all translations\n"
" time optional, default 20 (seconds)\n"
#ifdef HPHP_TRACE
"/trace-request: write trace for next request(s) to "
+ RuntimeOption::getTraceOutputFile() + "\n"
" spec module:level,... spec; see hphp/util/trace.h\n"
" count optional, total requests to trace (default: 1)\n"
" url optional, trace only if URL contains \'url\'\n"
#endif
#ifdef GOOGLE_CPU_PROFILER
"/prof-cpu-on: turn on CPU profiler\n"
"/prof-cpu-off: turn off CPU profiler\n"
#endif
#ifdef EXECUTION_PROFILER
"/prof-exe: returns sampled execution profile\n"
#endif
"/vm-tcspace: show space used by translator caches\n"
"/vm-tcaddr: show addresses of translation cache sections\n"
"/vm-dump-tc: dump translation cache to /tmp/tc_dump_a and\n"
" /tmp/tc_dump_astub\n"
"/vm-namedentities:show size of the NamedEntityTable\n"
"/proxy: set up request proxy\n"
" origin URL to proxy requests to\n"
" percentage percentage of requests to proxy\n"
"/load-factor: get or set load factor\n"
" set optional, set new load factor (default 1.0,\n"
" valid range [-1.0, 10.0])\n"
"/queue-discount: get/set how much we discount the queue-length \n"
" set optional, set discount value (default 0,\n"
" valid range [0, 10000])\n"
"/warmup-status: Describes state of JIT warmup.\n"
" Returns empty string if warmed up.\n"
;
#ifdef USE_TCMALLOC
if (MallocExtensionInstance) {
usage.append(
"/tcmalloc-stats: get internal tcmalloc stats\n"
"/tcmalloc-set-tc: set max mem tcmalloc thread-cache can use\n"
);
}
#endif
#ifdef USE_JEMALLOC
if (mallctl) {
usage.append(
"/jemalloc-stats: get internal jemalloc stats\n"
"/jemalloc-stats-print:\n"
" get comprehensive jemalloc stats in\n"
" human-readable form\n"
"/jemalloc-prof-activate:\n"
" activate heap profiling\n"
"/jemalloc-prof-deactivate:\n"
" deactivate heap profiling\n"
"/jemalloc-prof-dump:\n"
" dump heap profile\n"
" file optional, filesystem path\n"
"/jemalloc-prof-request:\n"
" dump thread-local heap profile in\n"
" the next request that runs\n"
" file optional, filesystem path\n"
);
#ifdef ENABLE_HHPROF
usage.append(
"/hhprof/start: start profiling\n"
" requestType \"all\" or \"next\"*\n"
" url profile next matching url for \"next\"\n"
" lgSample lg sample rate\n"
" profileType \"current\"* or \"cumulative\"\n"
"/hhprof/status: configuration and current dump status\n"
"/hhprof/stop: stop profiling\n"
"/pprof/cmdline: program command line\n"
"/pprof/heap: heap dump\n"
"/pprof/symbol: symbol lookup\n"
);
#endif // ENABLE_HHPROF
}
#endif // USE_JEMALLOC
AdminCommandExt::iterate([&](AdminCommandExt* ace) {
usage.append(ace->usage());
return false;
});
transport->sendString(usage);
break;
}
bool needs_password = (cmd != "build-id") && (cmd != "compiler-id") &&
(cmd != "instance-id") && (cmd != "flush-logs") &&
(cmd != "warmup-status") && (cmd != "config-id")
#if defined(ENABLE_HHPROF) && defined(USE_JEMALLOC)
&& (mallctl == nullptr || (
(cmd != "hhprof/start")
&& (cmd != "hhprof/status")
&& (cmd != "hhprof/stop")
&& (cmd != "pprof/cmdline")
&& (cmd != "pprof/heap")
&& (cmd != "pprof/symbol")))
#endif
;
// When configured, we allow read-only stats to be read without a password.
if (needs_password && !RuntimeOption::AdminServerStatsNeedPassword) {
if ((strncmp(cmd.c_str(), "memory.", 7) == 0) ||
(strncmp(cmd.c_str(), "stats.", 6) == 0) ||
(strncmp(cmd.c_str(), "check-", 6) == 0) ||
(strncmp(cmd.c_str(), "static-strings", 14) == 0) ||
cmd == "hugepage" || cmd == "pcre-cache-size" ||
cmd == "vm-tcspace" || cmd == "vm-tcaddr" ||
cmd == "vm-namedentities" || cmd == "jemalloc-stats") {
needs_password = false;
}
}
if (needs_password && !RuntimeOption::HashedAdminPasswords.empty()) {
bool matched = false;
#ifdef HAVE_CRYPTO_PWHASH_STR
const auto password = transport->getParam("auth");
for (const std::string& hash : RuntimeOption::HashedAdminPasswords) {
if (crypto_pwhash_str_verify(hash.data(),
password.data(),
password.size()) == 0) {
matched = true;
break;
}
}
#endif
if (!matched) {
transport->sendString("Unauthorized", 401);
break;
}
} else if (needs_password && !RuntimeOption::AdminPasswords.empty()) {
std::set<std::string>::const_iterator iter =
RuntimeOption::AdminPasswords.find(transport->getParam("auth"));
if (iter == RuntimeOption::AdminPasswords.end()) {
transport->sendString("Unauthorized", 401);
break;
}
} else {
if (needs_password && !RuntimeOption::AdminPassword.empty() &&
RuntimeOption::AdminPassword != transport->getParam("auth")) {
transport->sendString("Unauthorized", 401);
break;
}
}
if (cmd == "stop") {
string instanceId = transport->getParam("instance-id");
if (!instanceId.empty() && instanceId != RuntimeOption::InstanceId) {
transport->sendString("Instance ID doesn't match.", 500);
break;
}
transport->sendString("OK\n");
Logger::Info("Got admin port stop request from %s",
transport->getRemoteHost());
HttpServer::Server->stop();
break;
}
if (cmd == "oom-kill") {
Logger::Info("Invoking OOM killer upon admin port request from %s",
transport->getRemoteHost());
auto const server = HttpServer::Server->getPageServer();
RequestInfo::InvokeOOMKiller(server->getActiveWorker());
transport->sendString("OOM killer invoked");
break;
}
if (cmd == "free-mem") {
const auto before = Process::GetMemUsageMb();
std::string errStr;
if (purge_all(&errStr)) {
const auto after = Process::GetMemUsageMb();
transport->sendString(
folly::sformat("Purged {} -> {} MB RSS", before, after).c_str());
} else {
transport->sendString(errStr.c_str(), 500);
}
break;
}
if (cmd == "prepare-to-stop") {
Logger::Info("Got admin port prepare-to-stop request from %s",
transport->getRemoteHost());
MemInfo info, newInfo;
Process::GetMemoryInfo(info);
HttpServer::PrepareToStop();
// We may consider purge_all() here, too. But since requests
// are still coming in, it may not be very useful, and has some
// performance penalties.
// TODO: evaluate the effect of sync() and uncomment if
// desirable. It is blocking and can take some time, so do it
// in a separate thread.
// std::thread t{sync};
// t.detach();
transport->sendString("OK\n");
Process::GetMemoryInfo(newInfo);
Logger::FInfo("free/cached/buffer {}/{}/{} -> {}/{}/{}",
info.freeMb, info.cachedMb, info.buffersMb,
newInfo.freeMb, newInfo.cachedMb, newInfo.buffersMb);
break;
}
if (cmd == "flush-profile") {
HttpServer::ProfileFlush();
// send the response *after* flushing, so the caller knows the
// data has been updated.
transport->sendString("OK\n");
break;
}
if (cmd == "flush-logs") {
transport->sendString("OK\n");
Logger::FlushAll();
HttpRequestHandler::GetAccessLog().flushAllWriters();
AdminRequestHandler::GetAccessLog().flushAllWriters();
RPCRequestHandler::GetAccessLog().flushAllWriters();
break;
}
if (cmd == "set-log-level") {
string result("OK\n");
string level = transport->getParam("level");
if (level == "None") {
Logger::LogLevel = Logger::LogNone;
} else if (level == "Error") {
Logger::LogLevel = Logger::LogError;
} else if (level == "Warning") {
Logger::LogLevel = Logger::LogWarning;
} else if (level == "Info") {
Logger::LogLevel = Logger::LogInfo;
} else if (level == "Verbose") {
Logger::LogLevel = Logger::LogVerbose;
} else {
result = "Failed to set log level\n";
}
transport->sendString(result);
break;
}
#ifdef HPHP_TRACE
if (cmd == "trace-request") {
Trace::ensureInit(RuntimeOption::getTraceOutputFile());
// Just discard any existing task.
delete s_traceTask.exchange(
new TraceTask{transport->getParam("spec"),
transport->getParam("url"),
std::max(transport->getInt64Param("count"), 1ll)},
std::memory_order_acq_rel);
transport->sendString("OK\n");
break;
}
#endif
if (cmd == "build-id") {
transport->sendString(RuntimeOption::BuildId, 200);
break;
}
if (cmd == "instance-id") {
transport->sendString(RuntimeOption::InstanceId, 200);
break;
}
if (cmd == "compiler-id") {
transport->sendString(compilerId().begin(), 200);
break;
}
if (cmd == "config-id") {
transport->sendString(std::to_string(RuntimeOption::ConfigId), 200);
break;
}
if (cmd == "repo-schema") {
transport->sendString(repoSchemaId().begin(), 200);
break;
}
if (cmd == "translate") {
string buildId = transport->getParam("build-id");
if (!buildId.empty() && buildId != RuntimeOption::BuildId) {
transport->sendString("Build ID doesn't match.", 500);
break;
}
string translated = translate_stack(transport->getParam("stack").c_str(),
transport->getParam("bare").empty());
transport->sendString(translated);
break;
}
if (strncmp(cmd.c_str(), "check", 5) == 0 &&
handleCheckRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "status", 6) == 0 &&
handleStatusRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(),"memory", 6) == 0 &&
handleMemoryRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "stats", 5) == 0 &&
handleStatsRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "prof", 4) == 0 &&
handleProfileRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "dump-apc", 8) == 0 &&
handleDumpCacheRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "invalidate-units", 16) == 0 &&
handleInvalidateUnitRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "xenon-snap", 10) == 0) {
static int64_t s_lastSampleTime = 0;
auto const current = TimeStamp::Current();
if (current > s_lastSampleTime) {
s_lastSampleTime = current;
Xenon::getInstance().surpriseAll();
}
transport->sendString("a Xenon sample will be collected\n", 200);
break;
}
if (strncmp(cmd.c_str(), "hugepage", 9) == 0) {
#if USE_JEMALLOC_EXTENT_HOOKS
std::string msg =
folly::sformat("{} 1G huge pages active\n", num_1g_pages());
if (auto a = alloc::lowArena()) {
msg += a->reportStats();
}
if (auto a = alloc::highArena()) {
msg += a->reportStats();
}
transport->sendString(msg, 200);
#else
transport->sendString("", 200);
#endif
break;
}
if (strncmp(cmd.c_str(), "jit-des-info", 13) == 0) {
if (!jit::ProfData::wasDeserialized()) {
transport->sendString("", 200);
break;
}
auto msg = folly::sformat("{}:{}",
jit::ProfData::buildHost()->slice(),
jit::ProfData::buildTime());
transport->sendString(msg, 200);
}
if (strncmp(cmd.c_str(), "const-ss", 8) == 0 &&
handleConstSizeRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "static-strings", 14) == 0 &&
handleStaticStringsRequest(cmd, transport)) {
break;
}
if (strncmp(cmd.c_str(), "dump-static-strings", 19) == 0) {
auto filename = transport->getParam("file");
if (filename == "") filename = "/tmp/static_strings";
handleDumpStaticStringsRequest(cmd, filename);
transport->sendString("OK\n");
break;
}
if (strncmp(cmd.c_str(), "random-static-strings", 21) == 0) {
handleRandomStaticStringsRequest(cmd, transport);
break;
}
if (strncmp(cmd.c_str(), "vm-", 3) == 0 &&
handleVMRequest(cmd, transport)) {
break;
}
if (cmd == "proxy") {
handleProxyRequest(cmd, transport);
break;
}
if (cmd == "statcache-clear") {
StatCache::clearCache();
break;
}
if (cmd == "pcre-cache-size") {
std::ostringstream size;
size << preg_pcre_cache_size() << endl;
transport->sendString(size.str());
break;
}
if (cmd == "dump-pcre-cache") {
auto filename = transport->getParam("file");
if (filename == "") filename = "/tmp/pcre_cache";
pcre_dump_cache(filename);
transport->sendString("OK\n");
break;
}
if (cmd == "start-stacktrace-profiler") {
enable_stacktrace_profiler = true;
transport->sendString("OK\n");
break;
}
if (cmd == "warmup-status") {
transport->sendString(jit::tc::warmupStatusString());
break;
}
if (cmd == "advise-out-apc") {
if (!apcExtension::Enable) {
transport->sendString("No APC\n");
break;
}
apc_advise_out();
transport->sendString("Done\n");
break;
}
if (strncmp(cmd.c_str(), "random-apc", 10) == 0 &&
handleRandomApcRequest(cmd, transport)) {
break;
}
if (cmd == "treadmill") {
transport->sendString(Treadmill::dumpTreadmillInfo());
break;
}
if (cmd == "load-factor") {
auto const factorStr = transport->getParam("set");
if (factorStr.empty()) {
std::ostringstream oss;
oss << std::fixed << std::setprecision(3)
<< HttpServer::LoadFactor.load();
transport->sendString(oss.str());
break;
}
double factor = 1.0;
if (sscanf(factorStr.c_str(), "%lf", &factor) < 1 ||
factor > 10 || factor < -1) {
transport->sendString("Invalid load factor spec: " + factorStr, 400);
break;
}
HttpServer::LoadFactor.store(factor, std::memory_order_relaxed);
transport->sendString(folly::sformat("Load factor updated to {}\n",
factor));
Logger::Info("Load factor updated to %lf", factor);
break;
}
if (cmd == "queue-discount") {
auto const discountStr = transport->getParam("set");
if (discountStr.empty()) {
transport->sendString(folly::to<string>(
HttpServer::QueueDiscount.load(std::memory_order_relaxed)));
break;
}
int queue_discount = 0;
if (sscanf(discountStr.c_str(), "%d", &queue_discount) < 1 ||
queue_discount > 10000 || queue_discount < 0) {
transport->sendString("Invalid queue discount spec: " +
discountStr, 400);
break;
}
HttpServer::QueueDiscount.store(queue_discount,
std::memory_order_relaxed);
transport->sendString(folly::sformat("Queue Discount updated to {}\n",
queue_discount));
Logger::Info("Queue Discount updated to %d", queue_discount);
break;
}
if (cmd == "ini-get-all") {
auto out = IniSetting::GetAllAsJSON();
transport->sendString(out.c_str());
break;
}
if (cmd == "numa-info") {
std::ostringstream out;
#ifdef HAVE_NUMA
out << "use_numa: " << use_numa << endl;
out << "numa_num_nodes: " << numa_num_nodes << endl;
out << "numa_node_mask: " << numa_node_mask << endl;
out << "numa_node_set: " << numa_node_set << endl;
#else
out << "HAVE_NUMA not defined" << endl;
#endif
transport->sendString(out.str());
break;
}
#ifdef USE_JEMALLOC
assertx(mallctlnametomib && mallctlbymib);
if (cmd == "jemalloc-stats") {
// jemalloc stats update is periodically triggered in the
// host-health-monitor thread.
uint32_t error = 0;
auto call_mallctl = [&](const char* statName) {
size_t value = 0;
if (mallctlRead<size_t, true>(statName, &value) != 0) {
error = 1;
}
return value;
};
size_t allocated = call_mallctl("stats.allocated");
size_t active = call_mallctl("stats.active");
size_t mapped = call_mallctl("stats.mapped");
#if USE_JEMALLOC_EXTENT_HOOKS
size_t low_mapped = 0;
// The low range [1G, 4G) is divided into two ranges, and shared by 3
// arenas.
low_mapped += alloc::getRange(alloc::AddrRangeClass::VeryLow).used();
low_mapped += alloc::getRange(alloc::AddrRangeClass::Low).used();
#else
size_t low_mapped = call_mallctl(
folly::sformat("stats.arenas.{}.mapped",
low_arena).c_str());
#endif
std::ostringstream stats;
stats << "<jemalloc-stats>" << endl;
stats << " <allocated>" << allocated << "</allocated>" << endl;
stats << " <active>" << active << "</active>" << endl;
stats << " <mapped>" << mapped << "</mapped>" << endl;
stats << " <low_mapped>" << low_mapped << "</low_mapped>" << endl;
stats << "</jemalloc-stats>" << endl;
transport->sendString(stats.str());
break;
}
if (cmd == "jemalloc-stats-print") {
malloc_write mwo;
malloc_write_init(&mwo);
malloc_stats_print(malloc_write_cb, (void *)&mwo, "");
if (mwo.oom) {
malloc_write_fini(&mwo);
transport->sendString("OOM\n");
break;
}
transport->sendString(mwo.s == nullptr ? "" : mwo.s);
malloc_write_fini(&mwo);
break;
}
if (cmd == "jemalloc-prof-activate") {
if (jemalloc_pprof_enable()) {
transport->sendString("Error in mallctl(\"prof.active\", true)\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-deactivate") {
if (jemalloc_pprof_disable()) {
transport->sendString("Error in mallctl(\"prof.active\", false)\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-dump") {
string f = transport->getParam("file");
if (jemalloc_pprof_dump(f, true)) {
transport->sendString("Error in mallctl(\"prof.dump\", " + f + ")\n");
} else {
transport->sendString("OK\n");
}
break;
}
if (cmd == "jemalloc-prof-request") {
auto f = transport->getParam("file");
bool success = MemoryManager::triggerProfiling(f);
if (success) {
transport->sendString("OK\n");
} else {
transport->sendString("Request profiling already triggered\n");
}
break;
}
#ifdef ENABLE_HHPROF
if (cmd == "hhprof/start") {
HHProf::HandleHHProfStart(transport);
break;
}
if (cmd == "hhprof/status") {
HHProf::HandleHHProfStatus(transport);
break;
}
if (cmd == "hhprof/stop") {
HHProf::HandleHHProfStop(transport);
break;
}
if (cmd == "pprof/cmdline") {
HHProf::HandlePProfCmdline(transport);
break;
}
if (cmd == "pprof/heap") {
HHProf::HandlePProfHeap(transport);
break;
}
if (cmd == "pprof/symbol") {
HHProf::HandlePProfSymbol(transport);
break;
}
#endif // ENABLE_HHPROF
#endif // USE_JEMALLOC
if (cmd == "rqtrace-stats") {
std::stringstream out;
bool first = true;
out << "{" << endl;
auto appendStat =
[&](folly::StringPiece name, folly::StringPiece kind, int64_t value) {
out << folly::format(
"{} \"{}_{}\":{}\n", first ? "" : ",", name, kind, value);
first = false;
};
rqtrace::visit_process_stats(
[&] (const StringData* name, rqtrace::EventStats stats) {
appendStat(name->data(), "duration", stats.total_duration);
appendStat(name->data(), "count", stats.total_count);
}
);
out << "}" << endl;
transport->sendString(out.str());
break;
}
if (AdminCommandExt::iterate([&](AdminCommandExt* ace) {
return ace->handleRequest(transport);
})) {
break;
}
transport->sendString("Unknown command: " + cmd + "\n", 404);
} while (0);
transport->onSendEnd();
} | 3483 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::do_change_user | HPHP::do_change_user( int afdt_fd) | ['afdt_fd'] | void do_change_user(int afdt_fd) {
std::string uname;
lwp_read(afdt_fd, uname);
if (!uname.length()) return;
auto buf = PasswdBuffer{};
struct passwd *pw;
if (getpwnam_r(uname.c_str(), &buf.ent, buf.data.get(), buf.size, &pw)) {
// TODO(alexeyt) should we log something and/or fail to start?
return;
}
if (!pw) {
// TODO(alexeyt) should we log something and/or fail to start?
return;
}
if (pw->pw_gid) {
initgroups(pw->pw_name, pw->pw_gid);
setgid(pw->pw_gid);
}
if (pw->pw_uid) {
setuid(pw->pw_uid);
}
} | 127 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::do_change_user | HPHP::do_change_user( int afdt_fd) | ['afdt_fd'] | void do_change_user(int afdt_fd) {
std::string uname;
lwp_read(afdt_fd, uname);
if (!uname.length()) return;
auto buf = PasswdBuffer{};
struct passwd *pw;
if (getpwnam_r(uname.c_str(), &buf.ent, buf.data.get(), buf.size, &pw)) {
// TODO(alexeyt) should we log something and/or fail to start?
return;
}
if (!pw) {
// TODO(alexeyt) should we log something and/or fail to start?
return;
}
if (pw->pw_gid) {
initgroups(pw->pw_name, pw->pw_gid);
setgid(pw->pw_gid);
}
if (pw->pw_uid) {
setuid(pw->pw_uid);
}
} | 127 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | BF_crypt | BF_crypt( const char * key , const char * setting , char * output , int size , BF_word min) | ['key', 'setting', 'output', 'size', 'min'] | static char *BF_crypt(const char *key, const char *setting,
char *output, int size,
BF_word min)
{
#if BF_ASM
extern void _BF_body_r(BF_ctx *ctx);
#endif
static const unsigned char flags_by_subtype[26] =
{2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0};
struct {
BF_ctx ctx;
BF_key expanded_key;
union {
BF_word salt[4];
BF_word output[6];
} binary;
} data;
BF_word L, R;
BF_word tmp1, tmp2, tmp3, tmp4;
BF_word *ptr;
BF_word count;
int i;
if (size < 7 + 22 + 31 + 1) {
__set_errno(ERANGE);
return NULL;
}
if (setting[0] != '$' ||
setting[1] != '2' ||
setting[2] < 'a' || setting[2] > 'z' ||
!flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] ||
setting[3] != '$' ||
setting[4] < '0' || setting[4] > '3' ||
setting[5] < '0' || setting[5] > '9' ||
(setting[4] == '3' && setting[5] > '1') ||
setting[6] != '$') {
__set_errno(EINVAL);
return NULL;
}
count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0'));
if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
__set_errno(EINVAL);
return NULL;
}
BF_swap(data.binary.salt, 4);
BF_set_key(key, data.expanded_key, data.ctx.P,
flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a']);
memcpy(data.ctx.S, BF_init_state.S, sizeof(data.ctx.S));
L = R = 0;
for (i = 0; i < BF_N + 2; i += 2) {
L ^= data.binary.salt[i & 2];
R ^= data.binary.salt[(i & 2) + 1];
BF_ENCRYPT;
data.ctx.P[i] = L;
data.ctx.P[i + 1] = R;
}
ptr = data.ctx.S[0];
do {
ptr += 4;
L ^= data.binary.salt[(BF_N + 2) & 3];
R ^= data.binary.salt[(BF_N + 3) & 3];
BF_ENCRYPT;
*(ptr - 4) = L;
*(ptr - 3) = R;
L ^= data.binary.salt[(BF_N + 4) & 3];
R ^= data.binary.salt[(BF_N + 5) & 3];
BF_ENCRYPT;
*(ptr - 2) = L;
*(ptr - 1) = R;
} while (ptr < &data.ctx.S[3][0xFF]);
do {
int done;
for (i = 0; i < BF_N + 2; i += 2) {
data.ctx.P[i] ^= data.expanded_key[i];
data.ctx.P[i + 1] ^= data.expanded_key[i + 1];
}
done = 0;
do {
BF_body();
if (done)
break;
done = 1;
tmp1 = data.binary.salt[0];
tmp2 = data.binary.salt[1];
tmp3 = data.binary.salt[2];
tmp4 = data.binary.salt[3];
for (i = 0; i < BF_N; i += 4) {
data.ctx.P[i] ^= tmp1;
data.ctx.P[i + 1] ^= tmp2;
data.ctx.P[i + 2] ^= tmp3;
data.ctx.P[i + 3] ^= tmp4;
}
data.ctx.P[16] ^= tmp1;
data.ctx.P[17] ^= tmp2;
} while (1);
} while (--count);
for (i = 0; i < 6; i += 2) {
L = BF_magic_w[i];
R = BF_magic_w[i + 1];
count = 64;
do {
BF_ENCRYPT;
} while (--count);
data.binary.output[i] = L;
data.binary.output[i + 1] = R;
}
memcpy(output, setting, 7 + 22 - 1);
output[7 + 22 - 1] = BF_itoa64[(int)
BF_atoi64[(int)setting[7 + 22 - 1] - 0x20] & 0x30];
/* This has to be bug-compatible with the original implementation, so
* only encode 23 of the 24 bytes. :-) */
BF_swap(data.binary.output, 6);
BF_encode(&output[7 + 22], data.binary.output, 23);
output[7 + 22 + 31] = '\0';
return output;
} | 1026 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | BF_crypt | BF_crypt( const char * key , const char * setting , char * output , int size , BF_word min) | ['key', 'setting', 'output', 'size', 'min'] | static char *BF_crypt(const char *key, const char *setting,
char *output, int size,
BF_word min)
{
#if BF_ASM
extern void _BF_body_r(BF_ctx *ctx);
#endif
static const unsigned char flags_by_subtype[26] =
{2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0};
struct {
BF_ctx ctx;
BF_key expanded_key;
union {
BF_word salt[4];
BF_word output[6];
} binary;
} data;
BF_word L, R;
BF_word tmp1, tmp2, tmp3, tmp4;
BF_word *ptr;
BF_word count;
int i;
if (size < 7 + 22 + 31 + 1) {
__set_errno(ERANGE);
return NULL;
}
if (setting[0] != '$' ||
setting[1] != '2' ||
setting[2] < 'a' || setting[2] > 'z' ||
!flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] ||
setting[3] != '$' ||
setting[4] < '0' || setting[4] > '3' ||
setting[5] < '0' || setting[5] > '9' ||
(setting[4] == '3' && setting[5] > '1') ||
setting[6] != '$') {
__set_errno(EINVAL);
return NULL;
}
count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0'));
if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
__set_errno(EINVAL);
return NULL;
}
BF_swap(data.binary.salt, 4);
BF_set_key(key, data.expanded_key, data.ctx.P,
flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a']);
memcpy(data.ctx.S, BF_init_state.S, sizeof(data.ctx.S));
L = R = 0;
for (i = 0; i < BF_N + 2; i += 2) {
L ^= data.binary.salt[i & 2];
R ^= data.binary.salt[(i & 2) + 1];
BF_ENCRYPT;
data.ctx.P[i] = L;
data.ctx.P[i + 1] = R;
}
ptr = data.ctx.S[0];
do {
ptr += 4;
L ^= data.binary.salt[(BF_N + 2) & 3];
R ^= data.binary.salt[(BF_N + 3) & 3];
BF_ENCRYPT;
*(ptr - 4) = L;
*(ptr - 3) = R;
L ^= data.binary.salt[(BF_N + 4) & 3];
R ^= data.binary.salt[(BF_N + 5) & 3];
BF_ENCRYPT;
*(ptr - 2) = L;
*(ptr - 1) = R;
} while (ptr < &data.ctx.S[3][0xFF]);
do {
int done;
for (i = 0; i < BF_N + 2; i += 2) {
data.ctx.P[i] ^= data.expanded_key[i];
data.ctx.P[i + 1] ^= data.expanded_key[i + 1];
}
done = 0;
do {
BF_body();
if (done)
break;
done = 1;
tmp1 = data.binary.salt[0];
tmp2 = data.binary.salt[1];
tmp3 = data.binary.salt[2];
tmp4 = data.binary.salt[3];
for (i = 0; i < BF_N; i += 4) {
data.ctx.P[i] ^= tmp1;
data.ctx.P[i + 1] ^= tmp2;
data.ctx.P[i + 2] ^= tmp3;
data.ctx.P[i + 3] ^= tmp4;
}
data.ctx.P[16] ^= tmp1;
data.ctx.P[17] ^= tmp2;
} while (1);
} while (--count);
for (i = 0; i < 6; i += 2) {
L = BF_magic_w[i];
R = BF_magic_w[i + 1];
count = 64;
do {
BF_ENCRYPT;
} while (--count);
data.binary.output[i] = L;
data.binary.output[i + 1] = R;
}
memcpy(output, setting, 7 + 22 - 1);
output[7 + 22 - 1] = BF_itoa64[(int)
BF_atoi64[(int)setting[7 + 22 - 1] - 0x20] & 0x30];
/* This has to be bug-compatible with the original implementation, so
* only encode 23 of the 24 bytes. :-) */
BF_swap(data.binary.output, 6);
BF_encode(&output[7 + 22], data.binary.output, 23);
output[7 + 22 + 31] = '\0';
return output;
} | 1026 | True | 1 |
CVE-2019-3556 | False | False | False | False | AV:N/AC:L/Au:S/C:N/I:P/A:P | NETWORK | LOW | SINGLE | NONE | PARTIAL | PARTIAL | 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 8.1 | HIGH | 2.8 | 5.2 | False | [{'url': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'name': 'https://www.facebook.com/security/advisories/cve-2019-3556', 'refsource': 'CONFIRM', 'tags': ['Broken Link']}, {'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndIncluding': '4.78.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM supports the use of an "admin" server which accepts administrative requests over HTTP. One of those request handlers, dump-pcre-cache, can be used to output cached regular expressions from the current execution context into a file. The handler takes a parameter which specifies where on the filesystem to write this data. The parameter is not validated, allowing a malicious user to overwrite arbitrary files where the user running HHVM has write access. This issue affects HHVM versions prior to 4.56.2, all versions between 4.57.0 and 4.78.0, as well as 4.79.0, 4.80.0, 4.81.0, 4.82.0, and 4.83.0.'}] | 2021-10-29T16:38Z | 2021-10-26T20:15Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::string_crypt | HPHP::string_crypt( const char * key , const char * salt) | ['key', 'salt'] | char *string_crypt(const char *key, const char *salt) {
assert(key);
assert(salt);
char random_salt[12];
if (!*salt) {
memcpy(random_salt,"$1$",3);
ito64(random_salt+3,rand(),8);
random_salt[11] = '\0';
return string_crypt(key, random_salt);
}
if ((strlen(salt) > sizeof("$2X$00$")) &&
(salt[0] == '$') &&
(salt[1] == '2') &&
(salt[2] >= 'a') && (salt[2] <= 'z') &&
(salt[3] == '$') &&
(salt[4] >= '0') && (salt[4] <= '3') &&
(salt[5] >= '0') && (salt[5] <= '9') &&
(salt[6] == '$')) {
// Bundled blowfish crypt()
char output[61];
if (php_crypt_blowfish_rn(key, salt, output, sizeof(output))) {
return strdup(output);
}
} else {
// System crypt() function
#ifdef USE_PHP_CRYPT_R
return php_crypt_r(key, salt);
#else
static Mutex mutex;
Lock lock(mutex);
char *crypt_res = crypt(key,salt);
if (crypt_res) {
return strdup(crypt_res);
}
#endif
}
return ((salt[0] == '*') && (salt[1] == '0'))
? strdup("*1") : strdup("*0");
} | 286 | True | 1 |
CVE-2020-1916 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'name': 'https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'name': 'https://hhvm.com/blog/2020/11/12/security-update.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.57.0', 'versionEndExcluding': '4.78.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.56.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.79.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.83.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.82.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.81.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.80.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An incorrect size calculation in ldap_escape may lead to an integer overflow when overly long input is passed in, resulting in an out-of-bounds write. This issue affects HHVM prior to 4.56.2, all versions between 4.57.0 and 4.78.0, 4.79.0, 4.80.0, 4.81.0, 4.82.0, 4.83.0.'}] | 2021-03-17T19:01Z | 2021-03-10T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | jjergus | 2020-11-11 13:34:05-08:00 | security fixes
https://hhvm.com/blog/2020/11/12/security-update.html | abe0b29e4d3a610f9bc920b8be4ad8403364c2d4 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::string_crypt | HPHP::string_crypt( const char * key , const char * salt) | ['key', 'salt'] | char *string_crypt(const char *key, const char *salt) {
assert(key);
assert(salt);
char random_salt[12];
if (!*salt) {
memcpy(random_salt,"$1$",3);
ito64(random_salt+3,rand(),8);
random_salt[11] = '\0';
return string_crypt(key, random_salt);
}
if ((strlen(salt) > sizeof("$2X$00$")) &&
(salt[0] == '$') &&
(salt[1] == '2') &&
(salt[2] >= 'a') && (salt[2] <= 'z') &&
(salt[3] == '$') &&
(salt[4] >= '0') && (salt[4] <= '3') &&
(salt[5] >= '0') && (salt[5] <= '9') &&
(salt[6] == '$')) {
// Bundled blowfish crypt()
char output[61];
if (php_crypt_blowfish_rn(key, salt, output, sizeof(output))) {
return strdup(output);
}
} else {
// System crypt() function
#ifdef USE_PHP_CRYPT_R
return php_crypt_r(key, salt);
#else
static Mutex mutex;
Lock lock(mutex);
char *crypt_res = crypt(key,salt);
if (crypt_res) {
return strdup(crypt_res);
}
#endif
}
return ((salt[0] == '*') && (salt[1] == '0'))
? strdup("*1") : strdup("*0");
} | 286 | True | 1 |
CVE-2018-6340 | False | False | False | False | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2018/12/18/hhvm-3.30.1.html', 'name': 'https://hhvm.com/blog/2018/12/18/hhvm-3.30.1.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/4bff3bfbe90d10451e4638c2118d1ad1117bb3e3', 'name': 'https://github.com/facebook/hhvm/commit/4bff3bfbe90d10451e4638c2118d1ad1117bb3e3', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.27.4', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:3.30:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Memcache::getextendedstats function can be used to trigger an out-of-bounds read. Exploiting this issue requires control over memcached server hostnames and/or ports. This affects all supported versions of HHVM (3.30 and 3.27.4 and below).'}] | 2019-10-09T23:41Z | 2018-12-31T22:29Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Jan Oravec | 2018-12-18 14:05:37-08:00 | CVE-2018-6340 Fix buffer overread
Summary:
snprintf() returns the number of would be written bytes if the buffer had
enough size, letting the original code to construct output string from
arbitrary data on the stack.
Fix this by properly assembling the String without trying to arbitrarily
limiting the length to 30 bytes.
Reviewed By: ottoni
Differential Revision: D13509547
fbshipit-source-id: aa401b83d356f5b261433c4b16d777948ba7f9b4 | 4bff3bfbe90d10451e4638c2118d1ad1117bb3e3 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::HHVM_METHOD | HPHP::HHVM_METHOD( Memcache , getextendedstats , const String & , int , int) | ['Memcache', 'getextendedstats', 'int', 'int'] | static Array HHVM_METHOD(Memcache, getextendedstats,
const String& /*type*/ /* = null_string */,
int /*slabid*/ /* = 0 */, int /*limit*/ /* = 100 */) {
auto data = Native::data<MemcacheData>(this_);
memcached_return_t ret;
memcached_stat_st *stats;
stats = memcached_stat(&data->m_memcache, nullptr, &ret);
if (ret != MEMCACHED_SUCCESS) {
return Array();
}
int server_count = memcached_server_count(&data->m_memcache);
Array return_val;
for (int server_id = 0; server_id < server_count; server_id++) {
memcached_stat_st *stat;
char stats_key[30] = {0};
size_t key_len;
LMCD_SERVER_POSITION_INSTANCE_TYPE instance =
memcached_server_instance_by_position(&data->m_memcache, server_id);
const char *hostname = LMCD_SERVER_HOSTNAME(instance);
in_port_t port = LMCD_SERVER_PORT(instance);
stat = stats + server_id;
Array server_stats = memcache_build_stats(&data->m_memcache, stat, &ret);
if (ret != MEMCACHED_SUCCESS) {
continue;
}
key_len = snprintf(stats_key, sizeof(stats_key), "%s:%d", hostname, port);
return_val.set(String(stats_key, key_len, CopyString), server_stats);
}
free(stats);
return return_val;
} | 216 | True | 1 |
CVE-2019-3557 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/01/14/hhvm-3.30.2.html', 'name': 'https://hhvm.com/blog/2019/01/14/hhvm-3.30.2.html', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994', 'name': 'https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.27.4', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.28.0', 'versionEndIncluding': '3.30.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The implementations of streams for bz2 and php://output improperly implemented their readImpl functions, returning -1 consistently. This behavior caused some stream functions, such as stream_get_line, to trigger an out-of-bounds read when operating on such malformed streams. The implementations were updated to return valid values consistently. This affects all supported versions of HHVM (3.30 and 3.27.4 and below).'}] | 2019-10-09T23:49Z | 2019-01-15T22:29Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Joseph Griego | 2019-01-14 12:18:21-08:00 | CVE-2019-3557: Fix OOB read in readRecord on BZ2Files/OutputFiles
Summary:
These File subclasses return -1 on read errors which is not what is
expected for readImpl--this made File::readRecord behave unusually if the read
fails, causing it to read (size_t)(-1) bytes from its stream buffer; which,
unsurprisingly produces a out-of-bounds heap read.
Reviewed By: leikahing, jjgriego
Differential Revision: D13659395
fbshipit-source-id: 359ed6e3ff9f9cf49b752b666f51c4e0b3ce4b8a | 6e4dd9ec3f14b48170fc45dc9d13a3261765f994 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::OutputFile::readImpl | HPHP::OutputFile::readImpl( char * , int64_t) | ['int64_t'] | int64_t OutputFile::readImpl(char* /*buffer*/, int64_t /*length*/) {
raise_warning("cannot read from a php://output stream");
return -1;
} | 20 | True | 1 |
CVE-2019-3557 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/01/14/hhvm-3.30.2.html', 'name': 'https://hhvm.com/blog/2019/01/14/hhvm-3.30.2.html', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994', 'name': 'https://github.com/facebook/hhvm/commit/6e4dd9ec3f14b48170fc45dc9d13a3261765f994', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.27.4', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.28.0', 'versionEndIncluding': '3.30.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The implementations of streams for bz2 and php://output improperly implemented their readImpl functions, returning -1 consistently. This behavior caused some stream functions, such as stream_get_line, to trigger an out-of-bounds read when operating on such malformed streams. The implementations were updated to return valid values consistently. This affects all supported versions of HHVM (3.30 and 3.27.4 and below).'}] | 2019-10-09T23:49Z | 2019-01-15T22:29Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Joseph Griego | 2019-01-14 12:18:21-08:00 | CVE-2019-3557: Fix OOB read in readRecord on BZ2Files/OutputFiles
Summary:
These File subclasses return -1 on read errors which is not what is
expected for readImpl--this made File::readRecord behave unusually if the read
fails, causing it to read (size_t)(-1) bytes from its stream buffer; which,
unsurprisingly produces a out-of-bounds heap read.
Reviewed By: leikahing, jjgriego
Differential Revision: D13659395
fbshipit-source-id: 359ed6e3ff9f9cf49b752b666f51c4e0b3ce4b8a | 6e4dd9ec3f14b48170fc45dc9d13a3261765f994 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::BZ2File::readImpl | HPHP::BZ2File::readImpl( char * buf , int64_t length) | ['buf', 'length'] | int64_t BZ2File::readImpl(char * buf, int64_t length) {
if (length == 0) {
return 0;
}
assertx(m_bzFile);
int len = BZ2_bzread(m_bzFile, buf, length);
/* Sometimes libbz2 will return fewer bytes than requested, and set bzerror
* to BZ_STREAM_END, but it's not actually EOF, and you can keep reading from
* the file - so, only set EOF after a failed read. This matches PHP5.
*/
if (len <= 0) {
setEof(true);
if (len < 0) {
return -1;
}
}
return len;
} | 69 | True | 1 |
CVE-2019-3561 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/04/03/hhvm-4.0.4.html', 'name': 'https://hhvm.com/blog/2019/04/03/hhvm-4.0.4.html', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/46003b4ab564b2abcd8470035fc324fe36aa8c75', 'name': 'https://github.com/facebook/hhvm/commit/46003b4ab564b2abcd8470035fc324fe36aa8c75', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.0.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.27.7', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.28.0', 'versionEndIncluding': '3.30.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Insufficient boundary checks for the strrpos and strripos functions allow access to out-of-bounds memory. This affects all supported versions of HHVM (4.0.3, 3.30.4, and 3.27.7 and below).'}] | 2019-10-09T23:49Z | 2019-04-29T16:29Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Mat Hostetter | 2019-04-06 08:53:56-07:00 | Prevent strrpos and strripos from visiting out-of-bounds memory.
Reviewed By: alexeyt
Differential Revision: D14669668
fbshipit-source-id: 16bb4674bccf83ffd737e60d1fd9fd4a0093f77c | 46003b4ab564b2abcd8470035fc324fe36aa8c75 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::string_rfind | HPHP::string_rfind( const char * input , int len , const char * s , int s_len , int pos , bool case_sensitive) | ['input', 'len', 's', 's_len', 'pos', 'case_sensitive'] | int string_rfind(const char *input, int len, const char *s, int s_len,
int pos, bool case_sensitive) {
assertx(input);
assertx(s);
if (!s_len || pos < -len || pos > len) {
return -1;
}
void *ptr;
if (case_sensitive) {
if (pos >= 0) {
ptr = bstrrstr(input + pos, len - pos, s, s_len);
} else {
ptr = bstrrstr(input, len + pos + s_len, s, s_len);
}
} else {
if (pos >= 0) {
ptr = bstrrcasestr(input + pos, len - pos, s, s_len);
} else {
ptr = bstrrcasestr(input, len + pos + s_len, s, s_len);
}
}
if (ptr != nullptr) {
return (int)((const char *)ptr - input);
}
return -1;
} | 186 | True | 1 |
CVE-2019-3569 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:N | NETWORK | LOW | NONE | PARTIAL | NONE | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | NONE | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'name': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/97ef580ec2cca9a54da6f9bd9fdd9a455f6d74ed', 'name': 'https://github.com/facebook/hhvm/commit/97ef580ec2cca9a54da6f9bd9fdd9a455f6d74ed', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-668'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.1.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.2.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.3.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:4.8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hhvm:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.30.5', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'HHVM, when used with FastCGI, would bind by default to all available interfaces. This behavior could allow a malicious individual unintended direct access to the application, which could result in information disclosure. This issue affects versions 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, versions 3.30.5 and below, and all versions in the 4.0, 4.1, and 4.2 series.'}] | 2021-09-14T12:19Z | 2019-06-26T15:15Z | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. |
Resources such as files and directories may be inadvertently exposed through mechanisms such as insecure permissions, or when a program accidentally operates on the wrong object. For example, a program may intend that private files can only be provided to a specific user. This effectively defines a control sphere that is intended to prevent attackers from accessing these private files. If the file permissions are insecure, then parties other than the user will be able to access those files.
A separate control sphere might effectively require that the user can only access the private files, but not any other files on the system. If the program does not ensure that the user is only requesting private files, then the user might be able to access other files on the system.
In either case, the end result is that a resource has been exposed to the wrong party.
| https://cwe.mitre.org/data/definitions/668.html | 0 | Fred Emmott | 2019-06-11 11:44:59-07:00 | Fix default FastCGI interface
Reviewed By: alexeyt
Differential Revision: D15567393
fbshipit-source-id: ffab228f689d4ddca9ea4835c70aecf16da2aa9f | 97ef580ec2cca9a54da6f9bd9fdd9a455f6d74ed | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | HPHP::FastCGIServer::FastCGIServer | HPHP::FastCGIServer::FastCGIServer( const std :: string & address , int port , int workers , bool useFileSocket) | ['address', 'port', 'workers', 'useFileSocket'] | FastCGIServer::FastCGIServer(const std::string &address,
int port,
int workers,
bool useFileSocket)
: Server(address, port),
m_worker(&m_eventBaseManager),
m_dispatcher(workers, workers,
RuntimeOption::ServerThreadDropCacheTimeoutSeconds,
RuntimeOption::ServerThreadDropStack,
this,
RuntimeOption::ServerThreadJobLIFOSwitchThreshold,
RuntimeOption::ServerThreadJobMaxQueuingMilliSeconds,
RequestPriority::k_numPriorities) {
folly::SocketAddress sock_addr;
if (useFileSocket) {
sock_addr.setFromPath(address);
} else if (address.empty()) {
sock_addr.setFromLocalPort(port);
} else {
sock_addr.setFromHostPort(address, port);
}
m_socketConfig.bindAddress = sock_addr;
m_socketConfig.acceptBacklog = RuntimeOption::ServerBacklog;
std::chrono::seconds timeout;
if (RuntimeOption::ConnectionTimeoutSeconds >= 0) {
timeout = std::chrono::seconds(RuntimeOption::ConnectionTimeoutSeconds);
} else {
// default to 2 minutes
timeout = std::chrono::seconds(120);
}
m_socketConfig.connectionIdleTimeout = timeout;
} | 176 | True | 1 |
CVE-2019-3570 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'name': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/cc331e4349e91706a673e2a09f1f2ea5bbb33815', 'name': 'https://github.com/facebook/hhvm/commit/cc331e4349e91706a673e2a09f1f2ea5bbb33815', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.2.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.1.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.0.4', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.3.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.30.5', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Call to the scrypt_enc() function in HHVM can lead to heap corruption by using specifically crafted parameters (N, r and p). This happens if the parameters are configurable by an attacker for instance by providing the output of scrypt_enc() in a context where Hack/PHP code would attempt to verify it by re-running scrypt_enc() with the same parameters. This could result in information disclosure, memory being overwriten or crashes of the HHVM process. This issue affects versions 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, versions 3.30.5 and below, and all versions in the 4.0, 4.1, and 4.2 series.'}] | 2020-10-16T15:14Z | 2019-07-18T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Fred Emmott | 2019-06-11 11:50:07-07:00 | Replace copied scrypt implementation with call to libsodium
Summary:
libsodium actually uses the same implementation; using libsodium means we don't
need to maintain a copy ourselves.
Keep the `pickparams` implementation though, as that's not exposed in libsodium.
We should deprecate this extension, and strongly encourage directly using `ext_sodium` instead from Hack code; stored hashes from `ext_scrypt` can be verified like this:
```
$enc = scrypt_enc('foo', random_bytes(SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES));
list($_, $algo, $n, $r, $p, $salt, $out) = explode('$', $enc);
invariant($algo === 's', 'did not get an scrypt result');
$salt = base64_decode($salt);
$out = base64_decode($out);
$opslimit = (1 << $n) * $r * $p * 4;
$memlimit = (1 << $n) * $r * 128;
$sodium = sodium_crypto_pwhash_scryptsalsa208sha256(strlen($out), 'foo', $salt, $opslimit, $memlimit);
\var_dump($sodium === $out);
```
This also makes the scrypt extension depend on libsodium; this is fine, libsodium's going to be a hard dependency for HHVM anyway when the proxygen pin is next updated.
Reviewed By: alexeyt
Differential Revision: D15702142
fbshipit-source-id: 2dcad7c6cb273d4ce4b3479ffa445841fa2d1107 | cc331e4349e91706a673e2a09f1f2ea5bbb33815 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | folly_ext::aligned_free | folly_ext::aligned_free( void * ptr) | ['ptr'] | inline void aligned_free(void* ptr) {
folly::detail::aligned_free(ptr);
} | 17 | True | 1 |
CVE-2019-3570 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'name': 'https://hhvm.com/blog/2019/06/10/hhvm-4.9.0.html', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/facebook/hhvm/commit/cc331e4349e91706a673e2a09f1f2ea5bbb33815', 'name': 'https://github.com/facebook/hhvm/commit/cc331e4349e91706a673e2a09f1f2ea5bbb33815', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.2.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.1.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0.0', 'versionEndIncluding': '4.0.4', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.3.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:4.8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:facebook:hiphop_virtual_machine:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.30.5', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Call to the scrypt_enc() function in HHVM can lead to heap corruption by using specifically crafted parameters (N, r and p). This happens if the parameters are configurable by an attacker for instance by providing the output of scrypt_enc() in a context where Hack/PHP code would attempt to verify it by re-running scrypt_enc() with the same parameters. This could result in information disclosure, memory being overwriten or crashes of the HHVM process. This issue affects versions 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, versions 3.30.5 and below, and all versions in the 4.0, 4.1, and 4.2 series.'}] | 2020-10-16T15:14Z | 2019-07-18T16:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Fred Emmott | 2019-06-11 11:50:07-07:00 | Replace copied scrypt implementation with call to libsodium
Summary:
libsodium actually uses the same implementation; using libsodium means we don't
need to maintain a copy ourselves.
Keep the `pickparams` implementation though, as that's not exposed in libsodium.
We should deprecate this extension, and strongly encourage directly using `ext_sodium` instead from Hack code; stored hashes from `ext_scrypt` can be verified like this:
```
$enc = scrypt_enc('foo', random_bytes(SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES));
list($_, $algo, $n, $r, $p, $salt, $out) = explode('$', $enc);
invariant($algo === 's', 'did not get an scrypt result');
$salt = base64_decode($salt);
$out = base64_decode($out);
$opslimit = (1 << $n) * $r * $p * 4;
$memlimit = (1 << $n) * $r * 128;
$sodium = sodium_crypto_pwhash_scryptsalsa208sha256(strlen($out), 'foo', $salt, $opslimit, $memlimit);
\var_dump($sodium === $out);
```
This also makes the scrypt extension depend on libsodium; this is fine, libsodium's going to be a hard dependency for HHVM anyway when the proxygen pin is next updated.
Reviewed By: alexeyt
Differential Revision: D15702142
fbshipit-source-id: 2dcad7c6cb273d4ce4b3479ffa445841fa2d1107 | cc331e4349e91706a673e2a09f1f2ea5bbb33815 | False | facebook/hhvm | A virtual machine for executing programs written in Hack. | 2010-01-02 01:17:06 | 2022-08-27 15:17:15 | https://hhvm.com | facebook | 17395.0 | 3000.0 | folly_ext::aligned_malloc | folly_ext::aligned_malloc( size_t size , size_t alignment) | ['size', 'alignment'] | inline void* aligned_malloc(size_t size, size_t alignment) {
return folly::detail::aligned_malloc(size, alignment);
} | 22 | True | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.