idx
int64 0
522k
| project
stringclasses 631
values | commit_id
stringlengths 7
40
| project_url
stringclasses 630
values | commit_url
stringlengths 4
164
| commit_message
stringlengths 0
11.5k
| target
int64 0
1
| func
stringlengths 5
484k
| func_hash
float64 1,559,120,642,045,605,000,000,000B
340,279,892,905,069,500,000,000,000,000B
| file_name
stringlengths 4
45
| file_hash
float64 25,942,829,220,065,710,000,000,000B
340,272,304,251,680,200,000,000,000,000B
⌀ | cwe
sequencelengths 0
1
| cve
stringlengths 4
16
| cve_desc
stringlengths 0
2.3k
| nvd_url
stringlengths 37
49
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,308 | savannah | c15c42ccd1e2377945fd0414eca1a49294bff454 | https://git.savannah.gnu.org/gitweb/?p=gnutls | https://git.savannah.gnu.org/cgit/tar.git/commit/?id=c15c42ccd1e2377945fd0414eca1a49294bff454 | None | 0 | tar_sparse_dump_region (struct tar_sparse_file *file, size_t i)
{
if (file->optab->dump_region)
return file->optab->dump_region (file, i);
return false;
}
| 203,685,292,815,110,700,000,000,000,000,000,000,000 | None | null | [
"CWE-835"
] | CVE-2018-20482 | GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root). | https://nvd.nist.gov/vuln/detail/CVE-2018-20482 |
11,309 | savannah | c15c42ccd1e2377945fd0414eca1a49294bff454 | https://git.savannah.gnu.org/gitweb/?p=gnutls | https://git.savannah.gnu.org/cgit/tar.git/commit/?id=c15c42ccd1e2377945fd0414eca1a49294bff454 | None | 0 | tar_sparse_init (struct tar_sparse_file *file)
{
memset (file, 0, sizeof *file);
if (!sparse_select_optab (file))
return false;
if (file->optab->init)
return file->optab->init (file);
return true;
}
| 46,906,667,836,433,480,000,000,000,000,000,000,000 | None | null | [
"CWE-835"
] | CVE-2018-20482 | GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root). | https://nvd.nist.gov/vuln/detail/CVE-2018-20482 |
11,310 | savannah | c15c42ccd1e2377945fd0414eca1a49294bff454 | https://git.savannah.gnu.org/gitweb/?p=gnutls | https://git.savannah.gnu.org/cgit/tar.git/commit/?id=c15c42ccd1e2377945fd0414eca1a49294bff454 | None | 0 | tar_sparse_member_p (struct tar_sparse_file *file)
{
if (file->optab->sparse_member_p)
return file->optab->sparse_member_p (file);
return false;
}
| 303,666,196,822,997,540,000,000,000,000,000,000,000 | None | null | [
"CWE-835"
] | CVE-2018-20482 | GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root). | https://nvd.nist.gov/vuln/detail/CVE-2018-20482 |
11,311 | savannah | c15c42ccd1e2377945fd0414eca1a49294bff454 | https://git.savannah.gnu.org/gitweb/?p=gnutls | https://git.savannah.gnu.org/cgit/tar.git/commit/?id=c15c42ccd1e2377945fd0414eca1a49294bff454 | None | 0 | tar_sparse_scan (struct tar_sparse_file *file, enum sparse_scan_state state,
void *block)
{
if (file->optab->scan_block)
return file->optab->scan_block (file, state, block);
return true;
}
| 266,840,471,335,513,200,000,000,000,000,000,000,000 | None | null | [
"CWE-835"
] | CVE-2018-20482 | GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root). | https://nvd.nist.gov/vuln/detail/CVE-2018-20482 |
11,312 | savannah | c15c42ccd1e2377945fd0414eca1a49294bff454 | https://git.savannah.gnu.org/gitweb/?p=gnutls | https://git.savannah.gnu.org/cgit/tar.git/commit/?id=c15c42ccd1e2377945fd0414eca1a49294bff454 | None | 0 | zero_block_p (char const *buffer, size_t size)
{
while (size--)
if (*buffer++)
return false;
return true;
}
| 129,221,908,368,714,900,000,000,000,000,000,000,000 | None | null | [
"CWE-835"
] | CVE-2018-20482 | GNU Tar through 1.30, when --sparse is used, mishandles file shrinkage during read access, which allows local users to cause a denial of service (infinite read loop in sparse_dump_region in sparse.c) by modifying a file that is supposed to be archived by a different user's process (e.g., a system backup running as root). | https://nvd.nist.gov/vuln/detail/CVE-2018-20482 |
11,320 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | static const char *default_charset(void)
{
# if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET
return locale_charset();
# elif defined HAVE_LANGINFO_H && defined HAVE_NL_LANGINFO
return nl_langinfo(CODESET);
# else
return ""; /* Works with (at the very least) gnu iconv... */
# endif
}
| 282,005,334,883,347,660,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,321 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
int exists)
{
int new_mode;
/* If the file already exists, we'll return the local permissions,
* possibly tweaked by the --executability option. */
if (exists) {
new_mode = (flist_mode & ~CHMOD_BITS) | (stat_mode & CHMOD_BITS);
if (preserve_executability && S_ISREG(flist_mode)) {
/* If the source file is executable, grant execute
* rights to everyone who can read, but ONLY if the
* file isn't already executable. */
if (!(flist_mode & 0111))
new_mode &= ~0111;
else if (!(stat_mode & 0111))
new_mode |= (new_mode & 0444) >> 2;
}
} else {
/* Apply destination default permissions and turn
* off special permissions. */
new_mode = flist_mode & (~CHMOD_BITS | dflt_perms);
}
return new_mode;
}
| 333,296,055,602,515,240,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,322 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc)
{
struct file_list *flist = cur_flist;
if (!flist && !(flist = first_flist))
goto not_found;
while (ndx < flist->ndx_start-1) {
if (flist == first_flist)
goto not_found;
flist = flist->prev;
}
while (ndx >= flist->ndx_start + flist->used) {
if (!(flist = flist->next))
goto not_found;
}
return flist;
not_found:
if (fatal_error_loc) {
int first, last;
if (first_flist) {
first = first_flist->ndx_start - 1;
last = first_flist->prev->ndx_start + first_flist->prev->used - 1;
} else {
first = 0;
last = -1;
}
rprintf(FERROR,
"File-list index %d not in %d - %d (%s) [%s]\n",
ndx, first, last, fatal_error_loc, who_am_i());
exit_cleanup(RERR_PROTOCOL);
}
return NULL;
}
| 265,974,073,934,216,530,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,323 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | void free_sums(struct sum_struct *s)
{
if (s->sums) free(s->sums);
free(s);
}
| 177,654,060,566,778,930,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,324 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags)
{
ICONV_CONST char *ibuf;
size_t icnt, ocnt, opos;
char *obuf;
if (!out->size && flags & ICB_EXPAND_OUT) {
size_t siz = ROUND_UP_1024(in->len * 2);
alloc_xbuf(out, siz);
} else if (out->len+1 >= out->size) {
/* There is no room to even start storing data. */
if (!(flags & ICB_EXPAND_OUT) || flags & ICB_CIRCULAR_OUT) {
errno = E2BIG;
return -1;
}
realloc_xbuf(out, out->size + ROUND_UP_1024(in->len * 2));
}
if (flags & ICB_INIT)
iconv(ic, NULL, 0, NULL, 0);
ibuf = in->buf + in->pos;
icnt = in->len;
opos = out->pos + out->len;
if (flags & ICB_CIRCULAR_OUT) {
if (opos >= out->size) {
opos -= out->size;
/* We know that out->pos is not 0 due to the "no room" check
* above, so this can't go "negative". */
ocnt = out->pos - opos - 1;
} else {
/* Allow the use of all bytes to the physical end of the buffer
* unless pos is 0, in which case we reserve our trailing '\0'. */
ocnt = out->size - opos - (out->pos ? 0 : 1);
}
} else
ocnt = out->size - opos - 1;
obuf = out->buf + opos;
while (icnt) {
while (iconv(ic, &ibuf, &icnt, &obuf, &ocnt) == (size_t)-1) {
if (errno == EINTR)
continue;
if (errno == EINVAL) {
if (!(flags & ICB_INCLUDE_INCOMPLETE))
goto finish;
if (!ocnt)
goto e2big;
} else if (errno == EILSEQ) {
if (!(flags & ICB_INCLUDE_BAD))
goto finish;
if (!ocnt)
goto e2big;
} else if (errno == E2BIG) {
size_t siz;
e2big:
opos = obuf - out->buf;
if (flags & ICB_CIRCULAR_OUT && out->pos > 1 && opos > out->pos) {
/* We are in a divided circular buffer at the physical
* end with room to wrap to the start. If iconv() refused
* to use one or more trailing bytes in the buffer, we
* set the size to ignore the unused bytes. */
if (opos < out->size)
reduce_iobuf_size(out, opos);
obuf = out->buf;
ocnt = out->pos - 1;
continue;
}
if (!(flags & ICB_EXPAND_OUT) || flags & ICB_CIRCULAR_OUT) {
errno = E2BIG;
goto finish;
}
siz = ROUND_UP_1024(in->len * 2);
realloc_xbuf(out, out->size + siz);
obuf = out->buf + opos;
ocnt += siz;
continue;
} else {
rsyserr(FERROR, errno, "unexpected error from iconv()");
exit_cleanup(RERR_UNSUPPORTED);
}
*obuf++ = *ibuf++;
ocnt--, icnt--;
if (!icnt)
break;
}
}
errno = 0;
finish:
opos = obuf - out->buf;
if (flags & ICB_CIRCULAR_OUT && opos < out->pos)
opos += out->size;
out->len = opos - out->pos;
in->len = icnt;
in->pos = ibuf - in->buf;
return errno ? -1 : 0;
}
| 222,076,732,695,079,720,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,325 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | void send_protected_args(int fd, char *args[])
{
int i;
#ifdef ICONV_OPTION
int convert = ic_send != (iconv_t)-1;
xbuf outbuf, inbuf;
if (convert)
alloc_xbuf(&outbuf, 1024);
#endif
for (i = 0; args[i]; i++) {} /* find first NULL */
args[i] = "rsync"; /* set a new arg0 */
if (DEBUG_GTE(CMD, 1))
print_child_argv("protected args:", args + i + 1);
do {
if (!args[i][0])
write_buf(fd, ".", 2);
#ifdef ICONV_OPTION
else if (convert) {
INIT_XBUF_STRLEN(inbuf, args[i]);
iconvbufs(ic_send, &inbuf, &outbuf,
ICB_EXPAND_OUT | ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE | ICB_INIT);
outbuf.buf[outbuf.len] = '\0';
write_buf(fd, outbuf.buf, outbuf.len + 1);
outbuf.len = 0;
}
#endif
else
write_buf(fd, args[i], strlen(args[i]) + 1);
} while (args[++i]);
write_byte(fd, 0);
#ifdef ICONV_OPTION
if (convert)
free(outbuf.buf);
#endif
}
| 175,982,612,026,745,500,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,326 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | void setup_iconv(void)
{
const char *defset = default_charset();
# ifdef ICONV_OPTION
const char *charset;
char *cp;
# endif
if (!am_server && !allow_8bit_chars) {
/* It's OK if this fails... */
ic_chck = iconv_open(defset, defset);
if (DEBUG_GTE(ICONV, 2)) {
if (ic_chck == (iconv_t)-1) {
rprintf(FINFO,
"msg checking via isprint()"
" (iconv_open(\"%s\", \"%s\") errno: %d)\n",
defset, defset, errno);
} else {
rprintf(FINFO,
"msg checking charset: %s\n",
defset);
}
}
} else
ic_chck = (iconv_t)-1;
# ifdef ICONV_OPTION
if (!iconv_opt)
return;
if ((cp = strchr(iconv_opt, ',')) != NULL) {
if (am_server) /* A local transfer needs this. */
iconv_opt = cp + 1;
else
*cp = '\0';
}
if (!*iconv_opt || (*iconv_opt == '.' && iconv_opt[1] == '\0'))
charset = defset;
else
charset = iconv_opt;
if ((ic_send = iconv_open(UTF8_CHARSET, charset)) == (iconv_t)-1) {
rprintf(FERROR, "iconv_open(\"%s\", \"%s\") failed\n",
UTF8_CHARSET, charset);
exit_cleanup(RERR_UNSUPPORTED);
}
if ((ic_recv = iconv_open(charset, UTF8_CHARSET)) == (iconv_t)-1) {
rprintf(FERROR, "iconv_open(\"%s\", \"%s\") failed\n",
charset, UTF8_CHARSET);
exit_cleanup(RERR_UNSUPPORTED);
}
if (DEBUG_GTE(ICONV, 1)) {
rprintf(FINFO, "[%s] charset: %s\n",
who_am_i(), *charset ? charset : "[LOCALE]");
}
# endif
}
| 3,589,006,063,570,101,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,327 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | void sig_int(int sig_num)
{
/* KLUGE: if the user hits Ctrl-C while ssh is prompting
* for a password, then our cleanup's sending of a SIGUSR1
* signal to all our children may kill ssh before it has a
* chance to restore the tty settings (i.e. turn echo back
* on). By sleeping for a short time, ssh gets a bigger
* chance to do the right thing. If child processes are
* not ssh waiting for a password, then this tiny delay
* shouldn't hurt anything. */
msleep(400);
/* If we're an rsync daemon listener (not a daemon server),
* we'll exit with status 0 if we received SIGTERM. */
if (am_daemon && !am_server && sig_num == SIGTERM)
exit_cleanup(0);
/* If the signal arrived on the server side (or for the receiver
* process on the client), we want to try to do a controlled shutdown
* that lets the client side (generator process) know what happened.
* To do this, we set a flag and let the normal process handle the
* shutdown. We only attempt this if multiplexed IO is in effect and
* we didn't already set the flag. */
if (!got_kill_signal && (am_server || am_receiver)) {
got_kill_signal = sig_num;
return;
}
exit_cleanup(RERR_SIGNAL);
}
| 14,327,309,829,457,428,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,328 | samba | 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | https://github.com/samba-team/samba | https://git.samba.org/?p=rsync.git;a=commit;h=70aeb5fddd1b2f8e143276f8d5a085db16c593b9 | None | 0 | const char *who_am_i(void)
{
if (am_starting_up)
return am_server ? "server" : "client";
return am_sender ? "sender"
: am_generator ? "generator"
: am_receiver ? "receiver"
: "Receiver"; /* pre-forked receiver */
}
| 118,098,839,665,995,170,000,000,000,000,000,000,000 | rsync.c | 268,090,318,301,389,300,000,000,000,000,000,000,000 | [] | CVE-2017-17434 | The daemon in rsync 3.1.2, and 3.1.3-development before 2017-12-03, does not check for fnamecmp filenames in the daemon_filter_list data structure (in the recv_files function in receiver.c) and also does not apply the sanitize_paths protection mechanism to pathnames found in "xname follows" strings (in the read_ndx_and_attrs function in rsync.c), which allows remote attackers to bypass intended access restrictions. | https://nvd.nist.gov/vuln/detail/CVE-2017-17434 |
11,334 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static int dns_build_query(int query_id, int query_type, unsigned int accepted_payload_size,
char *hostname_dn, int hostname_dn_len, char *buf, int bufsize)
{
struct dns_header dns_hdr;
struct dns_question qinfo;
struct dns_additional_record edns;
char *p = buf;
if (sizeof(dns_hdr) + sizeof(qinfo) + sizeof(edns) + hostname_dn_len >= bufsize)
return -1;
memset(buf, 0, bufsize);
/* Set dns query headers */
dns_hdr.id = (unsigned short) htons(query_id);
dns_hdr.flags = htons(0x0100); /* qr=0, opcode=0, aa=0, tc=0, rd=1, ra=0, z=0, rcode=0 */
dns_hdr.qdcount = htons(1); /* 1 question */
dns_hdr.ancount = 0;
dns_hdr.nscount = 0;
dns_hdr.arcount = htons(1);
memcpy(p, &dns_hdr, sizeof(dns_hdr));
p += sizeof(dns_hdr);
/* Set up query hostname */
memcpy(p, hostname_dn, hostname_dn_len);
p += hostname_dn_len;
*p++ = 0;
/* Set up query info (type and class) */
qinfo.qtype = htons(query_type);
qinfo.qclass = htons(DNS_RCLASS_IN);
memcpy(p, &qinfo, sizeof(qinfo));
p += sizeof(qinfo);
/* Set the DNS extension */
edns.name = 0;
edns.type = htons(DNS_RTYPE_OPT);
edns.udp_payload_size = htons(accepted_payload_size);
edns.extension = 0;
edns.data_length = 0;
memcpy(p, &edns, sizeof(edns));
p += sizeof(edns);
return (p - buf);
}
| 264,170,279,913,196,000,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,335 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_check_dns_response(struct dns_resolution *res)
{
struct dns_resolvers *resolvers = res->resolvers;
struct dns_requester *req, *reqback;
struct dns_answer_item *item, *itemback;
struct server *srv;
struct dns_srvrq *srvrq;
list_for_each_entry_safe(item, itemback, &res->response.answer_list, list) {
/* Remove obsolete items */
if ((item->last_seen + resolvers->hold.obsolete / 1000) < now.tv_sec) {
if (item->type != DNS_RTYPE_SRV)
goto rm_obselete_item;
list_for_each_entry_safe(req, reqback, &res->requesters, list) {
if ((srvrq = objt_dns_srvrq(req->owner)) == NULL)
continue;
/* Remove any associated server */
for (srv = srvrq->proxy->srv; srv != NULL; srv = srv->next) {
HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
if (srv->srvrq == srvrq && srv->svc_port == item->port &&
item->data_len == srv->hostname_dn_len &&
!memcmp(srv->hostname_dn, item->target, item->data_len)) {
snr_update_srv_status(srv, 1);
free(srv->hostname);
free(srv->hostname_dn);
srv->hostname = NULL;
srv->hostname_dn = NULL;
srv->hostname_dn_len = 0;
dns_unlink_resolution(srv->dns_requester);
}
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
}
}
rm_obselete_item:
LIST_DEL(&item->list);
pool_free(dns_answer_item_pool, item);
continue;
}
if (item->type != DNS_RTYPE_SRV)
continue;
/* Now process SRV records */
list_for_each_entry_safe(req, reqback, &res->requesters, list) {
if ((srvrq = objt_dns_srvrq(req->owner)) == NULL)
continue;
/* Check if a server already uses that hostname */
for (srv = srvrq->proxy->srv; srv != NULL; srv = srv->next) {
HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
if (srv->srvrq == srvrq && srv->svc_port == item->port &&
item->data_len == srv->hostname_dn_len &&
!memcmp(srv->hostname_dn, item->target, item->data_len)) {
int ha_weight;
/* Make sure weight is at least 1, so
* that the server will be used.
*/
ha_weight = item->weight / 256 + 1;
if (srv->uweight != ha_weight) {
char weight[9];
snprintf(weight, sizeof(weight), "%d", ha_weight);
server_parse_weight_change_request(srv, weight);
}
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
break;
}
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
}
if (srv)
continue;
/* If not, try to find a server with undefined hostname */
for (srv = srvrq->proxy->srv; srv != NULL; srv = srv->next) {
HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
if (srv->srvrq == srvrq && !srv->hostname_dn)
break;
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
}
/* And update this server, if found */
if (srv) {
const char *msg = NULL;
char weight[9];
int ha_weight;
char hostname[DNS_MAX_NAME_SIZE];
if (dns_dn_label_to_str(item->target, item->data_len+1,
hostname, DNS_MAX_NAME_SIZE) == -1) {
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
continue;
}
msg = update_server_fqdn(srv, hostname, "SRV record", 1);
if (msg)
send_log(srv->proxy, LOG_NOTICE, "%s", msg);
srv->svc_port = item->port;
srv->flags &= ~SRV_F_MAPPORTS;
if ((srv->check.state & CHK_ST_CONFIGURED) &&
!(srv->flags & SRV_F_CHECKPORT))
srv->check.port = item->port;
/* Make sure weight is at least 1, so
* that the server will be used.
*/
ha_weight = item->weight / 256 + 1;
snprintf(weight, sizeof(weight), "%d", ha_weight);
server_parse_weight_change_request(srv, weight);
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
}
}
}
}
| 226,713,531,637,717,270,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,336 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_reset_resolution(struct dns_resolution *resolution)
{
/* update resolution status */
resolution->step = RSLV_STEP_NONE;
resolution->try = 0;
resolution->last_resolution = now_ms;
resolution->nb_queries = 0;
resolution->nb_responses = 0;
resolution->query_type = resolution->prefered_query_type;
/* clean up query id */
eb32_delete(&resolution->qid);
resolution->query_id = 0;
resolution->qid.key = 0;
}
| 12,001,898,397,661,580,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,337 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static inline int dns_resolution_timeout(struct dns_resolution *res)
{
switch (res->status) {
case RSLV_STATUS_VALID: return res->resolvers->hold.valid;
default: return res->resolvers->timeout.resolve;
}
}
| 288,482,937,427,703,100,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,338 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static inline unsigned short dns_response_get_query_id(unsigned char *resp)
{
return resp[0] * 256 + resp[1];
}
| 45,821,685,141,851,380,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,339 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | dns_run_resolution(struct dns_resolution *resolution)
{
struct dns_resolvers *resolvers = resolution->resolvers;
int query_id, i;
/* Avoid sending requests for resolutions that don't yet have an
* hostname, ie resolutions linked to servers that do not yet have an
* fqdn */
if (!resolution->hostname_dn)
return 0;
/* Check if a resolution has already been started for this server return
* directly to avoid resolution pill up. */
if (resolution->step != RSLV_STEP_NONE)
return 0;
/* Generates a new query id. We try at most 100 times to find a free
* query id */
for (i = 0; i < 100; ++i) {
query_id = dns_rnd16();
if (!eb32_lookup(&resolvers->query_ids, query_id))
break;
query_id = -1;
}
if (query_id == -1) {
send_log(NULL, LOG_NOTICE,
"could not generate a query id for %s, in resolvers %s.\n",
resolution->hostname_dn, resolvers->id);
return -1;
}
/* Update resolution parameters */
resolution->query_id = query_id;
resolution->qid.key = query_id;
resolution->step = RSLV_STEP_RUNNING;
resolution->query_type = resolution->prefered_query_type;
resolution->try = resolvers->resolve_retries;
eb32_insert(&resolvers->query_ids, &resolution->qid);
/* Send the DNS query */
resolution->try -= 1;
dns_send_query(resolution);
return 1;
}
| 101,462,500,114,453,040,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,340 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static int dns_send_query(struct dns_resolution *resolution)
{
struct dns_resolvers *resolvers = resolution->resolvers;
struct dns_nameserver *ns;
list_for_each_entry(ns, &resolvers->nameservers, list) {
int fd = ns->dgram->t.sock.fd;
if (fd == -1) {
if (dns_connect_namesaver(ns) == -1)
continue;
fd = ns->dgram->t.sock.fd;
resolvers->nb_nameservers++;
}
fd_want_send(fd);
}
/* Update resolution */
resolution->nb_queries = 0;
resolution->nb_responses = 0;
resolution->last_query = now_ms;
/* Push the resolution at the end of the active list */
LIST_DEL(&resolution->list);
LIST_ADDQ(&resolvers->resolutions.curr, &resolution->list);
return 0;
}
| 265,511,182,553,347,400,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,341 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | void dns_trigger_resolution(struct dns_requester *req)
{
struct dns_resolvers *resolvers;
struct dns_resolution *res;
int exp;
if (!req || !req->resolution)
return;
res = req->resolution;
resolvers = res->resolvers;
/* The resolution must not be triggered yet. Use the cached response, if
* valid */
exp = tick_add(res->last_resolution, resolvers->hold.valid);
if (resolvers->t && (res->status != RSLV_STATUS_VALID ||
!tick_isset(res->last_resolution) || tick_is_expired(exp, now_ms)))
task_wakeup(resolvers->t, TASK_WOKEN_OTHER);
}
| 204,159,347,190,264,970,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,342 | haproxy | 58df5aea0a0c926b2238f65908f5e9f83d1cca25 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=58df5aea0a0c926b2238f65908f5e9f83d1cca25 | BUG: dns: Prevent stack-exhaustion via recursion loop in dns_read_name
When a compressed pointer is encountered, dns_read_name() will call
itself with the pointed-to offset in the packet.
With a specially crafted packet, it was possible to trigger an
infinite-loop recursion by making the pointer points to itself.
While it would be possible to handle that particular case differently
by making sure that the target is different from the current offset,
it would still be possible to craft a packet with a very long chain
of valid pointers, always pointing backwards. To prevent a stack
exhaustion in that case, this patch restricts the number of recursive
calls to 100, which should be more than enough.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_update_resolvers_timeout(struct dns_resolvers *resolvers)
{
struct dns_resolution *res;
int next;
next = tick_add(now_ms, resolvers->timeout.resolve);
if (!LIST_ISEMPTY(&resolvers->resolutions.curr)) {
res = LIST_NEXT(&resolvers->resolutions.curr, struct dns_resolution *, list);
next = MIN(next, tick_add(res->last_query, resolvers->timeout.retry));
}
list_for_each_entry(res, &resolvers->resolutions.wait, list)
next = MIN(next, tick_add(res->last_resolution, dns_resolution_timeout(res)));
resolvers->t->expire = next;
task_queue(resolvers->t);
}
| 208,332,645,144,910,000,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-835"
] | CVE-2018-20103 | An issue was discovered in dns.c in HAProxy through 1.8.14. In the case of a compressed pointer, a crafted packet can trigger infinite recursion by making the pointer point to itself, or create a long chain of valid pointers resulting in stack exhaustion. | https://nvd.nist.gov/vuln/detail/CVE-2018-20103 |
11,343 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static int cli_io_handler_dump_resolvers_to_buffer(struct appctx *appctx)
{
struct stream_interface *si = appctx->owner;
struct dns_resolvers *resolvers;
struct dns_nameserver *ns;
chunk_reset(&trash);
switch (appctx->st2) {
case STAT_ST_INIT:
appctx->st2 = STAT_ST_LIST; /* let's start producing data */
/* fall through */
case STAT_ST_LIST:
if (LIST_ISEMPTY(&dns_resolvers)) {
chunk_appendf(&trash, "No resolvers found\n");
}
else {
list_for_each_entry(resolvers, &dns_resolvers, list) {
if (appctx->ctx.cli.p0 != NULL && appctx->ctx.cli.p0 != resolvers)
continue;
chunk_appendf(&trash, "Resolvers section %s\n", resolvers->id);
list_for_each_entry(ns, &resolvers->nameservers, list) {
chunk_appendf(&trash, " nameserver %s:\n", ns->id);
chunk_appendf(&trash, " sent: %lld\n", ns->counters.sent);
chunk_appendf(&trash, " snd_error: %lld\n", ns->counters.snd_error);
chunk_appendf(&trash, " valid: %lld\n", ns->counters.valid);
chunk_appendf(&trash, " update: %lld\n", ns->counters.update);
chunk_appendf(&trash, " cname: %lld\n", ns->counters.cname);
chunk_appendf(&trash, " cname_error: %lld\n", ns->counters.cname_error);
chunk_appendf(&trash, " any_err: %lld\n", ns->counters.any_err);
chunk_appendf(&trash, " nx: %lld\n", ns->counters.nx);
chunk_appendf(&trash, " timeout: %lld\n", ns->counters.timeout);
chunk_appendf(&trash, " refused: %lld\n", ns->counters.refused);
chunk_appendf(&trash, " other: %lld\n", ns->counters.other);
chunk_appendf(&trash, " invalid: %lld\n", ns->counters.invalid);
chunk_appendf(&trash, " too_big: %lld\n", ns->counters.too_big);
chunk_appendf(&trash, " truncated: %lld\n", ns->counters.truncated);
chunk_appendf(&trash, " outdated: %lld\n", ns->counters.outdated);
}
chunk_appendf(&trash, "\n");
}
}
/* display response */
if (ci_putchk(si_ic(si), &trash) == -1) {
/* let's try again later from this session. We add ourselves into
* this session's users so that it can remove us upon termination.
*/
si_rx_room_blk(si);
return 0;
}
/* fall through */
default:
appctx->st2 = STAT_ST_FIN;
return 1;
}
}
| 29,690,963,073,120,524,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,344 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static int cli_parse_stat_resolvers(char **args, char *payload, struct appctx *appctx, void *private)
{
struct dns_resolvers *presolvers;
if (*args[2]) {
list_for_each_entry(presolvers, &dns_resolvers, list) {
if (strcmp(presolvers->id, args[2]) == 0) {
appctx->ctx.cli.p0 = presolvers;
break;
}
}
if (appctx->ctx.cli.p0 == NULL) {
appctx->ctx.cli.severity = LOG_ERR;
appctx->ctx.cli.msg = "Can't find that resolvers section\n";
appctx->st0 = CLI_ST_PRINT;
return 1;
}
}
return 0;
}
| 155,149,799,893,331,130,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,345 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_deinit(void)
{
struct dns_resolvers *resolvers, *resolversback;
struct dns_nameserver *ns, *nsback;
struct dns_resolution *res, *resback;
struct dns_requester *req, *reqback;
struct dns_srvrq *srvrq, *srvrqback;
list_for_each_entry_safe(resolvers, resolversback, &dns_resolvers, list) {
list_for_each_entry_safe(ns, nsback, &resolvers->nameservers, list) {
free(ns->id);
free((char *)ns->conf.file);
if (ns->dgram && ns->dgram->t.sock.fd != -1)
fd_delete(ns->dgram->t.sock.fd);
free(ns->dgram);
LIST_DEL(&ns->list);
free(ns);
}
list_for_each_entry_safe(res, resback, &resolvers->resolutions.curr, list) {
list_for_each_entry_safe(req, reqback, &res->requesters, list) {
LIST_DEL(&req->list);
free(req);
}
dns_free_resolution(res);
}
list_for_each_entry_safe(res, resback, &resolvers->resolutions.wait, list) {
list_for_each_entry_safe(req, reqback, &res->requesters, list) {
LIST_DEL(&req->list);
free(req);
}
dns_free_resolution(res);
}
free(resolvers->id);
free((char *)resolvers->conf.file);
task_delete(resolvers->t);
task_free(resolvers->t);
LIST_DEL(&resolvers->list);
free(resolvers);
}
list_for_each_entry_safe(srvrq, srvrqback, &dns_srvrq_list, list) {
free(srvrq->name);
free(srvrq->hostname_dn);
LIST_DEL(&srvrq->list);
free(srvrq);
}
}
| 266,841,229,674,249,500,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,346 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_dn_label_to_str(const char *dn, int dn_len, char *str, int str_len)
{
char *ptr;
int i, sz;
if (str_len < dn_len - 1)
return -1;
ptr = str;
for (i = 0; i < dn_len-1; ++i) {
sz = dn[i];
if (i)
*ptr++ = '.';
memcpy(ptr, dn+i+1, sz);
ptr += sz;
i += sz;
}
*ptr++ = '\0';
return (ptr - str);
}
| 219,689,839,149,688,970,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,347 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static int dns_finalize_config(void)
{
struct dns_resolvers *resolvers;
struct proxy *px;
int err_code = 0;
/* allocate pool of resolution per resolvers */
list_for_each_entry(resolvers, &dns_resolvers, list) {
struct dns_nameserver *ns;
struct task *t;
/* Check if we can create the socket with nameservers info */
list_for_each_entry(ns, &resolvers->nameservers, list) {
struct dgram_conn *dgram = NULL;
int fd;
/* Check nameserver info */
if ((fd = socket(ns->addr.ss_family, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
ha_alert("config : resolvers '%s': can't create socket for nameserver '%s'.\n",
resolvers->id, ns->id);
err_code |= (ERR_ALERT|ERR_ABORT);
continue;
}
if (connect(fd, (struct sockaddr*)&ns->addr, get_addr_len(&ns->addr)) == -1) {
ha_alert("config : resolvers '%s': can't connect socket for nameserver '%s'.\n",
resolvers->id, ns->id);
close(fd);
err_code |= (ERR_ALERT|ERR_ABORT);
continue;
}
close(fd);
/* Create dgram structure that will hold the UPD socket
* and attach it on the current nameserver */
if ((dgram = calloc(1, sizeof(*dgram))) == NULL) {
ha_alert("config: resolvers '%s' : out of memory.\n",
resolvers->id);
err_code |= (ERR_ALERT|ERR_ABORT);
goto err;
}
/* Leave dgram partially initialized, no FD attached for
* now. */
dgram->owner = ns;
dgram->data = &resolve_dgram_cb;
dgram->t.sock.fd = -1;
ns->dgram = dgram;
}
/* Create the task associated to the resolvers section */
if ((t = task_new(MAX_THREADS_MASK)) == NULL) {
ha_alert("config : resolvers '%s' : out of memory.\n", resolvers->id);
err_code |= (ERR_ALERT|ERR_ABORT);
goto err;
}
/* Update task's parameters */
t->process = dns_process_resolvers;
t->context = resolvers;
resolvers->t = t;
task_wakeup(t, TASK_WOKEN_INIT);
}
for (px = proxies_list; px; px = px->next) {
struct server *srv;
for (srv = px->srv; srv; srv = srv->next) {
struct dns_resolvers *resolvers;
if (!srv->resolvers_id)
continue;
if ((resolvers = find_resolvers_by_id(srv->resolvers_id)) == NULL) {
ha_alert("config : %s '%s', server '%s': unable to find required resolvers '%s'\n",
proxy_type_str(px), px->id, srv->id, srv->resolvers_id);
err_code |= (ERR_ALERT|ERR_ABORT);
continue;
}
srv->resolvers = resolvers;
if (srv->srvrq && !srv->srvrq->resolvers) {
srv->srvrq->resolvers = srv->resolvers;
if (dns_link_resolution(srv->srvrq, OBJ_TYPE_SRVRQ, 0) == -1) {
ha_alert("config : %s '%s' : unable to set DNS resolution for server '%s'.\n",
proxy_type_str(px), px->id, srv->id);
err_code |= (ERR_ALERT|ERR_ABORT);
continue;
}
}
if (dns_link_resolution(srv, OBJ_TYPE_SERVER, 0) == -1) {
ha_alert("config : %s '%s', unable to set DNS resolution for server '%s'.\n",
proxy_type_str(px), px->id, srv->id);
err_code |= (ERR_ALERT|ERR_ABORT);
continue;
}
}
}
if (err_code & (ERR_ALERT|ERR_ABORT))
goto err;
return err_code;
err:
dns_deinit();
return err_code;
}
| 89,351,816,692,946,900,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,348 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_free_resolution(struct dns_resolution *resolution)
{
struct dns_requester *req, *reqback;
/* clean up configuration */
dns_reset_resolution(resolution);
resolution->hostname_dn = NULL;
resolution->hostname_dn_len = 0;
list_for_each_entry_safe(req, reqback, &resolution->requesters, list) {
LIST_DEL(&req->list);
req->resolution = NULL;
}
LIST_DEL(&resolution->list);
pool_free(dns_resolution_pool, resolution);
}
| 164,699,896,954,419,920,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,349 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_get_ip_from_response(struct dns_response_packet *dns_p,
struct dns_options *dns_opts, void *currentip,
short currentip_sin_family,
void **newip, short *newip_sin_family,
void *owner)
{
struct dns_answer_item *record;
int family_priority;
int currentip_found;
unsigned char *newip4, *newip6;
int currentip_sel;
int j;
int score, max_score;
int allowed_duplicated_ip;
family_priority = dns_opts->family_prio;
allowed_duplicated_ip = dns_opts->accept_duplicate_ip;
*newip = newip4 = newip6 = NULL;
currentip_found = 0;
*newip_sin_family = AF_UNSPEC;
max_score = -1;
/* Select an IP regarding configuration preference.
* Top priority is the preferred network ip version,
* second priority is the preferred network.
* the last priority is the currently used IP,
*
* For these three priorities, a score is calculated. The
* weight are:
* 8 - preferred ip version.
* 4 - preferred network.
* 2 - if the ip in the record is not affected to any other server in the same backend (duplication)
* 1 - current ip.
* The result with the biggest score is returned.
*/
list_for_each_entry(record, &dns_p->answer_list, list) {
void *ip;
unsigned char ip_type;
if (record->type == DNS_RTYPE_A) {
ip = &(((struct sockaddr_in *)&record->address)->sin_addr);
ip_type = AF_INET;
}
else if (record->type == DNS_RTYPE_AAAA) {
ip_type = AF_INET6;
ip = &(((struct sockaddr_in6 *)&record->address)->sin6_addr);
}
else
continue;
score = 0;
/* Check for preferred ip protocol. */
if (ip_type == family_priority)
score += 8;
/* Check for preferred network. */
for (j = 0; j < dns_opts->pref_net_nb; j++) {
/* Compare only the same adresses class. */
if (dns_opts->pref_net[j].family != ip_type)
continue;
if ((ip_type == AF_INET &&
in_net_ipv4(ip,
&dns_opts->pref_net[j].mask.in4,
&dns_opts->pref_net[j].addr.in4)) ||
(ip_type == AF_INET6 &&
in_net_ipv6(ip,
&dns_opts->pref_net[j].mask.in6,
&dns_opts->pref_net[j].addr.in6))) {
score += 4;
break;
}
}
/* Check if the IP found in the record is already affected to a
* member of a group. If not, the score should be incremented
* by 2. */
if (owner && snr_check_ip_callback(owner, ip, &ip_type)) {
if (!allowed_duplicated_ip) {
continue;
}
} else {
score += 2;
}
/* Check for current ip matching. */
if (ip_type == currentip_sin_family &&
((currentip_sin_family == AF_INET &&
!memcmp(ip, currentip, 4)) ||
(currentip_sin_family == AF_INET6 &&
!memcmp(ip, currentip, 16)))) {
score++;
currentip_sel = 1;
}
else
currentip_sel = 0;
/* Keep the address if the score is better than the previous
* score. The maximum score is 15, if this value is reached, we
* break the parsing. Implicitly, this score is reached the ip
* selected is the current ip. */
if (score > max_score) {
if (ip_type == AF_INET)
newip4 = ip;
else
newip6 = ip;
currentip_found = currentip_sel;
if (score == 15)
return DNS_UPD_NO;
max_score = score;
}
} /* list for each record entries */
/* No IP found in the response */
if (!newip4 && !newip6)
return DNS_UPD_NO_IP_FOUND;
/* Case when the caller looks first for an IPv4 address */
if (family_priority == AF_INET) {
if (newip4) {
*newip = newip4;
*newip_sin_family = AF_INET;
}
else if (newip6) {
*newip = newip6;
*newip_sin_family = AF_INET6;
}
if (!currentip_found)
goto not_found;
}
/* Case when the caller looks first for an IPv6 address */
else if (family_priority == AF_INET6) {
if (newip6) {
*newip = newip6;
*newip_sin_family = AF_INET6;
}
else if (newip4) {
*newip = newip4;
*newip_sin_family = AF_INET;
}
if (!currentip_found)
goto not_found;
}
/* Case when the caller have no preference (we prefer IPv6) */
else if (family_priority == AF_UNSPEC) {
if (newip6) {
*newip = newip6;
*newip_sin_family = AF_INET6;
}
else if (newip4) {
*newip = newip4;
*newip_sin_family = AF_INET;
}
if (!currentip_found)
goto not_found;
}
/* No reason why we should change the server's IP address */
return DNS_UPD_NO;
not_found:
list_for_each_entry(record, &dns_p->answer_list, list) {
/* Move the first record to the end of the list, for internal
* round robin */
LIST_DEL(&record->list);
LIST_ADDQ(&dns_p->answer_list, &record->list);
break;
}
return DNS_UPD_SRVIP_NOT_FOUND;
}
| 80,512,598,506,839,600,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,350 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_hostname_validation(const char *string, char **err)
{
const char *c, *d;
int i;
if (strlen(string) > DNS_MAX_NAME_SIZE) {
if (err)
*err = DNS_TOO_LONG_FQDN;
return 0;
}
c = string;
while (*c) {
d = c;
i = 0;
while (*d != '.' && *d && i <= DNS_MAX_LABEL_SIZE) {
i++;
if (!((*d == '-') || (*d == '_') ||
((*d >= 'a') && (*d <= 'z')) ||
((*d >= 'A') && (*d <= 'Z')) ||
((*d >= '0') && (*d <= '9')))) {
if (err)
*err = DNS_INVALID_CHARACTER;
return 0;
}
d++;
}
if ((i >= DNS_MAX_LABEL_SIZE) && (d[i] != '.')) {
if (err)
*err = DNS_LABEL_TOO_LONG;
return 0;
}
if (*d == '\0')
goto out;
c = ++d;
}
out:
return 1;
}
| 321,979,582,100,669,100,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,351 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_link_resolution(void *requester, int requester_type, int requester_locked)
{
struct dns_resolution *res = NULL;
struct dns_requester *req;
struct dns_resolvers *resolvers;
struct server *srv = NULL;
struct dns_srvrq *srvrq = NULL;
char **hostname_dn;
int hostname_dn_len, query_type;
switch (requester_type) {
case OBJ_TYPE_SERVER:
srv = (struct server *)requester;
hostname_dn = &srv->hostname_dn;
hostname_dn_len = srv->hostname_dn_len;
resolvers = srv->resolvers;
query_type = ((srv->dns_opts.family_prio == AF_INET)
? DNS_RTYPE_A
: DNS_RTYPE_AAAA);
break;
case OBJ_TYPE_SRVRQ:
srvrq = (struct dns_srvrq *)requester;
hostname_dn = &srvrq->hostname_dn;
hostname_dn_len = srvrq->hostname_dn_len;
resolvers = srvrq->resolvers;
query_type = DNS_RTYPE_SRV;
break;
default:
goto err;
}
/* Get a resolution from the resolvers' wait queue or pool */
if ((res = dns_pick_resolution(resolvers, hostname_dn, hostname_dn_len, query_type)) == NULL)
goto err;
if (srv) {
if (!requester_locked)
HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
if (srv->dns_requester == NULL) {
if ((req = calloc(1, sizeof(*req))) == NULL) {
if (!requester_locked)
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
goto err;
}
req->owner = &srv->obj_type;
srv->dns_requester = req;
}
else
req = srv->dns_requester;
if (!requester_locked)
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
}
else if (srvrq) {
if (srvrq->dns_requester == NULL) {
if ((req = calloc(1, sizeof(*req))) == NULL)
goto err;
req->owner = &srvrq->obj_type;
srvrq->dns_requester = req;
}
else
req = srvrq->dns_requester;
}
else
goto err;
req->resolution = res;
req->requester_cb = snr_resolution_cb;
req->requester_error_cb = snr_resolution_error_cb;
LIST_ADDQ(&res->requesters, &req->list);
return 0;
err:
if (res && LIST_ISEMPTY(&res->requesters))
dns_free_resolution(res);
return -1;
}
| 178,777,429,140,660,130,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,352 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static struct dns_resolution *dns_pick_resolution(struct dns_resolvers *resolvers,
char **hostname_dn, int hostname_dn_len,
int query_type)
{
struct dns_resolution *res;
if (!*hostname_dn)
goto from_pool;
/* Search for same hostname and query type in resolutions.curr */
list_for_each_entry(res, &resolvers->resolutions.curr, list) {
if (!res->hostname_dn)
continue;
if ((query_type == res->prefered_query_type) &&
hostname_dn_len == res->hostname_dn_len &&
!memcmp(*hostname_dn, res->hostname_dn, hostname_dn_len))
return res;
}
/* Search for same hostname and query type in resolutions.wait */
list_for_each_entry(res, &resolvers->resolutions.wait, list) {
if (!res->hostname_dn)
continue;
if ((query_type == res->prefered_query_type) &&
hostname_dn_len == res->hostname_dn_len &&
!memcmp(*hostname_dn, res->hostname_dn, hostname_dn_len))
return res;
}
from_pool:
/* No resolution could be found, so let's allocate a new one */
res = pool_alloc(dns_resolution_pool);
if (res) {
memset(res, 0, sizeof(*res));
res->resolvers = resolvers;
res->uuid = resolution_uuid;
res->status = RSLV_STATUS_NONE;
res->step = RSLV_STEP_NONE;
res->last_valid = now_ms;
LIST_INIT(&res->requesters);
LIST_INIT(&res->response.answer_list);
res->prefered_query_type = query_type;
res->query_type = query_type;
res->hostname_dn = *hostname_dn;
res->hostname_dn_len = hostname_dn_len;
++resolution_uuid;
/* Move the resolution to the resolvers wait queue */
LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
}
return res;
}
| 253,904,624,247,826,500,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,353 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static struct task *dns_process_resolvers(struct task *t, void *context, unsigned short state)
{
struct dns_resolvers *resolvers = context;
struct dns_resolution *res, *resback;
int exp;
HA_SPIN_LOCK(DNS_LOCK, &resolvers->lock);
/* Handle all expired resolutions from the active list */
list_for_each_entry_safe(res, resback, &resolvers->resolutions.curr, list) {
/* When we find the first resolution in the future, then we can
* stop here */
exp = tick_add(res->last_query, resolvers->timeout.retry);
if (!tick_is_expired(exp, now_ms))
break;
/* If current resolution has been tried too many times and
* finishes in timeout we update its status and remove it from
* the list */
if (!res->try) {
struct dns_requester *req;
/* Notify the result to the requesters */
if (!res->nb_responses)
res->status = RSLV_STATUS_TIMEOUT;
list_for_each_entry(req, &res->requesters, list)
req->requester_error_cb(req, res->status);
/* Clean up resolution info and remove it from the
* current list */
dns_reset_resolution(res);
LIST_DEL(&res->list);
LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
}
else {
/* Otherwise resend the DNS query and requeue the resolution */
if (!res->nb_responses || res->prefered_query_type != res->query_type) {
/* No response received (a real timeout) or fallback already done */
res->query_type = res->prefered_query_type;
res->try--;
}
else {
/* Fallback from A to AAAA or the opposite and re-send
* the resolution immediately. try counter is not
* decremented. */
if (res->prefered_query_type == DNS_RTYPE_A)
res->query_type = DNS_RTYPE_AAAA;
else if (res->prefered_query_type == DNS_RTYPE_AAAA)
res->query_type = DNS_RTYPE_A;
else
res->try--;
}
dns_send_query(res);
}
}
/* Handle all resolutions in the wait list */
list_for_each_entry_safe(res, resback, &resolvers->resolutions.wait, list) {
exp = tick_add(res->last_resolution, dns_resolution_timeout(res));
if (tick_isset(res->last_resolution) && !tick_is_expired(exp, now_ms))
continue;
if (dns_run_resolution(res) != 1) {
res->last_resolution = now_ms;
LIST_DEL(&res->list);
LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
}
}
dns_update_resolvers_timeout(resolvers);
HA_SPIN_UNLOCK(DNS_LOCK, &resolvers->lock);
return t;
}
| 167,371,127,668,923,310,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,354 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_read_name(unsigned char *buffer, unsigned char *bufend,
unsigned char *name, char *destination, int dest_len,
int *offset, unsigned int depth)
{
int nb_bytes = 0, n = 0;
int label_len;
unsigned char *reader = name;
char *dest = destination;
while (1) {
if (reader >= bufend)
goto err;
/* Name compression is in use */
if ((*reader & 0xc0) == 0xc0) {
if (reader + 1 >= bufend)
goto err;
/* Must point BEFORE current position */
if ((buffer + reader[1]) > reader)
goto err;
if (depth++ > 100)
goto err;
n = dns_read_name(buffer, bufend, buffer + reader[1],
dest, dest_len - nb_bytes, offset, depth);
if (n == 0)
goto err;
dest += n;
nb_bytes += n;
goto out;
}
label_len = *reader;
if (label_len == 0)
goto out;
/* Check if:
* - we won't read outside the buffer
* - there is enough place in the destination
*/
if ((reader + label_len >= bufend) || (nb_bytes + label_len >= dest_len))
goto err;
/* +1 to take label len + label string */
label_len++;
memcpy(dest, reader, label_len);
dest += label_len;
nb_bytes += label_len;
reader += label_len;
}
out:
/* offset computation:
* parse from <name> until finding either NULL or a pointer "c0xx"
*/
reader = name;
*offset = 0;
while (reader < bufend) {
if ((reader[0] & 0xc0) == 0xc0) {
*offset += 2;
break;
}
else if (*reader == 0) {
*offset += 1;
break;
}
*offset += 1;
++reader;
}
return nb_bytes;
err:
return 0;
}
| 265,458,403,725,355,930,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,355 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | static void dns_resolve_recv(struct dgram_conn *dgram)
{
struct dns_nameserver *ns, *tmpns;
struct dns_resolvers *resolvers;
struct dns_resolution *res;
struct dns_query_item *query;
unsigned char buf[DNS_MAX_UDP_MESSAGE + 1];
unsigned char *bufend;
int fd, buflen, dns_resp;
int max_answer_records;
unsigned short query_id;
struct eb32_node *eb;
struct dns_requester *req;
fd = dgram->t.sock.fd;
/* check if ready for reading */
if (!fd_recv_ready(fd))
return;
/* no need to go further if we can't retrieve the nameserver */
if ((ns = dgram->owner) == NULL)
return;
resolvers = ns->resolvers;
HA_SPIN_LOCK(DNS_LOCK, &resolvers->lock);
/* process all pending input messages */
while (1) {
/* read message received */
memset(buf, '\0', resolvers->accepted_payload_size + 1);
if ((buflen = recv(fd, (char*)buf , resolvers->accepted_payload_size + 1, 0)) < 0) {
/* FIXME : for now we consider EAGAIN only */
fd_cant_recv(fd);
break;
}
/* message too big */
if (buflen > resolvers->accepted_payload_size) {
ns->counters.too_big++;
continue;
}
/* initializing variables */
bufend = buf + buflen; /* pointer to mark the end of the buffer */
/* read the query id from the packet (16 bits) */
if (buf + 2 > bufend) {
ns->counters.invalid++;
continue;
}
query_id = dns_response_get_query_id(buf);
/* search the query_id in the pending resolution tree */
eb = eb32_lookup(&resolvers->query_ids, query_id);
if (eb == NULL) {
/* unknown query id means an outdated response and can be safely ignored */
ns->counters.outdated++;
continue;
}
/* known query id means a resolution in prgress */
res = eb32_entry(eb, struct dns_resolution, qid);
if (!res) {
ns->counters.outdated++;
continue;
}
/* number of responses received */
res->nb_responses++;
max_answer_records = (resolvers->accepted_payload_size - DNS_HEADER_SIZE) / DNS_MIN_RECORD_SIZE;
dns_resp = dns_validate_dns_response(buf, bufend, res, max_answer_records);
switch (dns_resp) {
case DNS_RESP_VALID:
break;
case DNS_RESP_INVALID:
case DNS_RESP_QUERY_COUNT_ERROR:
case DNS_RESP_WRONG_NAME:
res->status = RSLV_STATUS_INVALID;
ns->counters.invalid++;
break;
case DNS_RESP_NX_DOMAIN:
res->status = RSLV_STATUS_NX;
ns->counters.nx++;
break;
case DNS_RESP_REFUSED:
res->status = RSLV_STATUS_REFUSED;
ns->counters.refused++;
break;
case DNS_RESP_ANCOUNT_ZERO:
res->status = RSLV_STATUS_OTHER;
ns->counters.any_err++;
break;
case DNS_RESP_CNAME_ERROR:
res->status = RSLV_STATUS_OTHER;
ns->counters.cname_error++;
break;
case DNS_RESP_TRUNCATED:
res->status = RSLV_STATUS_OTHER;
ns->counters.truncated++;
break;
case DNS_RESP_NO_EXPECTED_RECORD:
case DNS_RESP_ERROR:
case DNS_RESP_INTERNAL:
res->status = RSLV_STATUS_OTHER;
ns->counters.other++;
break;
}
/* Wait all nameservers response to handle errors */
if (dns_resp != DNS_RESP_VALID && res->nb_responses < resolvers->nb_nameservers)
continue;
/* Process error codes */
if (dns_resp != DNS_RESP_VALID) {
if (res->prefered_query_type != res->query_type) {
/* The fallback on the query type was already performed,
* so check the try counter. If it falls to 0, we can
* report an error. Else, wait the next attempt. */
if (!res->try)
goto report_res_error;
}
else {
/* Fallback from A to AAAA or the opposite and re-send
* the resolution immediately. try counter is not
* decremented. */
if (res->prefered_query_type == DNS_RTYPE_A) {
res->query_type = DNS_RTYPE_AAAA;
dns_send_query(res);
}
else if (res->prefered_query_type == DNS_RTYPE_AAAA) {
res->query_type = DNS_RTYPE_A;
dns_send_query(res);
}
}
continue;
}
/* Now let's check the query's dname corresponds to the one we
* sent. We can check only the first query of the list. We send
* one query at a time so we get one query in the response */
query = LIST_NEXT(&res->response.query_list, struct dns_query_item *, list);
if (query && memcmp(query->name, res->hostname_dn, res->hostname_dn_len) != 0) {
dns_resp = DNS_RESP_WRONG_NAME;
ns->counters.other++;
goto report_res_error;
}
/* So the resolution succeeded */
res->status = RSLV_STATUS_VALID;
res->last_valid = now_ms;
ns->counters.valid++;
goto report_res_success;
report_res_error:
list_for_each_entry(req, &res->requesters, list)
req->requester_error_cb(req, dns_resp);
dns_reset_resolution(res);
LIST_DEL(&res->list);
LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
continue;
report_res_success:
/* Only the 1rst requester s managed by the server, others are
* from the cache */
tmpns = ns;
list_for_each_entry(req, &res->requesters, list) {
struct server *s = objt_server(req->owner);
if (s)
HA_SPIN_LOCK(SERVER_LOCK, &s->lock);
req->requester_cb(req, tmpns);
if (s)
HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
tmpns = NULL;
}
dns_reset_resolution(res);
LIST_DEL(&res->list);
LIST_ADDQ(&resolvers->resolutions.wait, &res->list);
continue;
}
dns_update_resolvers_timeout(resolvers);
HA_SPIN_UNLOCK(DNS_LOCK, &resolvers->lock);
}
| 332,513,099,847,586,200,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,356 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | int dns_str_to_dn_label(const char *str, int str_len, char *dn, int dn_len)
{
int i, offset;
if (dn_len < str_len + 1)
return -1;
/* First byte of dn will be used to store the length of the first
* label */
offset = 0;
for (i = 0; i < str_len; ++i) {
if (str[i] == '.') {
/* 2 or more consecutive dots is invalid */
if (i == offset)
return -1;
dn[offset] = (i - offset);
offset = i+1;
continue;
}
dn[i+1] = str[i];
}
dn[offset] = (i - offset - 1);
dn[i] = '\0';
return i;
}
| 31,956,296,095,874,720,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,357 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | void dns_unlink_resolution(struct dns_requester *requester)
{
struct dns_resolution *res;
struct dns_requester *req;
/* Nothing to do */
if (!requester || !requester->resolution)
return;
res = requester->resolution;
/* Clean up the requester */
LIST_DEL(&requester->list);
requester->resolution = NULL;
/* We need to find another requester linked on this resolution */
if (!LIST_ISEMPTY(&res->requesters))
req = LIST_NEXT(&res->requesters, struct dns_requester *, list);
else {
dns_free_resolution(res);
return;
}
/* Move hostname_dn related pointers to the next requester */
switch (obj_type(req->owner)) {
case OBJ_TYPE_SERVER:
res->hostname_dn = __objt_server(req->owner)->hostname_dn;
res->hostname_dn_len = __objt_server(req->owner)->hostname_dn_len;
break;
case OBJ_TYPE_SRVRQ:
res->hostname_dn = __objt_dns_srvrq(req->owner)->hostname_dn;
res->hostname_dn_len = __objt_dns_srvrq(req->owner)->hostname_dn_len;
break;
default:
res->hostname_dn = NULL;
res->hostname_dn_len = 0;
break;
}
}
| 218,606,860,309,032,950,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,358 | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | https://github.com/haproxy/haproxy | https://git.haproxy.org/?p=haproxy.git;a=commit;h=efbbdf72992cd20458259962346044cafd9331c0 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly accessing anything that was left on the stack,
or even past the end of the 8193-byte buffer, depending on the
value of accepted_payload_size.
To be backported to 1.8, probably also 1.7. | 0 | struct dns_srvrq *new_dns_srvrq(struct server *srv, char *fqdn)
{
struct proxy *px = srv->proxy;
struct dns_srvrq *srvrq = NULL;
int fqdn_len, hostname_dn_len;
fqdn_len = strlen(fqdn);
hostname_dn_len = dns_str_to_dn_label(fqdn, fqdn_len + 1, trash.area,
trash.size);
if (hostname_dn_len == -1) {
ha_alert("config : %s '%s', server '%s': failed to parse FQDN '%s'\n",
proxy_type_str(px), px->id, srv->id, fqdn);
goto err;
}
if ((srvrq = calloc(1, sizeof(*srvrq))) == NULL) {
ha_alert("config : %s '%s', server '%s': out of memory\n",
proxy_type_str(px), px->id, srv->id);
goto err;
}
srvrq->obj_type = OBJ_TYPE_SRVRQ;
srvrq->proxy = px;
srvrq->name = strdup(fqdn);
srvrq->hostname_dn = strdup(trash.area);
srvrq->hostname_dn_len = hostname_dn_len;
if (!srvrq->name || !srvrq->hostname_dn) {
ha_alert("config : %s '%s', server '%s': out of memory\n",
proxy_type_str(px), px->id, srv->id);
goto err;
}
LIST_ADDQ(&dns_srvrq_list, &srvrq->list);
return srvrq;
err:
if (srvrq) {
free(srvrq->name);
free(srvrq->hostname_dn);
free(srvrq);
}
return NULL;
}
| 328,006,933,771,125,950,000,000,000,000,000,000,000 | dns.c | 236,538,834,078,240,930,000,000,000,000,000,000,000 | [
"CWE-125"
] | CVE-2018-20102 | An out-of-bounds read in dns_validate_dns_response in dns.c was discovered in HAProxy through 1.8.14. Due to a missing check when validating DNS responses, remote attackers might be able read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly accessing anything that was left on the stack, or even past the end of the 8193-byte buffer, depending on the value of accepted_payload_size. | https://nvd.nist.gov/vuln/detail/CVE-2018-20102 |
11,373 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | _poppler_page_new (PopplerDocument *document, Page *page, int index)
{
PopplerPage *poppler_page;
g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, NULL, NULL);
poppler_page->document = (PopplerDocument *) g_object_ref (document);
poppler_page->page = page;
poppler_page->index = index;
return poppler_page;
}
| 103,452,768,581,550,370,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,374 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | _poppler_page_render_to_pixbuf (PopplerPage *page,
int src_x, int src_y,
int src_width, int src_height,
double scale,
int rotation,
GBool printing,
GdkPixbuf *pixbuf)
{
OutputDevData data;
poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data);
page->page->displaySlice(page->document->output_dev,
72.0 * scale, 72.0 * scale,
rotation,
gFalse, /* useMediaBox */
gTrue, /* Crop */
src_x, src_y,
src_width, src_height,
printing,
page->document->doc->getCatalog (),
NULL, NULL,
printing ? poppler_print_annot_cb : NULL, NULL);
poppler_page_copy_to_pixbuf (page, pixbuf, &data);
}
| 239,169,173,080,203,250,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,375 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
unsigned char *data,
GdkPixbuf *pixbuf)
{
int cairo_width, cairo_height, cairo_rowstride;
unsigned char *pixbuf_data, *dst, *cairo_data;
int pixbuf_rowstride, pixbuf_n_channels;
unsigned int *src;
int x, y;
cairo_width = cairo_image_surface_get_width (surface);
cairo_height = cairo_image_surface_get_height (surface);
cairo_rowstride = cairo_width * 4;
cairo_data = data;
pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
if (cairo_width > gdk_pixbuf_get_width (pixbuf))
cairo_width = gdk_pixbuf_get_width (pixbuf);
if (cairo_height > gdk_pixbuf_get_height (pixbuf))
cairo_height = gdk_pixbuf_get_height (pixbuf);
for (y = 0; y < cairo_height; y++)
{
src = (unsigned int *) (cairo_data + y * cairo_rowstride);
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < cairo_width; x++)
{
dst[0] = (*src >> 16) & 0xff;
dst[1] = (*src >> 8) & 0xff;
dst[2] = (*src >> 0) & 0xff;
if (pixbuf_n_channels == 4)
dst[3] = (*src >> 24) & 0xff;
dst += pixbuf_n_channels;
src++;
}
}
}
| 217,756,926,742,718,300,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,376 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | image_draw_decide_cb (int image_id, void *data)
{
return (image_id == GPOINTER_TO_INT (data));
}
| 161,826,047,759,163,780,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,377 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_annot_mapping_copy (PopplerAnnotMapping *mapping)
{
PopplerAnnotMapping *new_mapping;
new_mapping = poppler_annot_mapping_new ();
*new_mapping = *mapping;
if (mapping->annot)
new_mapping->annot = (PopplerAnnot *) g_object_ref (mapping->annot);
return new_mapping;
}
| 301,692,906,750,872,900,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,378 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_annot_mapping_free (PopplerAnnotMapping *mapping)
{
if (!mapping)
return;
if (mapping->annot)
g_object_unref (mapping->annot);
g_free (mapping);
}
| 114,207,947,152,702,400,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,379 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_annot_mapping_new (void)
{
return (PopplerAnnotMapping *) g_new0 (PopplerAnnotMapping, 1);
}
| 282,630,087,210,986,230,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,380 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_color_copy (PopplerColor *color)
{
PopplerColor *new_color;
new_color = g_new (PopplerColor, 1);
*new_color = *color;
return new_color;
}
| 258,940,643,336,806,040,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,381 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_color_free (PopplerColor *color)
{
g_free (color);
}
| 321,335,835,554,151,300,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,382 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_color_new (void)
{
return (PopplerColor *) g_new0 (PopplerColor, 1);
}
| 28,490,427,181,767,060,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,383 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_form_field_mapping_free (PopplerFormFieldMapping *mapping)
{
if (!mapping)
return;
if (mapping->field)
g_object_unref (mapping->field);
g_free (mapping);
}
| 119,023,651,473,982,670,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,384 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_form_field_mapping_new (void)
{
return (PopplerFormFieldMapping *) g_new0 (PopplerFormFieldMapping, 1);
}
| 86,164,071,927,244,150,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,385 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_image_mapping_copy (PopplerImageMapping *mapping)
{
PopplerImageMapping *new_mapping;
new_mapping = poppler_image_mapping_new ();
*new_mapping = *mapping;
return new_mapping;
}
| 4,679,888,462,259,993,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,386 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_image_mapping_free (PopplerImageMapping *mapping)
{
g_free (mapping);
}
| 224,183,035,139,796,370,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,387 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_image_mapping_new (void)
{
return (PopplerImageMapping *) g_new0 (PopplerImageMapping, 1);
}
| 27,350,145,570,051,434,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,388 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_link_mapping_copy (PopplerLinkMapping *mapping)
{
PopplerLinkMapping *new_mapping;
new_mapping = poppler_link_mapping_new ();
*new_mapping = *mapping;
if (new_mapping->action)
new_mapping->action = poppler_action_copy (new_mapping->action);
return new_mapping;
}
| 78,590,653,903,699,770,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,389 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_link_mapping_free (PopplerLinkMapping *mapping)
{
if (mapping->action)
poppler_action_free (mapping->action);
g_free (mapping);
}
| 29,494,524,629,313,396,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,390 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_link_mapping_new (void)
{
return (PopplerLinkMapping *) g_new0 (PopplerLinkMapping, 1);
}
| 40,148,469,825,309,050,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,391 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_mapping_free (PopplerLinkMapping *mapping)
{
poppler_action_free (mapping->action);
g_free (mapping);
}
| 192,856,576,356,607,200,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,392 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_class_init (PopplerPageClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *pspec;
gobject_class->finalize = poppler_page_finalize;
gobject_class->get_property = poppler_page_get_property;
pspec = g_param_spec_string ("label",
"Page Label",
"The label of the page",
NULL,
G_PARAM_READABLE);
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_LABEL,
pspec);
}
| 248,701,039,295,976,680,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,393 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_copy_to_pixbuf(PopplerPage *page,
GdkPixbuf *pixbuf,
OutputDevData *data)
{
SplashOutputDev *output_dev;
SplashBitmap *bitmap;
SplashColorPtr color_ptr;
int splash_width, splash_height, splash_rowstride;
int pixbuf_rowstride, pixbuf_n_channels;
guchar *pixbuf_data, *dst;
int x, y;
output_dev = page->document->output_dev;
bitmap = output_dev->getBitmap ();
color_ptr = bitmap->getDataPtr ();
splash_width = bitmap->getWidth ();
splash_height = bitmap->getHeight ();
splash_rowstride = bitmap->getRowSize ();
pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
if (splash_width > gdk_pixbuf_get_width (pixbuf))
splash_width = gdk_pixbuf_get_width (pixbuf);
if (splash_height > gdk_pixbuf_get_height (pixbuf))
splash_height = gdk_pixbuf_get_height (pixbuf);
SplashColorPtr pixel = new Guchar[4];
for (y = 0; y < splash_height; y++)
{
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < splash_width; x++)
{
output_dev->getBitmap()->getPixel(x, y, pixel);
dst[0] = pixel[0];
dst[1] = pixel[1];
dst[2] = pixel[2];
if (pixbuf_n_channels == 4)
dst[3] = 0xff;
dst += pixbuf_n_channels;
}
}
delete [] pixel;
}
| 20,322,896,493,496,028,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,394 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_finalize (GObject *object)
{
PopplerPage *page = POPPLER_PAGE (object);
g_object_unref (page->document);
page->document = NULL;
if (page->annots != NULL)
delete page->annots;
#if defined (HAVE_CAIRO)
if (page->text != NULL)
page->text->decRefCnt();
#else
if (page->gfx != NULL)
delete page->gfx;
if (page->text_dev != NULL)
delete page->text_dev;
#endif
/* page->page is owned by the document */
}
| 146,326,674,166,001,930,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,395 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_find_text (PopplerPage *page,
const char *text)
{
PopplerRectangle *match;
GList *matches;
double xMin, yMin, xMax, yMax;
gunichar *ucs4;
glong ucs4_len;
double height;
#if defined (HAVE_CAIRO)
TextPage *text_dev;
#else
TextOutputDev *text_dev;
#endif
g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
g_return_val_if_fail (text != NULL, FALSE);
#if defined (HAVE_CAIRO)
text_dev = poppler_page_get_text_page (page);
#else
text_dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse);
page->page->display (text_dev, 72, 72, 0,
gFalse, gTrue, gFalse,
page->document->doc->getCatalog());
#endif
ucs4 = g_utf8_to_ucs4_fast (text, -1, &ucs4_len);
poppler_page_get_size (page, NULL, &height);
matches = NULL;
xMin = 0;
yMin = 0;
while (text_dev->findText (ucs4, ucs4_len,
gFalse, gTrue, // startAtTop, stopAtBottom
gTrue, gFalse, // startAtLast, stopAtLast
gFalse, gFalse, // caseSensitive, backwards
&xMin, &yMin, &xMax, &yMax))
{
match = g_new (PopplerRectangle, 1);
match->x1 = xMin;
match->y1 = height - yMax;
match->x2 = xMax;
match->y2 = height - yMin;
matches = g_list_prepend (matches, match);
}
#if !defined (HAVE_CAIRO)
delete text_dev;
#endif
g_free (ucs4);
return g_list_reverse (matches);
}
| 58,373,213,448,697,590,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,396 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_free_annot_mapping (GList *list)
{
if (!list)
return;
g_list_foreach (list, (GFunc)poppler_annot_mapping_free, NULL);
g_list_free (list);
}
| 295,873,926,565,590,630,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,397 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_free_form_field_mapping (GList *list)
{
if (list == NULL)
return;
g_list_foreach (list, (GFunc) poppler_form_field_mapping_free, NULL);
g_list_free (list);
}
| 13,393,342,472,769,492,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,398 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_free_image_mapping (GList *list)
{
if (list == NULL)
return;
g_list_foreach (list, (GFunc)g_free, NULL);
g_list_free (list);
}
| 252,152,134,513,609,350,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,399 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_free_image_mapping (GList *list)
{
}
| 134,607,403,432,497,780,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,400 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_free_link_mapping (GList *list)
{
if (list == NULL)
return;
g_list_foreach (list, (GFunc) (poppler_mapping_free), NULL);
g_list_free (list);
}
| 12,368,554,591,861,512,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,401 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_annot_mapping (PopplerPage *page)
{
GList *map_list = NULL;
double width, height;
gint i;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
if (!page->annots)
page->annots = page->page->getAnnots (page->document->doc->getCatalog ());
if (!page->annots)
return NULL;
poppler_page_get_size (page, &width, &height);
for (i = 0; i < page->annots->getNumAnnots (); i++) {
PopplerAnnotMapping *mapping;
PopplerRectangle rect;
Annot *annot;
PDFRectangle *annot_rect;
gint rotation = 0;
annot = page->annots->getAnnot (i);
/* Create the mapping */
mapping = poppler_annot_mapping_new ();
switch (annot->getType ())
{
case Annot::typeText:
mapping->annot = _poppler_annot_text_new (annot);
break;
case Annot::typeFreeText:
mapping->annot = _poppler_annot_free_text_new (annot);
break;
default:
mapping->annot = _poppler_annot_new (annot);
break;
}
annot_rect = annot->getRect ();
rect.x1 = annot_rect->x1;
rect.y1 = annot_rect->y1;
rect.x2 = annot_rect->x2;
rect.y2 = annot_rect->y2;
if (! (annot->getFlags () & Annot::flagNoRotate))
rotation = page->page->getRotate ();
switch (rotation)
{
case 90:
mapping->area.x1 = rect.y1;
mapping->area.y1 = height - rect.x2;
mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
break;
case 180:
mapping->area.x1 = width - rect.x2;
mapping->area.y1 = height - rect.y2;
mapping->area.x2 = mapping->area.x1 + (rect.x2 - rect.x1);
mapping->area.y2 = mapping->area.y1 + (rect.y2 - rect.y1);
break;
case 270:
mapping->area.x1 = width - rect.y2;
mapping->area.y1 = rect.x1;
mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
break;
default:
mapping->area.x1 = rect.x1;
mapping->area.y1 = rect.y1;
mapping->area.x2 = rect.x2;
mapping->area.y2 = rect.y2;
}
mapping->area.x1 -= page->page->getCropBox()->x1;
mapping->area.x2 -= page->page->getCropBox()->x1;
mapping->area.y1 -= page->page->getCropBox()->y1;
mapping->area.y2 -= page->page->getCropBox()->y1;
map_list = g_list_prepend (map_list, mapping);
}
return g_list_reverse (map_list);
}
| 190,670,642,184,431,700,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,402 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_crop_box (PopplerPage *page, PopplerRectangle *rect)
{
PDFRectangle* cropBox = page->page->getCropBox ();
rect->x1 = cropBox->x1;
rect->x2 = cropBox->x2;
rect->y1 = cropBox->y1;
rect->y2 = cropBox->y2;
}
| 151,948,820,432,038,970,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,403 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_duration (PopplerPage *page)
{
g_return_val_if_fail (POPPLER_IS_PAGE (page), -1);
return page->page->getDuration ();
}
| 242,733,315,791,125,900,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,404 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_form_field_mapping (PopplerPage *page)
{
GList *map_list = NULL;
FormPageWidgets *forms;
gint i;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
forms = page->page->getPageWidgets ();
if (forms == NULL)
return NULL;
for (i = 0; i < forms->getNumWidgets (); i++) {
PopplerFormFieldMapping *mapping;
FormWidget *field;
mapping = poppler_form_field_mapping_new ();
field = forms->getWidget (i);
mapping->field = _poppler_form_field_new (page->document, field);
field->getRect (&(mapping->area.x1), &(mapping->area.y1),
&(mapping->area.x2), &(mapping->area.y2));
mapping->area.x1 -= page->page->getCropBox()->x1;
mapping->area.x2 -= page->page->getCropBox()->x1;
mapping->area.y1 -= page->page->getCropBox()->y1;
mapping->area.y2 -= page->page->getCropBox()->y1;
map_list = g_list_prepend (map_list, mapping);
}
return map_list;
}
| 203,736,447,517,994,840,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,405 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_image (PopplerPage *page,
gint image_id)
{
CairoImageOutputDev *out;
cairo_surface_t *image;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
out = poppler_page_get_image_output_dev (page,
image_draw_decide_cb,
GINT_TO_POINTER (image_id));
if (image_id >= out->getNumImages ()) {
delete out;
return NULL;
}
image = out->getImage (image_id)->getImage ();
if (!image) {
delete out;
return NULL;
}
cairo_surface_reference (image);
delete out;
return image;
}
| 121,531,270,889,879,300,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,406 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_image_mapping (PopplerPage *page)
{
GList *map_list = NULL;
CairoImageOutputDev *out;
gint i;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
out = poppler_page_get_image_output_dev (page, NULL, NULL);
for (i = 0; i < out->getNumImages (); i++) {
PopplerImageMapping *mapping;
CairoImage *image;
image = out->getImage (i);
/* Create the mapping */
mapping = g_new (PopplerImageMapping, 1);
image->getRect (&(mapping->area.x1), &(mapping->area.y1),
&(mapping->area.x2), &(mapping->area.y2));
mapping->image_id = i;
mapping->area.x1 -= page->page->getCropBox()->x1;
mapping->area.x2 -= page->page->getCropBox()->x1;
mapping->area.y1 -= page->page->getCropBox()->y1;
mapping->area.y2 -= page->page->getCropBox()->y1;
map_list = g_list_prepend (map_list, mapping);
}
delete out;
return map_list;
}
| 5,000,966,257,629,864,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,407 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_image_mapping (PopplerPage *page)
{
return NULL;
}
| 182,150,302,472,199,000,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,408 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_image_output_dev (PopplerPage *page,
GBool (*imgDrawDeviceCbk)(int img_id, void *data),
void *imgDrawCbkData)
{
CairoImageOutputDev *image_dev;
Gfx *gfx;
image_dev = new CairoImageOutputDev ();
if (imgDrawDeviceCbk) {
image_dev->setImageDrawDecideCbk (imgDrawDeviceCbk,
imgDrawCbkData);
}
gfx = page->page->createGfx(image_dev,
72.0, 72.0, 0,
gFalse, /* useMediaBox */
gTrue, /* Crop */
-1, -1, -1, -1,
gFalse, /* printing */
page->document->doc->getCatalog (),
NULL, NULL, NULL, NULL);
page->page->display(gfx);
delete gfx;
return image_dev;
}
| 76,552,950,781,222,360,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,409 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_link_mapping (PopplerPage *page)
{
GList *map_list = NULL;
gint i;
Links *links;
Object obj;
double width, height;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
links = new Links (page->page->getAnnots (&obj),
page->document->doc->getCatalog ()->getBaseURI ());
obj.free ();
if (links == NULL)
return NULL;
poppler_page_get_size (page, &width, &height);
for (i = 0; i < links->getNumLinks (); i++)
{
PopplerLinkMapping *mapping;
PopplerRectangle rect;
LinkAction *link_action;
Link *link;
link = links->getLink (i);
link_action = link->getAction ();
/* Create the mapping */
mapping = g_new (PopplerLinkMapping, 1);
mapping->action = _poppler_action_new (page->document, link_action, NULL);
link->getRect (&rect.x1, &rect.y1, &rect.x2, &rect.y2);
switch (page->page->getRotate ())
{
case 90:
mapping->area.x1 = rect.y1;
mapping->area.y1 = height - rect.x2;
mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
break;
case 180:
mapping->area.x1 = width - rect.x2;
mapping->area.y1 = height - rect.y2;
mapping->area.x2 = mapping->area.x1 + (rect.x2 - rect.x1);
mapping->area.y2 = mapping->area.y1 + (rect.y2 - rect.y1);
break;
case 270:
mapping->area.x1 = width - rect.y2;
mapping->area.y1 = rect.x1;
mapping->area.x2 = mapping->area.x1 + (rect.y2 - rect.y1);
mapping->area.y2 = mapping->area.y1 + (rect.x2 - rect.x1);
break;
default:
mapping->area.x1 = rect.x1;
mapping->area.y1 = rect.y1;
mapping->area.x2 = rect.x2;
mapping->area.y2 = rect.y2;
}
mapping->area.x1 -= page->page->getCropBox()->x1;
mapping->area.x2 -= page->page->getCropBox()->x1;
mapping->area.y1 -= page->page->getCropBox()->y1;
mapping->area.y2 -= page->page->getCropBox()->y1;
map_list = g_list_prepend (map_list, mapping);
}
delete links;
return map_list;
}
| 85,331,103,155,009,470,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,410 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
PopplerPage *page = POPPLER_PAGE (object);
GooString label;
switch (prop_id)
{
case PROP_LABEL:
page->document->doc->getCatalog ()->indexToLabel (page->index, &label);
g_value_take_string (value, _poppler_goo_string_to_utf8(&label));
break;
}
}
| 26,468,185,100,286,787,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,411 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_selection_region (PopplerPage *page,
gdouble scale,
PopplerSelectionStyle style,
PopplerRectangle *selection)
{
PDFRectangle poppler_selection;
SelectionStyle selection_style = selectionStyleGlyph;
GooList *list;
GList *region = NULL;
int i;
poppler_selection.x1 = selection->x1;
poppler_selection.y1 = selection->y1;
poppler_selection.x2 = selection->x2;
poppler_selection.y2 = selection->y2;
switch (style)
{
case POPPLER_SELECTION_GLYPH:
selection_style = selectionStyleGlyph;
break;
case POPPLER_SELECTION_WORD:
selection_style = selectionStyleWord;
break;
case POPPLER_SELECTION_LINE:
selection_style = selectionStyleLine;
break;
}
#if defined (HAVE_CAIRO)
TextPage *text;
text = poppler_page_get_text_page (page);
list = text->getSelectionRegion(&poppler_selection,
selection_style, scale);
#else
TextOutputDev *text_dev;
text_dev = poppler_page_get_text_output_dev (page);
list = text_dev->getSelectionRegion(&poppler_selection,
selection_style, scale);
#endif
for (i = 0; i < list->getLength(); i++) {
PDFRectangle *selection_rect = (PDFRectangle *) list->get(i);
PopplerRectangle *rect;
rect = poppler_rectangle_new ();
rect->x1 = selection_rect->x1;
rect->y1 = selection_rect->y1;
rect->x2 = selection_rect->x2;
rect->y2 = selection_rect->y2;
region = g_list_prepend (region, rect);
delete selection_rect;
}
delete list;
return g_list_reverse (region);
}
| 73,262,659,489,876,890,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,412 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_size (PopplerPage *page,
double *width,
double *height)
{
double page_width, page_height;
int rotate;
g_return_if_fail (POPPLER_IS_PAGE (page));
rotate = page->page->getRotate ();
if (rotate == 90 || rotate == 270) {
page_height = page->page->getCropWidth ();
page_width = page->page->getCropHeight ();
} else {
page_width = page->page->getCropWidth ();
page_height = page->page->getCropHeight ();
}
if (width != NULL)
*width = page_width;
if (height != NULL)
*height = page_height;
}
| 227,706,901,371,355,030,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,413 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_text (PopplerPage *page,
PopplerSelectionStyle style,
PopplerRectangle *selection)
{
GooString *sel_text;
double height;
char *result;
SelectionStyle selection_style = selectionStyleGlyph;
PDFRectangle pdf_selection;
g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
g_return_val_if_fail (selection != NULL, NULL);
poppler_page_get_size (page, NULL, &height);
pdf_selection.x1 = selection->x1;
pdf_selection.y1 = height - selection->y2;
pdf_selection.x2 = selection->x2;
pdf_selection.y2 = height - selection->y1;
switch (style)
{
case POPPLER_SELECTION_GLYPH:
selection_style = selectionStyleGlyph;
break;
case POPPLER_SELECTION_WORD:
selection_style = selectionStyleWord;
break;
case POPPLER_SELECTION_LINE:
selection_style = selectionStyleLine;
break;
}
#if defined (HAVE_CAIRO)
TextPage *text;
text = poppler_page_get_text_page (page);
sel_text = text->getSelectionText (&pdf_selection, selection_style);
#else
TextOutputDev *text_dev;
text_dev = poppler_page_get_text_output_dev (page);
sel_text = text_dev->getSelectionText (&pdf_selection, selection_style);
#endif
result = g_strdup (sel_text->getCString ());
delete sel_text;
return result;
}
| 41,053,920,479,018,920,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,414 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_text_output_dev (PopplerPage *page)
{
if (page->text_dev == NULL) {
page->text_dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse);
if (page->gfx)
delete page->gfx;
page->gfx = page->page->createGfx(page->text_dev,
72.0, 72.0, 0,
gFalse, /* useMediaBox */
gTrue, /* Crop */
-1, -1, -1, -1,
gFalse, /* printing */
page->document->doc->getCatalog (),
NULL, NULL, NULL, NULL);
page->page->display(page->gfx);
page->text_dev->endPage();
}
return page->text_dev;
}
| 229,629,987,386,990,040,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,415 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_text_page (PopplerPage *page)
{
if (page->text == NULL) {
cairo_t *cr;
cairo_surface_t *surface;
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
cr = cairo_create (surface);
poppler_page_render (page, cr);
cairo_destroy (cr);
cairo_surface_destroy (surface);
}
return page->text;
}
| 148,805,590,170,753,670,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,416 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_thumbnail (PopplerPage *page)
{
unsigned char *data;
int width, height, rowstride;
cairo_surface_t *surface;
g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
if (!page->page->loadThumb (&data, &width, &height, &rowstride))
return NULL;
surface = create_surface_from_thumbnail_data (data, width, height, rowstride);
gfree (data);
return surface;
}
| 198,986,583,528,515,270,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,417 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_thumbnail_pixbuf (PopplerPage *page)
{
unsigned char *data;
int width, height, rowstride;
g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
if (!page->page->loadThumb (&data, &width, &height, &rowstride))
return NULL;
return gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB,
FALSE, 8, width, height, rowstride,
(GdkPixbufDestroyNotify)gfree, NULL);
}
| 317,026,678,024,211,130,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,418 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_thumbnail_size (PopplerPage *page,
int *width,
int *height)
{
Object thumb;
Dict *dict;
gboolean retval = FALSE;
g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
g_return_val_if_fail (width != NULL, FALSE);
g_return_val_if_fail (height != NULL, FALSE);
page->page->getThumb (&thumb);
if (!thumb.isStream ())
{
thumb.free ();
return FALSE;
}
dict = thumb.streamGetDict();
/* Theoretically, this could succeed and you would still fail when
* loading the thumb */
if (dict->lookupInt ("Width", "W", width) &&
dict->lookupInt ("Height", "H", height))
retval = TRUE;
thumb.free ();
return retval;
}
| 212,568,925,501,225,660,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,419 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_get_transition (PopplerPage *page)
{
PageTransition *trans;
PopplerPageTransition *transition;
Object obj;
g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
trans = new PageTransition (page->page->getTrans (&obj));
obj.free ();
if (!trans->isOk ()) {
delete trans;
return NULL;
}
transition = poppler_page_transition_new ();
switch (trans->getType ())
{
case transitionReplace:
transition->type = POPPLER_PAGE_TRANSITION_REPLACE;
break;
case transitionSplit:
transition->type = POPPLER_PAGE_TRANSITION_SPLIT;
break;
case transitionBlinds:
transition->type = POPPLER_PAGE_TRANSITION_BLINDS;
break;
case transitionBox:
transition->type = POPPLER_PAGE_TRANSITION_BOX;
break;
case transitionWipe:
transition->type = POPPLER_PAGE_TRANSITION_WIPE;
break;
case transitionDissolve:
transition->type = POPPLER_PAGE_TRANSITION_DISSOLVE;
break;
case transitionGlitter:
transition->type = POPPLER_PAGE_TRANSITION_GLITTER;
break;
case transitionFly:
transition->type = POPPLER_PAGE_TRANSITION_FLY;
break;
case transitionPush:
transition->type = POPPLER_PAGE_TRANSITION_PUSH;
break;
case transitionCover:
transition->type = POPPLER_PAGE_TRANSITION_COVER;
break;
case transitionUncover:
transition->type = POPPLER_PAGE_TRANSITION_UNCOVER;
break;
case transitionFade:
transition->type = POPPLER_PAGE_TRANSITION_FADE;
break;
default:
g_assert_not_reached ();
}
transition->alignment = (trans->getAlignment() == transitionHorizontal) ?
POPPLER_PAGE_TRANSITION_HORIZONTAL :
POPPLER_PAGE_TRANSITION_VERTICAL;
transition->direction = (trans->getDirection() == transitionInward) ?
POPPLER_PAGE_TRANSITION_INWARD :
POPPLER_PAGE_TRANSITION_OUTWARD;
transition->duration = trans->getDuration();
transition->angle = trans->getAngle();
transition->scale = trans->getScale();
transition->rectangular = trans->isRectangular();
delete trans;
return transition;
}
| 307,442,165,207,418,720,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,420 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_init (PopplerPage *page)
{
}
| 54,892,733,165,717,570,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,421 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_prepare_output_dev (PopplerPage *page,
double scale,
int rotation,
gboolean transparent,
OutputDevData *output_dev_data)
{
CairoOutputDev *output_dev;
cairo_surface_t *surface;
double width, height;
int cairo_width, cairo_height, cairo_rowstride, rotate;
unsigned char *cairo_data;
rotate = rotation + page->page->getRotate ();
if (rotate == 90 || rotate == 270) {
height = page->page->getCropWidth ();
width = page->page->getCropHeight ();
} else {
width = page->page->getCropWidth ();
height = page->page->getCropHeight ();
}
cairo_width = (int) ceil(width * scale);
cairo_height = (int) ceil(height * scale);
output_dev = page->document->output_dev;
cairo_rowstride = cairo_width * 4;
cairo_data = (guchar *) gmallocn (cairo_height, cairo_rowstride);
if (transparent)
memset (cairo_data, 0x00, cairo_height * cairo_rowstride);
else
memset (cairo_data, 0xff, cairo_height * cairo_rowstride);
surface = cairo_image_surface_create_for_data(cairo_data,
CAIRO_FORMAT_ARGB32,
cairo_width, cairo_height,
cairo_rowstride);
output_dev_data->cairo_data = cairo_data;
output_dev_data->surface = surface;
output_dev_data->cairo = cairo_create (surface);
output_dev->setCairo (output_dev_data->cairo);
}
| 330,869,267,907,243,950,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,422 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render (PopplerPage *page,
cairo_t *cairo)
{
g_return_if_fail (POPPLER_IS_PAGE (page));
if (!page->text)
page->text = new TextPage(gFalse);
_poppler_page_render (page, cairo, gFalse);
}
| 96,022,072,506,495,030,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,423 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render_for_printing (PopplerPage *page,
cairo_t *cairo)
{
g_return_if_fail (POPPLER_IS_PAGE (page));
_poppler_page_render (page, cairo, gTrue);
}
| 215,592,190,801,643,000,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,424 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render_selection (PopplerPage *page,
cairo_t *cairo,
PopplerRectangle *selection,
PopplerRectangle *old_selection,
PopplerSelectionStyle style,
PopplerColor *glyph_color,
PopplerColor *background_color)
{
CairoOutputDev *output_dev;
TextPage *text;
SelectionStyle selection_style = selectionStyleGlyph;
PDFRectangle pdf_selection(selection->x1, selection->y1,
selection->x2, selection->y2);
GfxColor gfx_background_color = {
{
background_color->red,
background_color->green,
background_color->blue
}
};
GfxColor gfx_glyph_color = {
{
glyph_color->red,
glyph_color->green,
glyph_color->blue
}
};
switch (style)
{
case POPPLER_SELECTION_GLYPH:
selection_style = selectionStyleGlyph;
break;
case POPPLER_SELECTION_WORD:
selection_style = selectionStyleWord;
break;
case POPPLER_SELECTION_LINE:
selection_style = selectionStyleLine;
break;
}
output_dev = page->document->output_dev;
output_dev->setCairo (cairo);
text = poppler_page_get_text_page (page);
text->drawSelection (output_dev, 1.0, 0,
&pdf_selection, selection_style,
&gfx_glyph_color, &gfx_background_color);
output_dev->setCairo (NULL);
}
| 179,813,685,967,082,580,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,425 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render_selection_to_pixbuf (PopplerPage *page,
gdouble scale,
int rotation,
GdkPixbuf *pixbuf,
PopplerRectangle *selection,
PopplerRectangle *old_selection,
PopplerSelectionStyle style,
GdkColor *glyph_color,
GdkColor *background_color)
{
OutputDev *output_dev;
OutputDevData data;
SelectionStyle selection_style = selectionStyleGlyph;
PDFRectangle pdf_selection(selection->x1, selection->y1,
selection->x2, selection->y2);
GfxColor gfx_background_color = {
{
background_color->red,
background_color->green,
background_color->blue
}
};
GfxColor gfx_glyph_color = {
{
glyph_color->red,
glyph_color->green,
glyph_color->blue
}
};
switch (style)
{
case POPPLER_SELECTION_GLYPH:
selection_style = selectionStyleGlyph;
break;
case POPPLER_SELECTION_WORD:
selection_style = selectionStyleWord;
break;
case POPPLER_SELECTION_LINE:
selection_style = selectionStyleLine;
break;
}
output_dev = page->document->output_dev;
poppler_page_prepare_output_dev (page, scale, rotation, TRUE, &data);
#if defined (HAVE_CAIRO)
TextPage *text;
text = poppler_page_get_text_page (page);
text->drawSelection (output_dev, scale, rotation,
&pdf_selection, selection_style,
&gfx_glyph_color, &gfx_background_color);
#else
TextOutputDev *text_dev;
text_dev = poppler_page_get_text_output_dev (page);
text_dev->drawSelection (output_dev, scale, rotation,
&pdf_selection, selection_style,
&gfx_glyph_color, &gfx_background_color);
/* We'll need a function to destroy page->text_dev and page->gfx
* when the application wants to get rid of them.
*
* Two improvements: 1) make GfxFont refcounted and let TextPage and
* friends hold a reference to the GfxFonts they need so we can free
* up Gfx early. 2) use a TextPage directly when rendering the page
* so we don't have to use TextOutputDev and render a second
* time. */
#endif
poppler_page_copy_to_pixbuf (page, pixbuf, &data);
poppler_page_set_selection_alpha (page, scale, pixbuf, style, selection);
}
| 259,553,581,922,897,200,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,426 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render_to_pixbuf (PopplerPage *page,
int src_x, int src_y,
int src_width, int src_height,
double scale,
int rotation,
GdkPixbuf *pixbuf)
{
g_return_if_fail (POPPLER_IS_PAGE (page));
g_return_if_fail (scale > 0.0);
g_return_if_fail (pixbuf != NULL);
_poppler_page_render_to_pixbuf (page, src_x, src_y,
src_width, src_height,
scale, rotation,
gFalse,
pixbuf);
}
| 78,190,675,890,501,520,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,427 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_render_to_ps (PopplerPage *page,
PopplerPSFile *ps_file)
{
g_return_if_fail (POPPLER_IS_PAGE (page));
g_return_if_fail (ps_file != NULL);
if (!ps_file->out)
ps_file->out = new PSOutputDev (ps_file->filename,
ps_file->document->doc->getXRef(),
ps_file->document->doc->getCatalog(),
NULL,
ps_file->first_page, ps_file->last_page,
psModePS, (int)ps_file->paper_width,
(int)ps_file->paper_height, ps_file->duplex,
0, 0, 0, 0, gFalse, gFalse);
ps_file->document->doc->displayPage (ps_file->out, page->index + 1, 72.0, 72.0,
0, gFalse, gTrue, gFalse);
}
| 117,990,100,874,064,100,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,428 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_selection_region_free (GList *region)
{
if (!region)
return;
g_list_foreach (region, (GFunc)poppler_rectangle_free, NULL);
g_list_free (region);
}
| 325,245,833,211,390,930,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,429 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_set_selection_alpha (PopplerPage *page,
double scale,
GdkPixbuf *pixbuf,
PopplerSelectionStyle style,
PopplerRectangle *selection)
{
/* Cairo doesn't need this, since cairo generates an alpha channel. */
}
| 48,734,775,105,510,745,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,430 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_set_selection_alpha (PopplerPage *page,
double scale,
GdkPixbuf *pixbuf,
PopplerSelectionStyle style,
PopplerRectangle *selection)
{
GList *region, *l;
gint x, y, width, height;
int pixbuf_rowstride, pixbuf_n_channels;
guchar *pixbuf_data, *dst;
pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
if (pixbuf_n_channels != 4)
return;
for (y = 0; y < height; y++) {
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < width; x++) {
dst[3] = 0x00;
dst += pixbuf_n_channels;
}
}
region = poppler_page_get_selection_region (page, scale, style, selection);
for (l = region; l; l = g_list_next (l)) {
PopplerRectangle *rectangle = (PopplerRectangle *)l->data;
GdkRectangle rect;
rect.x = (gint)rectangle->x1;
rect.y = (gint)rectangle->y1;
rect.width = (gint) (rectangle->x2 - rectangle->x1);
rect.height = (gint) (rectangle->y2 - rectangle->y1);
for (y = 0; y < rect.height; y++) {
dst = pixbuf_data + (rect.y + y) * pixbuf_rowstride +
rect.x * pixbuf_n_channels;
for (x = 0; x < rect.width; x++) {
dst[3] = 0xff;
dst += pixbuf_n_channels;
}
}
}
poppler_page_selection_region_free (region);
}
| 264,012,997,649,379,380,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,431 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_transition_copy (PopplerPageTransition *transition)
{
PopplerPageTransition *new_transition;
new_transition = poppler_page_transition_new ();
*new_transition = *transition;
return new_transition;
}
| 299,099,051,566,963,640,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,432 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_page_transition_free (PopplerPageTransition *transition)
{
g_free (transition);
}
| 143,873,816,334,424,800,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |
11,433 | poppler | c839b706092583f6b12ed3cc634bf5af34b7a2bb | https://github.com/freedesktop/poppler | https://cgit.freedesktop.org/poppler/poppler/commit/?id=c839b706 | [glib] Fix CVE-2009-3607 | 0 | poppler_print_annot_cb (Annot *annot, void *user_data)
{
if (annot->getFlags () & Annot::flagPrint)
return gTrue;
return (annot->getType() == Annot::typeWidget);
}
| 295,308,509,253,832,820,000,000,000,000,000,000,000 | poppler-page.cc | 187,894,592,759,936,500,000,000,000,000,000,000,000 | [
"CWE-189"
] | CVE-2009-3607 | Integer overflow in the create_surface_from_thumbnail_data function in glib/poppler-page.cc in Poppler 0.x allows remote attackers to cause a denial of service (memory corruption) or possibly execute arbitrary code via a crafted PDF document that triggers a heap-based buffer overflow. NOTE: some of these details are obtained from third party information. | https://nvd.nist.gov/vuln/detail/CVE-2009-3607 |