cve_id
stringlengths 13
16
| obtain_all_privilege
stringclasses 3
values | obtain_user_privilege
stringclasses 2
values | obtain_other_privilege
stringclasses 2
values | user_interaction_required
stringclasses 3
values | cvss2_vector_string
stringclasses 106
values | cvss2_access_vector
stringclasses 4
values | cvss2_access_complexity
stringclasses 4
values | cvss2_authentication
stringclasses 3
values | cvss2_confidentiality_impact
stringclasses 4
values | cvss2_integrity_impact
stringclasses 4
values | cvss2_availability_impact
stringclasses 4
values | cvss2_base_score
stringclasses 50
values | cvss3_vector_string
stringclasses 226
values | cvss3_attack_vector
stringclasses 5
values | cvss3_attack_complexity
stringclasses 3
values | cvss3_privileges_required
stringclasses 4
values | cvss3_user_interaction
stringclasses 3
values | cvss3_scope
stringclasses 3
values | cvss3_confidentiality_impact
stringclasses 4
values | cvss3_integrity_impact
stringclasses 4
values | cvss3_availability_impact
stringclasses 4
values | cvss3_base_score
stringclasses 55
values | cvss3_base_severity
stringclasses 5
values | exploitability_score
stringclasses 22
values | impact_score
stringclasses 15
values | ac_insuf_info
stringclasses 3
values | reference_json
stringlengths 221
23.3k
| problemtype_json
stringclasses 200
values | severity
stringclasses 4
values | cve_nodes
stringlengths 2
33.1k
| cve_description
stringlengths 64
1.99k
| cve_last_modified_date
stringlengths 17
17
| cve_published_date
stringlengths 17
17
| cwe_name
stringclasses 125
values | cwe_description
stringclasses 124
values | cwe_extended_description
stringclasses 95
values | cwe_url
stringclasses 124
values | cwe_is_category
int64 0
1
| commit_author
stringlengths 0
34
| commit_author_date
stringlengths 25
25
| commit_msg
stringlengths 0
13.3k
| commit_hash
stringlengths 40
40
| commit_is_merge
stringclasses 1
value | repo_name
stringclasses 467
values | repo_description
stringclasses 459
values | repo_date_created
stringclasses 467
values | repo_date_last_push
stringclasses 467
values | repo_homepage
stringclasses 294
values | repo_owner
stringclasses 470
values | repo_stars
stringclasses 406
values | repo_forks
stringclasses 352
values | function_name
stringlengths 3
120
| function_signature
stringlengths 6
640
| function_parameters
stringlengths 2
302
| function
stringlengths 12
114k
| function_token_count
stringlengths 1
5
| function_before_change
stringclasses 1
value | labels
int64 1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2015-4645 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://security.gentoo.org/glsa/201701-73', 'name': 'GLSA-201701-73', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://github.com/devttys0/sasquatch/pull/5', 'name': 'https://github.com/devttys0/sasquatch/pull/5', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1234886', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1234886', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/75272', 'name': '75272', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162226.html', 'name': 'FEDORA-2015-10760', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162171.html', 'name': 'FEDORA-2015-10750', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'name': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:squashfs_project:squashfs:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the read_fragment_table_4 function in unsquash-4.c in Squashfs and sasquatch allows remote attackers to cause a denial of service (application crash) via a crafted input, which triggers a stack-based buffer overflow.'}] | 2019-10-24T14:02Z | 2017-03-17T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Phillip Lougher | 2019-07-15 21:19:06+01:00 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fixed" one such function and fixed
it badly, and so it was buggy and introduced extra bugs!
The suggested patch was not only buggy, but, it used the
essentially wrong approach too. It was "fixing" the
symptom but not the cause. The symptom is wrong values
causing overflow, the cause is filesystem corruption.
This corruption should be detected and the filesystem
rejected *before* trying to allocate memory.
This patch applies the following fixes:
1. The filesystem super-block tables are checked, and the values
must match across the filesystem.
This will trap corrupted filesystems created by Mksquashfs.
2. The maximum (theorectical) size the filesystem tables could grow
to, were analysed, and some variables were increased from int to
long long.
This analysis has been added as comments.
3. Stack allocation was removed, and a shared buffer (which is
checked and increased as necessary) is used to read the
table indexes.
Signed-off-by: Phillip Lougher <[email protected]> | f95864afe8833fe3ad782d714b41378e860977b1 | False | plougher/squashfs-tools | tools to create and extract Squashfs filesystems | 2012-11-01 16:44:15 | 2022-08-27 04:51:35 | plougher | 403.0 | 150.0 | read_fragment_table | read_fragment_table( long long * directory_table_end) | ['directory_table_end'] | static int read_fragment_table(long long *directory_table_end)
{
int res, i;
int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
long long fragment_table_index[indexes];
TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
"from 0x%llx\n", sBlk.s.fragments, indexes,
sBlk.s.fragment_table_start);
if(sBlk.s.fragments == 0) {
*directory_table_end = sBlk.s.fragment_table_start;
return TRUE;
}
fragment_table = malloc(bytes);
if(fragment_table == NULL)
EXIT_UNSQUASH("read_fragment_table: failed to allocate "
"fragment table\n");
res = read_fs_bytes(fd, sBlk.s.fragment_table_start,
SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk.s.fragments),
fragment_table_index);
if(res == FALSE) {
ERROR("read_fragment_table: failed to read fragment table "
"index\n");
return FALSE;
}
SQUASHFS_INSWAP_FRAGMENT_INDEXES(fragment_table_index, indexes);
for(i = 0; i < indexes; i++) {
int expected = (i + 1) != indexes ? SQUASHFS_METADATA_SIZE :
bytes & (SQUASHFS_METADATA_SIZE - 1);
int length = read_block(fd, fragment_table_index[i], NULL,
expected, ((char *) fragment_table) + (i *
SQUASHFS_METADATA_SIZE));
TRACE("Read fragment table block %d, from 0x%llx, length %d\n",
i, fragment_table_index[i], length);
if(length == FALSE) {
ERROR("read_fragment_table: failed to read fragment "
"table index\n");
return FALSE;
}
}
for(i = 0; i < sBlk.s.fragments; i++)
SQUASHFS_INSWAP_FRAGMENT_ENTRY(&fragment_table[i]);
*directory_table_end = fragment_table_index[0];
return TRUE;
} | 291 | True | 1 |
|
CVE-2015-4646 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'http://www.securityfocus.com/bid/75272', 'name': '75272', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://seclists.org/oss-sec/2015/q2/756', 'name': '[oss-security] 20150618 Re: Possible CVE Request: Multiple stack overflows in squashfs-tools and sasquatch', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.gentoo.org/glsa/201701-73', 'name': 'GLSA-201701-73', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'name': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:squashfs_project:squashfs:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': '(1) unsquash-1.c, (2) unsquash-2.c, (3) unsquash-3.c, and (4) unsquash-4.c in Squashfs and sasquatch allow remote attackers to cause a denial of service (application crash) via a crafted input.'}] | 2019-10-24T14:00Z | 2017-04-13T17:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Phillip Lougher | 2019-07-15 21:19:06+01:00 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fixed" one such function and fixed
it badly, and so it was buggy and introduced extra bugs!
The suggested patch was not only buggy, but, it used the
essentially wrong approach too. It was "fixing" the
symptom but not the cause. The symptom is wrong values
causing overflow, the cause is filesystem corruption.
This corruption should be detected and the filesystem
rejected *before* trying to allocate memory.
This patch applies the following fixes:
1. The filesystem super-block tables are checked, and the values
must match across the filesystem.
This will trap corrupted filesystems created by Mksquashfs.
2. The maximum (theorectical) size the filesystem tables could grow
to, were analysed, and some variables were increased from int to
long long.
This analysis has been added as comments.
3. Stack allocation was removed, and a shared buffer (which is
checked and increased as necessary) is used to read the
table indexes.
Signed-off-by: Phillip Lougher <[email protected]> | f95864afe8833fe3ad782d714b41378e860977b1 | False | plougher/squashfs-tools | tools to create and extract Squashfs filesystems | 2012-11-01 16:44:15 | 2022-08-27 04:51:35 | plougher | 403.0 | 150.0 | read_fragment_table | read_fragment_table( long long * directory_table_end) | ['directory_table_end'] | static int read_fragment_table(long long *directory_table_end)
{
int res, i;
int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
long long fragment_table_index[indexes];
TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
"from 0x%llx\n", sBlk.s.fragments, indexes,
sBlk.s.fragment_table_start);
if(sBlk.s.fragments == 0) {
*directory_table_end = sBlk.s.fragment_table_start;
return TRUE;
}
fragment_table = malloc(bytes);
if(fragment_table == NULL)
EXIT_UNSQUASH("read_fragment_table: failed to allocate "
"fragment table\n");
res = read_fs_bytes(fd, sBlk.s.fragment_table_start,
SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk.s.fragments),
fragment_table_index);
if(res == FALSE) {
ERROR("read_fragment_table: failed to read fragment table "
"index\n");
return FALSE;
}
SQUASHFS_INSWAP_FRAGMENT_INDEXES(fragment_table_index, indexes);
for(i = 0; i < indexes; i++) {
int expected = (i + 1) != indexes ? SQUASHFS_METADATA_SIZE :
bytes & (SQUASHFS_METADATA_SIZE - 1);
int length = read_block(fd, fragment_table_index[i], NULL,
expected, ((char *) fragment_table) + (i *
SQUASHFS_METADATA_SIZE));
TRACE("Read fragment table block %d, from 0x%llx, length %d\n",
i, fragment_table_index[i], length);
if(length == FALSE) {
ERROR("read_fragment_table: failed to read fragment "
"table index\n");
return FALSE;
}
}
for(i = 0; i < sBlk.s.fragments; i++)
SQUASHFS_INSWAP_FRAGMENT_ENTRY(&fragment_table[i]);
*directory_table_end = fragment_table_index[0];
return TRUE;
} | 291 | True | 1 |
|
CVE-2015-4645 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://security.gentoo.org/glsa/201701-73', 'name': 'GLSA-201701-73', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://github.com/devttys0/sasquatch/pull/5', 'name': 'https://github.com/devttys0/sasquatch/pull/5', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1234886', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1234886', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/75272', 'name': '75272', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162226.html', 'name': 'FEDORA-2015-10760', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162171.html', 'name': 'FEDORA-2015-10750', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'name': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:squashfs_project:squashfs:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the read_fragment_table_4 function in unsquash-4.c in Squashfs and sasquatch allows remote attackers to cause a denial of service (application crash) via a crafted input, which triggers a stack-based buffer overflow.'}] | 2019-10-24T14:02Z | 2017-03-17T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Phillip Lougher | 2019-07-15 21:19:06+01:00 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fixed" one such function and fixed
it badly, and so it was buggy and introduced extra bugs!
The suggested patch was not only buggy, but, it used the
essentially wrong approach too. It was "fixing" the
symptom but not the cause. The symptom is wrong values
causing overflow, the cause is filesystem corruption.
This corruption should be detected and the filesystem
rejected *before* trying to allocate memory.
This patch applies the following fixes:
1. The filesystem super-block tables are checked, and the values
must match across the filesystem.
This will trap corrupted filesystems created by Mksquashfs.
2. The maximum (theorectical) size the filesystem tables could grow
to, were analysed, and some variables were increased from int to
long long.
This analysis has been added as comments.
3. Stack allocation was removed, and a shared buffer (which is
checked and increased as necessary) is used to read the
table indexes.
Signed-off-by: Phillip Lougher <[email protected]> | f95864afe8833fe3ad782d714b41378e860977b1 | False | plougher/squashfs-tools | tools to create and extract Squashfs filesystems | 2012-11-01 16:44:15 | 2022-08-27 04:51:35 | plougher | 403.0 | 150.0 | read_uids_guids | read_uids_guids( long long * table_start) | ['table_start'] | static int read_uids_guids(long long *table_start)
{
int res, i;
int bytes = SQUASHFS_ID_BYTES(sBlk.s.no_ids);
int indexes = SQUASHFS_ID_BLOCKS(sBlk.s.no_ids);
long long id_index_table[indexes];
TRACE("read_uids_guids: no_ids %d\n", sBlk.s.no_ids);
id_table = malloc(bytes);
if(id_table == NULL) {
ERROR("read_uids_guids: failed to allocate id table\n");
return FALSE;
}
res = read_fs_bytes(fd, sBlk.s.id_table_start,
SQUASHFS_ID_BLOCK_BYTES(sBlk.s.no_ids), id_index_table);
if(res == FALSE) {
ERROR("read_uids_guids: failed to read id index table\n");
return FALSE;
}
SQUASHFS_INSWAP_ID_BLOCKS(id_index_table, indexes);
/*
* id_index_table[0] stores the start of the compressed id blocks.
* This by definition is also the end of the previous filesystem
* table - this may be the exports table if it is present, or the
* fragments table if it isn't.
*/
*table_start = id_index_table[0];
for(i = 0; i < indexes; i++) {
int expected = (i + 1) != indexes ? SQUASHFS_METADATA_SIZE :
bytes & (SQUASHFS_METADATA_SIZE - 1);
res = read_block(fd, id_index_table[i], NULL, expected,
((char *) id_table) + i * SQUASHFS_METADATA_SIZE);
if(res == FALSE) {
ERROR("read_uids_guids: failed to read id table block"
"\n");
return FALSE;
}
}
SQUASHFS_INSWAP_INTS(id_table, sBlk.s.no_ids);
return TRUE;
} | 229 | True | 1 |
|
CVE-2015-4646 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'http://www.securityfocus.com/bid/75272', 'name': '75272', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://seclists.org/oss-sec/2015/q2/756', 'name': '[oss-security] 20150618 Re: Possible CVE Request: Multiple stack overflows in squashfs-tools and sasquatch', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.gentoo.org/glsa/201701-73', 'name': 'GLSA-201701-73', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'name': 'https://github.com/plougher/squashfs-tools/commit/f95864afe8833fe3ad782d714b41378e860977b1', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:squashfs_project:squashfs:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': '(1) unsquash-1.c, (2) unsquash-2.c, (3) unsquash-3.c, and (4) unsquash-4.c in Squashfs and sasquatch allow remote attackers to cause a denial of service (application crash) via a crafted input.'}] | 2019-10-24T14:00Z | 2017-04-13T17:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Phillip Lougher | 2019-07-15 21:19:06+01:00 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fixed" one such function and fixed
it badly, and so it was buggy and introduced extra bugs!
The suggested patch was not only buggy, but, it used the
essentially wrong approach too. It was "fixing" the
symptom but not the cause. The symptom is wrong values
causing overflow, the cause is filesystem corruption.
This corruption should be detected and the filesystem
rejected *before* trying to allocate memory.
This patch applies the following fixes:
1. The filesystem super-block tables are checked, and the values
must match across the filesystem.
This will trap corrupted filesystems created by Mksquashfs.
2. The maximum (theorectical) size the filesystem tables could grow
to, were analysed, and some variables were increased from int to
long long.
This analysis has been added as comments.
3. Stack allocation was removed, and a shared buffer (which is
checked and increased as necessary) is used to read the
table indexes.
Signed-off-by: Phillip Lougher <[email protected]> | f95864afe8833fe3ad782d714b41378e860977b1 | False | plougher/squashfs-tools | tools to create and extract Squashfs filesystems | 2012-11-01 16:44:15 | 2022-08-27 04:51:35 | plougher | 403.0 | 150.0 | read_uids_guids | read_uids_guids( long long * table_start) | ['table_start'] | static int read_uids_guids(long long *table_start)
{
int res, i;
int bytes = SQUASHFS_ID_BYTES(sBlk.s.no_ids);
int indexes = SQUASHFS_ID_BLOCKS(sBlk.s.no_ids);
long long id_index_table[indexes];
TRACE("read_uids_guids: no_ids %d\n", sBlk.s.no_ids);
id_table = malloc(bytes);
if(id_table == NULL) {
ERROR("read_uids_guids: failed to allocate id table\n");
return FALSE;
}
res = read_fs_bytes(fd, sBlk.s.id_table_start,
SQUASHFS_ID_BLOCK_BYTES(sBlk.s.no_ids), id_index_table);
if(res == FALSE) {
ERROR("read_uids_guids: failed to read id index table\n");
return FALSE;
}
SQUASHFS_INSWAP_ID_BLOCKS(id_index_table, indexes);
/*
* id_index_table[0] stores the start of the compressed id blocks.
* This by definition is also the end of the previous filesystem
* table - this may be the exports table if it is present, or the
* fragments table if it isn't.
*/
*table_start = id_index_table[0];
for(i = 0; i < indexes; i++) {
int expected = (i + 1) != indexes ? SQUASHFS_METADATA_SIZE :
bytes & (SQUASHFS_METADATA_SIZE - 1);
res = read_block(fd, id_index_table[i], NULL, expected,
((char *) id_table) + i * SQUASHFS_METADATA_SIZE);
if(res == FALSE) {
ERROR("read_uids_guids: failed to read id table block"
"\n");
return FALSE;
}
}
SQUASHFS_INSWAP_INTS(id_table, sBlk.s.no_ids);
return TRUE;
} | 229 | True | 1 |
|
CVE-2015-5070 | False | False | False | False | AV:N/AC:M/Au:S/C:P/I:N/A:N | NETWORK | MEDIUM | SINGLE | PARTIAL | NONE | NONE | 3.5 | CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N | NETWORK | HIGH | LOW | NONE | UNCHANGED | LOW | NONE | NONE | 3.1 | LOW | 1.6 | 1.4 | nan | [{'url': 'https://gna.org/bugs/?23504', 'name': 'https://gna.org/bugs/?23504', 'refsource': 'MISC', 'tags': ['Broken Link']}, {'url': 'https://github.com/wesnoth/wesnoth/releases/tag/1.13.1', 'name': 'https://github.com/wesnoth/wesnoth/releases/tag/1.13.1', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://github.com/wesnoth/wesnoth/releases/tag/1.12.4', 'name': 'https://github.com/wesnoth/wesnoth/releases/tag/1.12.4', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://github.com/wesnoth/wesnoth/commit/b2738ffb2fdd2550ececb74f76f75583c43c8b59', 'name': 'https://github.com/wesnoth/wesnoth/commit/b2738ffb2fdd2550ececb74f76f75583c43c8b59', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1236010', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1236010', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/75425', 'name': '75425', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/25/12', 'name': '[oss-security] 20150625 Re: CVE request: Wesnoth authentication information disclosure', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161752.html', 'name': 'FEDORA-2015-10964', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161722.html', 'name': 'FEDORA-2015-10973', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:wesnoth:battle_for_wesnoth:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:wesnoth:battle_for_wesnoth:1.13.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The (1) filesystem::get_wml_location function in filesystem.cpp and (2) is_legal_file function in filesystem_boost.cpp in Battle for Wesnoth before 1.12.4 and 1.13.x before 1.13.1, when a case-insensitive filesystem is used, allow remote attackers to obtain sensitive information via vectors related to inclusion of .pbl files from WML. NOTE: this vulnerability exists because of an incomplete fix for CVE-2015-5069.'}] | 2017-10-10T14:54Z | 2017-09-26T14:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Ignacio R. Morelle | 2015-06-16 23:08:52-03:00 | Use looks_like_pbl() to disallow .pbl file inclusion (bug #23504)
This function is implemented using case-insensitive pattern matching,
unlike filesystem::ends_with(). I missed this when writing my original
fix, so the vulnerability still applied to .pbl files on a
case-insensitive filesystem (e.g. NTFS and FAT* on Windows) by using
different case to bypass the check. | b2738ffb2fdd2550ececb74f76f75583c43c8b59 | False | wesnoth/wesnoth | An open source, turn-based strategy game with a high fantasy theme. | 2013-04-14 17:13:06 | 2022-08-27 18:10:03 | https://www.wesnoth.org/ | wesnoth | 4042.0 | 788.0 | filesystem::get_wml_location | filesystem::get_wml_location( const std :: string & filename , const std :: string & current_dir) | ['filename', 'current_dir'] | std::string get_wml_location(const std::string &filename, const std::string ¤t_dir)
{
DBG_FS << "Looking for '" << filename << "'." << std::endl;
assert(game_config::path.empty() == false);
std::string result;
if (filename.empty()) {
LOG_FS << " invalid filename" << std::endl;
return result;
}
if (filename.find("..") != std::string::npos) {
ERR_FS << "Illegal path '" << filename << "' (\"..\" not allowed)." << std::endl;
return result;
}
if (ends_with(filename, ".pbl")) {
ERR_FS << "Illegal path '" << filename << "' (.pbl files are not allowed)." << std::endl;
return result;
}
bool already_found = false;
if (filename[0] == '~')
{
// If the filename starts with '~', look in the user data directory.
result = get_user_data_dir() + "/data/" + filename.substr(1);
DBG_FS << " trying '" << result << "'" << std::endl;
already_found = file_exists(result) || is_directory(result);
}
else if (filename.size() >= 2 && filename[0] == '.' && filename[1] == '/')
{
// If the filename begins with a "./", look in the same directory
// as the file currently being preprocessed.
if (!current_dir.empty())
{
result = current_dir;
}
else
{
result = game_config::path;
}
result += filename.substr(2);
}
else if (!game_config::path.empty())
result = game_config::path + "/data/" + filename;
DBG_FS << " trying '" << result << "'" << std::endl;
if (result.empty() ||
(!already_found && !file_exists(result) && !is_directory(result)))
{
DBG_FS << " not found" << std::endl;
result.clear();
}
else
DBG_FS << " found: '" << result << "'" << std::endl;
return result;
} | 361 | True | 1 |
CVE-2015-5070 | False | False | False | False | AV:N/AC:M/Au:S/C:P/I:N/A:N | NETWORK | MEDIUM | SINGLE | PARTIAL | NONE | NONE | 3.5 | CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N | NETWORK | HIGH | LOW | NONE | UNCHANGED | LOW | NONE | NONE | 3.1 | LOW | 1.6 | 1.4 | nan | [{'url': 'https://gna.org/bugs/?23504', 'name': 'https://gna.org/bugs/?23504', 'refsource': 'MISC', 'tags': ['Broken Link']}, {'url': 'https://github.com/wesnoth/wesnoth/releases/tag/1.13.1', 'name': 'https://github.com/wesnoth/wesnoth/releases/tag/1.13.1', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://github.com/wesnoth/wesnoth/releases/tag/1.12.4', 'name': 'https://github.com/wesnoth/wesnoth/releases/tag/1.12.4', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://github.com/wesnoth/wesnoth/commit/b2738ffb2fdd2550ececb74f76f75583c43c8b59', 'name': 'https://github.com/wesnoth/wesnoth/commit/b2738ffb2fdd2550ececb74f76f75583c43c8b59', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1236010', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1236010', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/75425', 'name': '75425', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/25/12', 'name': '[oss-security] 20150625 Re: CVE request: Wesnoth authentication information disclosure', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161752.html', 'name': 'FEDORA-2015-10964', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161722.html', 'name': 'FEDORA-2015-10973', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:wesnoth:battle_for_wesnoth:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:wesnoth:battle_for_wesnoth:1.13.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The (1) filesystem::get_wml_location function in filesystem.cpp and (2) is_legal_file function in filesystem_boost.cpp in Battle for Wesnoth before 1.12.4 and 1.13.x before 1.13.1, when a case-insensitive filesystem is used, allow remote attackers to obtain sensitive information via vectors related to inclusion of .pbl files from WML. NOTE: this vulnerability exists because of an incomplete fix for CVE-2015-5069.'}] | 2017-10-10T14:54Z | 2017-09-26T14:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Ignacio R. Morelle | 2015-06-16 23:08:52-03:00 | Use looks_like_pbl() to disallow .pbl file inclusion (bug #23504)
This function is implemented using case-insensitive pattern matching,
unlike filesystem::ends_with(). I missed this when writing my original
fix, so the vulnerability still applied to .pbl files on a
case-insensitive filesystem (e.g. NTFS and FAT* on Windows) by using
different case to bypass the check. | b2738ffb2fdd2550ececb74f76f75583c43c8b59 | False | wesnoth/wesnoth | An open source, turn-based strategy game with a high fantasy theme. | 2013-04-14 17:13:06 | 2022-08-27 18:10:03 | https://www.wesnoth.org/ | wesnoth | 4042.0 | 788.0 | filesystem::is_legal_file | filesystem::is_legal_file( const std :: string & filename) | ['filename'] | static bool is_legal_file(const std::string &filename)
{
DBG_FS << "Looking for '" << filename << "'.\n";
if (filename.empty()) {
LOG_FS << " invalid filename\n";
return false;
}
if (filename.find("..") != std::string::npos) {
ERR_FS << "Illegal path '" << filename << "' (\"..\" not allowed).\n";
return false;
}
if (ends_with(filename, ".pbl")) {
ERR_FS << "Illegal path '" << filename << "' (.pbl files are not allowed)." << std::endl;
return false;
}
return true;
} | 104 | True | 1 |
CVE-2015-5195 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'https://www-01.ibm.com/support/docview.wss?uid=swg21989542', 'name': 'https://www-01.ibm.com/support/docview.wss?uid=swg21989542', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://www-01.ibm.com/support/docview.wss?uid=swg21988706', 'name': 'https://www-01.ibm.com/support/docview.wss?uid=swg21988706', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://www-01.ibm.com/support/docview.wss?uid=swg21986956', 'name': 'https://www-01.ibm.com/support/docview.wss?uid=swg21986956', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://www-01.ibm.com/support/docview.wss?uid=swg21985122', 'name': 'https://www-01.ibm.com/support/docview.wss?uid=swg21985122', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://www-01.ibm.com/support/docview.wss?uid=isg3T1024157', 'name': 'https://www-01.ibm.com/support/docview.wss?uid=isg3T1024157', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/ntp-project/ntp/commit/52e977d79a0c4ace997e5c74af429844da2f27be', 'name': 'https://github.com/ntp-project/ntp/commit/52e977d79a0c4ace997e5c74af429844da2f27be', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1254544', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1254544', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.ubuntu.com/usn/USN-2783-1', 'name': 'USN-2783-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/76474', 'name': '76474', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/08/25/3', 'name': '[oss-security] 20150825 Several low impact ntp.org ntpd issues', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2015/dsa-3388', 'name': 'DSA-3388', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2583.html', 'name': 'RHSA-2016:2583', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0780.html', 'name': 'RHSA-2016:0780', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-September/166992.html', 'name': 'FEDORA-2015-14213', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-October/169167.html', 'name': 'FEDORA-2015-14212', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-November/170926.html', 'name': 'FEDORA-2015-77bfbc1bcd', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_hpc_node:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_hpc_node:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.04:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ntp:ntp:*:p111:*:*:*:*:*:*', 'versionEndIncluding': '4.2.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'ntp_openssl.m4 in ntpd in NTP before 4.2.7p112 allows remote attackers to cause a denial of service (segmentation fault) via a crafted statistics or filegen configuration command that is not enabled during compilation.'}] | 2018-05-18T01:29Z | 2017-07-21T14:29Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | 2011-01-06 04:02:24+00:00 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. | 52e977d79a0c4ace997e5c74af429844da2f27be | False | ntp-project/ntp | The full and complete NTP Reference Implementation from the Network Time Protocol Project at Network Time Foundation. | 2019-06-20 06:56:57 | 2022-05-02 17:35:03 | null | ntp-project | 83.0 | 38.0 | init_util | init_util( void) | ['void'] | init_util(void)
{
filegen_register(statsdir, "peerstats", &peerstats);
filegen_register(statsdir, "loopstats", &loopstats);
filegen_register(statsdir, "clockstats", &clockstats);
filegen_register(statsdir, "rawstats", &rawstats);
filegen_register(statsdir, "sysstats", &sysstats);
filegen_register(statsdir, "protostats", &protostats);
#ifdef AUTOKEY
filegen_register(statsdir, "cryptostats", &cryptostats);
#endif /* AUTOKEY */
#ifdef DEBUG_TIMING
filegen_register(statsdir, "timingstats", &timingstats);
#endif /* DEBUG_TIMING */
/*
* register with libntp ntp_set_tod() to call us back
* when time is stepped.
*/
step_callback = &ntpd_time_stepped;
#ifdef DEBUG
atexit(&uninit_util);
#endif /* DEBUG */
} | 97 | True | 1 |
|
CVE-2015-5221 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/UNLVBZWDEXZCFWOBZ3YVEQINMRBRX5QV/', 'name': 'FEDORA-2016-7776983633', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/AXWV22WGSQFDRPE7G6ECGP3QXS2V2A2M/', 'name': 'FEDORA-2016-bbecf64af4', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/3QIZNTZDXOJR5BTRZKCS3GVHVZV2PWHH/', 'name': 'FEDORA-2016-9b17661de5', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mdadams/jasper/commit/df5d2867e8004e51e18b89865bc4aa69229227b3', 'name': 'https://github.com/mdadams/jasper/commit/df5d2867e8004e51e18b89865bc4aa69229227b3', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1255710', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1255710', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/08/20/4', 'name': '[oss-security] 20150820 Use-after-free (and double-free) in Jasper JPEG-200 (CVE-2015-5221)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-11/msg00064.html', 'name': 'openSUSE-SU-2016:2833', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-11/msg00018.html', 'name': 'openSUSE-SU-2016:2737', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-11/msg00010.html', 'name': 'openSUSE-SU-2016:2722', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/11/msg00023.html', 'name': '[debian-lts-announce] 20181121 [SECURITY] [DLA 1583-1] jasper security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:25:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:24:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse_project:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:opensuse:13.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Use-after-free vulnerability in the mif_process_cmpt function in libjasper/mif/mif_cod.c in the JasPer JPEG-2000 library before 1.900.2 allows remote attackers to cause a denial of service (crash) via a crafted JPEG 2000 image file.'}] | 2018-11-22T11:29Z | 2017-07-25T18:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Richard Hughes | 2016-09-19 10:03:36+01:00 | CVE-2015-5221 | df5d2867e8004e51e18b89865bc4aa69229227b3 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mif_process_cmpt | mif_process_cmpt( mif_hdr_t * hdr , char * buf) | ['hdr', 'buf'] | static int mif_process_cmpt(mif_hdr_t *hdr, char *buf)
{
jas_tvparser_t *tvp;
mif_cmpt_t *cmpt;
int id;
cmpt = 0;
tvp = 0;
if (!(cmpt = mif_cmpt_create())) {
goto error;
}
cmpt->tlx = 0;
cmpt->tly = 0;
cmpt->sampperx = 0;
cmpt->samppery = 0;
cmpt->width = 0;
cmpt->height = 0;
cmpt->prec = 0;
cmpt->sgnd = -1;
cmpt->data = 0;
if (!(tvp = jas_tvparser_create(buf))) {
goto error;
}
while (!(id = jas_tvparser_next(tvp))) {
switch (jas_taginfo_nonull(jas_taginfos_lookup(mif_tags,
jas_tvparser_gettag(tvp)))->id) {
case MIF_TLX:
cmpt->tlx = atoi(jas_tvparser_getval(tvp));
break;
case MIF_TLY:
cmpt->tly = atoi(jas_tvparser_getval(tvp));
break;
case MIF_WIDTH:
cmpt->width = atoi(jas_tvparser_getval(tvp));
break;
case MIF_HEIGHT:
cmpt->height = atoi(jas_tvparser_getval(tvp));
break;
case MIF_HSAMP:
cmpt->sampperx = atoi(jas_tvparser_getval(tvp));
break;
case MIF_VSAMP:
cmpt->samppery = atoi(jas_tvparser_getval(tvp));
break;
case MIF_PREC:
cmpt->prec = atoi(jas_tvparser_getval(tvp));
break;
case MIF_SGND:
cmpt->sgnd = atoi(jas_tvparser_getval(tvp));
break;
case MIF_DATA:
if (!(cmpt->data = jas_strdup(jas_tvparser_getval(tvp)))) {
return -1;
}
break;
}
}
jas_tvparser_destroy(tvp);
if (!cmpt->sampperx || !cmpt->samppery) {
goto error;
}
if (mif_hdr_addcmpt(hdr, hdr->numcmpts, cmpt)) {
goto error;
}
return 0;
error:
if (cmpt) {
mif_cmpt_destroy(cmpt);
}
if (tvp) {
jas_tvparser_destroy(tvp);
}
return -1;
} | 387 | True | 1 |
CVE-2016-8690 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/22FCKKHQCQ3S6TZY5G44EFDTMWOJXJRD/', 'name': 'FEDORA-2016-6c789ba91d', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mdadams/jasper/commit/8f62b4761711d036fd8964df256b938c809b7fca', 'name': 'https://github.com/mdadams/jasper/commit/8f62b4761711d036fd8964df256b938c809b7fca', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385499', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385499', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/16/jasper-two-null-pointer-dereference-in-bmp_getdata-bmp_dec-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/16/jasper-two-null-pointer-dereference-in-bmp_getdata-bmp_dec-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93590', 'name': '93590', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/16/14', 'name': '[oss-security] 20161015 Re: Fuzzing jasper', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/23/6', 'name': '[oss-security] 20160823 Fuzzing jasper', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/11/msg00023.html', 'name': '[debian-lts-announce] 20181121 [SECURITY] [DLA 1583-1] jasper security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.29', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The bmp_getdata function in libjasper/bmp/bmp_dec.c in JasPer before 1.900.5 allows remote attackers to cause a denial of service (NULL pointer dereference) via a crafted BMP image in an imginfo command.'}] | 2018-11-22T11:29Z | 2017-02-15T19:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-15 20:32:23-07:00 | Fixed a sanitizer failure in the BMP codec.
Also, added a --debug-level command line option to the imginfo command
for debugging purposes. | 8f62b4761711d036fd8964df256b938c809b7fca | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | bmp_getint32 | bmp_getint32( jas_stream_t * in , int_fast32_t * val) | ['in', 'val'] | static int bmp_getint32(jas_stream_t *in, int_fast32_t *val)
{
int n;
uint_fast32_t v;
int c;
for (n = 4, v = 0;;) {
if ((c = jas_stream_getc(in)) == EOF) {
return -1;
}
v |= (c << 24);
if (--n <= 0) {
break;
}
v >>= 8;
}
if (val) {
*val = v;
}
return 0;
} | 92 | True | 1 |
CVE-2016-10248 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/mdadams/jasper/commit/2e82fa00466ae525339754bb3ab0a0474a31d4bd', 'name': 'https://github.com/mdadams/jasper/commit/2e82fa00466ae525339754bb3ab0a0474a31d4bd', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/20/jasper-null-pointer-dereference-in-jpc_tsfb_synthesize-jpc_tsfb-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/20/jasper-null-pointer-dereference-in-jpc_tsfb_synthesize-jpc_tsfb-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93797', 'name': '93797', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_tsfb_synthesize function in jpc_tsfb.c in JasPer before 1.900.9 allows remote attackers to cause a denial of service (NULL pointer dereference) via vectors involving an empty sequence.'}] | 2018-06-29T01:29Z | 2017-03-15T14:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-19 17:57:40-07:00 | Fixed an integral type promotion problem by adding a JAS_CAST.
Modified the jpc_tsfb_synthesize function so that it will be a noop for
an empty sequence (in order to avoid dereferencing a null pointer). | 2e82fa00466ae525339754bb3ab0a0474a31d4bd | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_undo_roi | jpc_undo_roi( jas_matrix_t * x , int roishift , int bgshift , int numbps) | ['x', 'roishift', 'bgshift', 'numbps'] | static void jpc_undo_roi(jas_matrix_t *x, int roishift, int bgshift, int numbps)
{
int i;
int j;
int thresh;
jpc_fix_t val;
jpc_fix_t mag;
bool warn;
uint_fast32_t mask;
if (roishift == 0 && bgshift == 0) {
return;
}
thresh = 1 << roishift;
warn = false;
for (i = 0; i < jas_matrix_numrows(x); ++i) {
for (j = 0; j < jas_matrix_numcols(x); ++j) {
val = jas_matrix_get(x, i, j);
mag = JAS_ABS(val);
if (mag >= thresh) {
/* We are dealing with ROI data. */
mag >>= roishift;
val = (val < 0) ? (-mag) : mag;
jas_matrix_set(x, i, j, val);
} else {
/* We are dealing with non-ROI (i.e., background) data. */
mag <<= bgshift;
mask = (1 << numbps) - 1;
/* Perform a basic sanity check on the sample value. */
/* Some implementations write garbage in the unused
most-significant bit planes introduced by ROI shifting.
Here we ensure that any such bits are masked off. */
if (mag & (~mask)) {
if (!warn) {
jas_eprintf("warning: possibly corrupt code stream\n");
warn = true;
}
mag &= mask;
}
val = (val < 0) ? (-mag) : mag;
jas_matrix_set(x, i, j, val);
}
}
}
} | 229 | True | 1 |
CVE-2016-10248 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/mdadams/jasper/commit/2e82fa00466ae525339754bb3ab0a0474a31d4bd', 'name': 'https://github.com/mdadams/jasper/commit/2e82fa00466ae525339754bb3ab0a0474a31d4bd', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/20/jasper-null-pointer-dereference-in-jpc_tsfb_synthesize-jpc_tsfb-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/20/jasper-null-pointer-dereference-in-jpc_tsfb_synthesize-jpc_tsfb-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93797', 'name': '93797', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_tsfb_synthesize function in jpc_tsfb.c in JasPer before 1.900.9 allows remote attackers to cause a denial of service (NULL pointer dereference) via vectors involving an empty sequence.'}] | 2018-06-29T01:29Z | 2017-03-15T14:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-19 17:57:40-07:00 | Fixed an integral type promotion problem by adding a JAS_CAST.
Modified the jpc_tsfb_synthesize function so that it will be a noop for
an empty sequence (in order to avoid dereferencing a null pointer). | 2e82fa00466ae525339754bb3ab0a0474a31d4bd | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_tsfb_synthesize | jpc_tsfb_synthesize( jpc_tsfb_t * tsfb , jas_seq2d_t * a) | ['tsfb', 'a'] | int jpc_tsfb_synthesize(jpc_tsfb_t *tsfb, jas_seq2d_t *a)
{
return (tsfb->numlvls > 0) ? jpc_tsfb_synthesize2(tsfb,
jas_seq2d_getref(a, jas_seq2d_xstart(a), jas_seq2d_ystart(a)),
jas_seq2d_xstart(a), jas_seq2d_ystart(a), jas_seq2d_width(a),
jas_seq2d_height(a), jas_seq2d_rowstep(a), tsfb->numlvls - 1) : 0;
} | 74 | True | 1 |
CVE-2016-8884 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/EGI2FZQLOTSZI3VA4ECJERI74SMNQDL4/', 'name': 'FEDORA-2016-e0f0d48142', 'refsource': 'FEDORA', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/22FCKKHQCQ3S6TZY5G44EFDTMWOJXJRD/', 'name': 'FEDORA-2016-6c789ba91d', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'https://github.com/mdadams/jasper/commit/5d66894d2313e3f3469f19066e149e08ff076698', 'name': 'https://github.com/mdadams/jasper/commit/5d66894d2313e3f3469f19066e149e08ff076698', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385499', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385499', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/18/jasper-two-null-pointer-dereference-in-bmp_getdata-bmp_dec-c-incomplete-fix-for-cve-2016-8690/', 'name': 'https://blogs.gentoo.org/ago/2016/10/18/jasper-two-null-pointer-dereference-in-bmp_getdata-bmp_dec-c-incomplete-fix-for-cve-2016-8690/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/23/9', 'name': '[oss-security] 20161023 Re: jasper: two NULL pointer dereference in bmp_getdata (bmp_dec.c) (Incomplete fix for CVE-2016-8690)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/23/1', 'name': '[oss-security] 20161022 Re: jasper: two NULL pointer dereference in bmp_getdata (bmp_dec.c) (Incomplete fix for CVE-2016-8690)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/93834', 'name': '93834', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:1.900.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:24:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The bmp_getdata function in libjasper/bmp/bmp_dec.c in JasPer 1.900.5 allows remote attackers to cause a denial of service (NULL pointer dereference) by calling the imginfo command with a crafted BMP image. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-8690.'}] | 2018-01-05T02:31Z | 2017-03-28T14:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-19 20:13:06-07:00 | Fixed a problem with a null pointer dereference in the BMP decoder. | 5d66894d2313e3f3469f19066e149e08ff076698 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | bmp_decode | bmp_decode( jas_stream_t * in , char * optstr) | ['in', 'optstr'] | jas_image_t *bmp_decode(jas_stream_t *in, char *optstr)
{
jas_image_t *image;
bmp_hdr_t hdr;
bmp_info_t *info;
uint_fast16_t cmptno;
jas_image_cmptparm_t cmptparms[3];
jas_image_cmptparm_t *cmptparm;
uint_fast16_t numcmpts;
long n;
if (optstr) {
jas_eprintf("warning: ignoring BMP decoder options\n");
}
jas_eprintf(
"THE BMP FORMAT IS NOT FULLY SUPPORTED!\n"
"THAT IS, THE JASPER SOFTWARE CANNOT DECODE ALL TYPES OF BMP DATA.\n"
"IF YOU HAVE ANY PROBLEMS, PLEASE TRY CONVERTING YOUR IMAGE DATA\n"
"TO THE PNM FORMAT, AND USING THIS FORMAT INSTEAD.\n"
);
/* Read the bitmap header. */
if (bmp_gethdr(in, &hdr)) {
jas_eprintf("cannot get header\n");
return 0;
}
JAS_DBGLOG(1, (
"BMP header: magic 0x%x; siz %d; res1 %d; res2 %d; off %d\n",
hdr.magic, hdr.siz, hdr.reserved1, hdr.reserved2, hdr.off
));
/* Read the bitmap information. */
if (!(info = bmp_getinfo(in))) {
jas_eprintf("cannot get info\n");
return 0;
}
JAS_DBGLOG(1,
("BMP information: len %d; width %d; height %d; numplanes %d; "
"depth %d; enctype %d; siz %d; hres %d; vres %d; numcolors %d; "
"mincolors %d\n", info->len, info->width, info->height, info->numplanes,
info->depth, info->enctype, info->siz, info->hres, info->vres,
info->numcolors, info->mincolors));
/* Ensure that we support this type of BMP file. */
if (!bmp_issupported(&hdr, info)) {
jas_eprintf("error: unsupported BMP encoding\n");
bmp_info_destroy(info);
return 0;
}
/* Skip over any useless data between the end of the palette
and start of the bitmap data. */
if ((n = hdr.off - (BMP_HDRLEN + BMP_INFOLEN + BMP_PALLEN(info))) < 0) {
jas_eprintf("error: possibly bad bitmap offset?\n");
return 0;
}
if (n > 0) {
jas_eprintf("skipping unknown data in BMP file\n");
if (bmp_gobble(in, n)) {
bmp_info_destroy(info);
return 0;
}
}
/* Get the number of components. */
numcmpts = bmp_numcmpts(info);
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
cmptparm->tlx = 0;
cmptparm->tly = 0;
cmptparm->hstep = 1;
cmptparm->vstep = 1;
cmptparm->width = info->width;
cmptparm->height = info->height;
cmptparm->prec = 8;
cmptparm->sgnd = false;
}
/* Create image object. */
if (!(image = jas_image_create(numcmpts, cmptparms,
JAS_CLRSPC_UNKNOWN))) {
bmp_info_destroy(info);
return 0;
}
if (numcmpts == 3) {
jas_image_setclrspc(image, JAS_CLRSPC_SRGB);
jas_image_setcmpttype(image, 0,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R));
jas_image_setcmpttype(image, 1,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G));
jas_image_setcmpttype(image, 2,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B));
} else {
jas_image_setclrspc(image, JAS_CLRSPC_SGRAY);
jas_image_setcmpttype(image, 0,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y));
}
/* Read the bitmap data. */
if (bmp_getdata(in, info, image)) {
bmp_info_destroy(info);
jas_image_destroy(image);
return 0;
}
bmp_info_destroy(info);
return image;
} | 492 | True | 1 |
CVE-2016-8693 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/22FCKKHQCQ3S6TZY5G44EFDTMWOJXJRD/', 'name': 'FEDORA-2016-6c789ba91d', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mdadams/jasper/commit/44a524e367597af58d6265ae2014468b334d0309', 'name': 'https://github.com/mdadams/jasper/commit/44a524e367597af58d6265ae2014468b334d0309', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385507', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1385507', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/16/jasper-double-free-in-mem_close-jas_stream-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/16/jasper-double-free-in-mem_close-jas_stream-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/16/14', 'name': '[oss-security] 20161015 Re: Fuzzing jasper', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/23/6', 'name': '[oss-security] 20160823 Fuzzing jasper', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-updates/2016-11/msg00010.html', 'name': 'openSUSE-SU-2016:2722', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/93587', 'name': '93587', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.debian.org/security/2017/dsa-3785', 'name': 'DSA-3785', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the mem_close function in jas_stream.c in JasPer before 1.900.10 allows remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a crafted BMP image to the imginfo command.'}] | 2018-10-30T16:27Z | 2017-02-15T19:59Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | Michael Adams | 2016-10-20 07:34:32-07:00 | The memory stream interface allows for a buffer size of zero.
The case of a zero-sized buffer was not handled correctly, as it could
lead to a double free.
This problem has now been fixed (hopefully).
One might ask whether a zero-sized buffer should be allowed at all,
but this is a question for another day. | 44a524e367597af58d6265ae2014468b334d0309 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mem_resize | mem_resize( jas_stream_memobj_t * m , int bufsize) | ['m', 'bufsize'] | static int mem_resize(jas_stream_memobj_t *m, int bufsize)
{
unsigned char *buf;
assert(m->buf_);
assert(bufsize >= 0);
if (!(buf = jas_realloc2(m->buf_, bufsize, sizeof(unsigned char)))) {
return -1;
}
m->buf_ = buf;
m->bufsize_ = bufsize;
return 0;
} | 73 | True | 1 |
CVE-2016-8887 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/EGI2FZQLOTSZI3VA4ECJERI74SMNQDL4/', 'name': 'FEDORA-2016-e0f0d48142', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/22FCKKHQCQ3S6TZY5G44EFDTMWOJXJRD/', 'name': 'FEDORA-2016-6c789ba91d', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mdadams/jasper/commit/e24bdc716c3327b067c551bc6cfb97fd2370358d', 'name': 'https://github.com/mdadams/jasper/commit/e24bdc716c3327b067c551bc6cfb97fd2370358d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1388828', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1388828', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/18/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c', 'name': 'https://blogs.gentoo.org/ago/2016/10/18/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/23/6', 'name': '[oss-security] 20161023 jasper: NULL pointer dereference in jp2_colr_destroy (jp2_cod.c) (incomplete fix for CVE-2016-8887)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/23/3', 'name': '[oss-security] 20161022 Re: jasper: NULL pointer dereference in jp2_colr_destroy (jp2_cod.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/93835', 'name': '93835', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:24:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jp2_colr_destroy function in libjasper/jp2/jp2_cod.c in JasPer before 1.900.10 allows remote attackers to cause a denial of service (NULL pointer dereference).'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-21 00:00:27-07:00 | Fixed a bug that resulted in the destruction of JP2 box data that had never
been constructed in the first place. | e24bdc716c3327b067c551bc6cfb97fd2370358d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jp2_decode | jp2_decode( jas_stream_t * in , char * optstr) | ['in', 'optstr'] | jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t *cdefent;
int cmptno;
#endif
jp2_cmapent_t *cmapent;
jas_icchdr_t icchdr;
jas_iccprof_t *iccprof;
dec = 0;
box = 0;
image = 0;
if (!(dec = jp2_dec_create())) {
goto error;
}
/* Get the first box. This should be a JP box. */
if (!(box = jp2_box_get(in))) {
jas_eprintf("error: cannot get box\n");
goto error;
}
if (box->type != JP2_BOX_JP) {
jas_eprintf("error: expecting signature box\n");
goto error;
}
if (box->data.jp.magic != JP2_JP_MAGIC) {
jas_eprintf("incorrect magic number\n");
goto error;
}
jp2_box_destroy(box);
box = 0;
/* Get the second box. This should be a FTYP box. */
if (!(box = jp2_box_get(in))) {
goto error;
}
if (box->type != JP2_BOX_FTYP) {
jas_eprintf("expecting file type box\n");
goto error;
}
jp2_box_destroy(box);
box = 0;
/* Get more boxes... */
found = 0;
while ((box = jp2_box_get(in))) {
if (jas_getdbglevel() >= 1) {
jas_eprintf("box type %s\n", box->info->name);
}
switch (box->type) {
case JP2_BOX_JP2C:
found = 1;
break;
case JP2_BOX_IHDR:
if (!dec->ihdr) {
dec->ihdr = box;
box = 0;
}
break;
case JP2_BOX_BPCC:
if (!dec->bpcc) {
dec->bpcc = box;
box = 0;
}
break;
case JP2_BOX_CDEF:
if (!dec->cdef) {
dec->cdef = box;
box = 0;
}
break;
case JP2_BOX_PCLR:
if (!dec->pclr) {
dec->pclr = box;
box = 0;
}
break;
case JP2_BOX_CMAP:
if (!dec->cmap) {
dec->cmap = box;
box = 0;
}
break;
case JP2_BOX_COLR:
if (!dec->colr) {
dec->colr = box;
box = 0;
}
break;
}
if (box) {
jp2_box_destroy(box);
box = 0;
}
if (found) {
break;
}
}
if (!found) {
jas_eprintf("error: no code stream found\n");
goto error;
}
if (!(dec->image = jpc_decode(in, optstr))) {
jas_eprintf("error: cannot decode code stream\n");
goto error;
}
/* An IHDR box must be present. */
if (!dec->ihdr) {
jas_eprintf("error: missing IHDR box\n");
goto error;
}
/* Does the number of components indicated in the IHDR box match
the value specified in the code stream? */
if (dec->ihdr->data.ihdr.numcmpts != JAS_CAST(uint,
jas_image_numcmpts(dec->image))) {
jas_eprintf("warning: number of components mismatch\n");
}
/* At least one component must be present. */
if (!jas_image_numcmpts(dec->image)) {
jas_eprintf("error: no components\n");
goto error;
}
/* Determine if all components have the same data type. */
samedtype = true;
dtype = jas_image_cmptdtype(dec->image, 0);
for (i = 1; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
if (jas_image_cmptdtype(dec->image, i) != dtype) {
samedtype = false;
break;
}
}
/* Is the component data type indicated in the IHDR box consistent
with the data in the code stream? */
if ((samedtype && dec->ihdr->data.ihdr.bpc != JP2_DTYPETOBPC(dtype)) ||
(!samedtype && dec->ihdr->data.ihdr.bpc != JP2_IHDR_BPCNULL)) {
jas_eprintf("warning: component data type mismatch\n");
}
/* Is the compression type supported? */
if (dec->ihdr->data.ihdr.comptype != JP2_IHDR_COMPTYPE) {
jas_eprintf("error: unsupported compression type\n");
goto error;
}
if (dec->bpcc) {
/* Is the number of components indicated in the BPCC box
consistent with the code stream data? */
if (dec->bpcc->data.bpcc.numcmpts != JAS_CAST(uint, jas_image_numcmpts(
dec->image))) {
jas_eprintf("warning: number of components mismatch\n");
}
/* Is the component data type information indicated in the BPCC
box consistent with the code stream data? */
if (!samedtype) {
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image));
++i) {
if (jas_image_cmptdtype(dec->image, i) !=
JP2_BPCTODTYPE(dec->bpcc->data.bpcc.bpcs[i])) {
jas_eprintf("warning: component data type mismatch\n");
}
}
} else {
jas_eprintf("warning: superfluous BPCC box\n");
}
}
/* A COLR box must be present. */
if (!dec->colr) {
jas_eprintf("error: no COLR box\n");
goto error;
}
switch (dec->colr->data.colr.method) {
case JP2_COLR_ENUM:
jas_image_setclrspc(dec->image, jp2_getcs(&dec->colr->data.colr));
break;
case JP2_COLR_ICC:
iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
dec->colr->data.colr.iccplen);
if (!iccprof) {
jas_eprintf("error: failed to parse ICC profile\n");
goto error;
}
jas_iccprof_gethdr(iccprof, &icchdr);
jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
dec->image->cmprof_ = jas_cmprof_createfromiccprof(iccprof);
assert(dec->image->cmprof_);
jas_iccprof_destroy(iccprof);
break;
}
/* If a CMAP box is present, a PCLR box must also be present. */
if (dec->cmap && !dec->pclr) {
jas_eprintf("warning: missing PCLR box or superfluous CMAP box\n");
jp2_box_destroy(dec->cmap);
dec->cmap = 0;
}
/* If a CMAP box is not present, a PCLR box must not be present. */
if (!dec->cmap && dec->pclr) {
jas_eprintf("warning: missing CMAP box or superfluous PCLR box\n");
jp2_box_destroy(dec->pclr);
dec->pclr = 0;
}
/* Determine the number of channels (which is essentially the number
of components after any palette mappings have been applied). */
dec->numchans = dec->cmap ? dec->cmap->data.cmap.numchans :
JAS_CAST(uint, jas_image_numcmpts(dec->image));
/* Perform a basic sanity check on the CMAP box if present. */
if (dec->cmap) {
for (i = 0; i < dec->numchans; ++i) {
/* Is the component number reasonable? */
if (dec->cmap->data.cmap.ents[i].cmptno >= JAS_CAST(uint,
jas_image_numcmpts(dec->image))) {
jas_eprintf("error: invalid component number in CMAP box\n");
goto error;
}
/* Is the LUT index reasonable? */
if (dec->cmap->data.cmap.ents[i].pcol >=
dec->pclr->data.pclr.numchans) {
jas_eprintf("error: invalid CMAP LUT index\n");
goto error;
}
}
}
/* Allocate space for the channel-number to component-number LUT. */
if (!(dec->chantocmptlut = jas_alloc2(dec->numchans,
sizeof(uint_fast16_t)))) {
jas_eprintf("error: no memory\n");
goto error;
}
if (!dec->cmap) {
for (i = 0; i < dec->numchans; ++i) {
dec->chantocmptlut[i] = i;
}
} else {
cmapd = &dec->cmap->data.cmap;
pclrd = &dec->pclr->data.pclr;
cdefd = &dec->cdef->data.cdef;
for (channo = 0; channo < cmapd->numchans; ++channo) {
cmapent = &cmapd->ents[channo];
if (cmapent->map == JP2_CMAP_DIRECT) {
dec->chantocmptlut[channo] = channo;
} else if (cmapent->map == JP2_CMAP_PALETTE) {
lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t));
for (i = 0; i < pclrd->numlutents; ++i) {
lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
}
newcmptno = jas_image_numcmpts(dec->image);
jas_image_depalettize(dec->image, cmapent->cmptno,
pclrd->numlutents, lutents,
JP2_BPCTODTYPE(pclrd->bpc[cmapent->pcol]), newcmptno);
dec->chantocmptlut[channo] = newcmptno;
jas_free(lutents);
#if 0
if (dec->cdef) {
cdefent = jp2_cdef_lookup(cdefd, channo);
if (!cdefent) {
abort();
}
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), cdefent->type, cdefent->assoc));
} else {
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), 0, channo + 1));
}
#endif
}
}
}
/* Mark all components as being of unknown type. */
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
jas_image_setcmpttype(dec->image, i, JAS_IMAGE_CT_UNKNOWN);
}
/* Determine the type of each component. */
if (dec->cdef) {
for (i = 0; i < dec->numchans; ++i) {
/* Is the channel number reasonable? */
if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) {
jas_eprintf("error: invalid channel number in CDEF box\n");
goto error;
}
jas_image_setcmpttype(dec->image,
dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
jp2_getct(jas_image_clrspc(dec->image),
dec->cdef->data.cdef.ents[i].type,
dec->cdef->data.cdef.ents[i].assoc));
}
} else {
for (i = 0; i < dec->numchans; ++i) {
jas_image_setcmpttype(dec->image, dec->chantocmptlut[i],
jp2_getct(jas_image_clrspc(dec->image), 0, i + 1));
}
}
/* Delete any components that are not of interest. */
for (i = jas_image_numcmpts(dec->image); i > 0; --i) {
if (jas_image_cmpttype(dec->image, i - 1) == JAS_IMAGE_CT_UNKNOWN) {
jas_image_delcmpt(dec->image, i - 1);
}
}
/* Ensure that some components survived. */
if (!jas_image_numcmpts(dec->image)) {
jas_eprintf("error: no components\n");
goto error;
}
#if 0
jas_eprintf("no of components is %d\n", jas_image_numcmpts(dec->image));
#endif
/* Prevent the image from being destroyed later. */
image = dec->image;
dec->image = 0;
jp2_dec_destroy(dec);
return image;
error:
if (box) {
jp2_box_destroy(box);
}
if (dec) {
jp2_dec_destroy(dec);
}
return 0;
} | 1827 | True | 1 |
CVE-2016-10249 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'name': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93838', 'name': '93838', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3827', 'name': 'DSA-3827', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.11', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the jpc_dec_tiledecode function in jpc_dec.c in JasPer before 1.900.12 allows remote attackers to have unspecified impact via a crafted image file, which triggers a heap-based buffer overflow.'}] | 2018-01-05T02:30Z | 2017-03-15T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-10-22 14:36:49-07:00 | Fixed an integer overflow problem. | 988f8365f7d8ad8073b6786e433d34c553ecf568 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_malloc | jas_malloc( size_t size) | ['size'] | void *jas_malloc(size_t size)
{
void *result;
JAS_DBGLOG(101, ("jas_malloc called with %zu\n", size));
result = malloc(size);
JAS_DBGLOG(100, ("jas_malloc(%zu) -> %p\n", size, result));
return result;
} | 45 | True | 1 |
CVE-2016-10249 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'name': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93838', 'name': '93838', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3827', 'name': 'DSA-3827', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.11', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the jpc_dec_tiledecode function in jpc_dec.c in JasPer before 1.900.12 allows remote attackers to have unspecified impact via a crafted image file, which triggers a heap-based buffer overflow.'}] | 2018-01-05T02:30Z | 2017-03-15T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-10-22 14:36:49-07:00 | Fixed an integer overflow problem. | 988f8365f7d8ad8073b6786e433d34c553ecf568 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_realloc | jas_realloc( void * ptr , size_t size) | ['ptr', 'size'] | void *jas_realloc(void *ptr, size_t size)
{
void *result;
JAS_DBGLOG(101, ("jas_realloc called with %x,%zu\n", ptr, size));
result = realloc(ptr, size);
JAS_DBGLOG(100, ("jas_realloc(%p, %zu) -> %p\n", ptr, size, result));
return result;
} | 55 | True | 1 |
CVE-2016-10249 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'name': 'https://github.com/mdadams/jasper/commit/988f8365f7d8ad8073b6786e433d34c553ecf568', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'name': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-heap-based-buffer-overflow-in-jpc_dec_tiledecode-jpc_dec-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/93838', 'name': '93838', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3827', 'name': 'DSA-3827', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.11', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the jpc_dec_tiledecode function in jpc_dec.c in JasPer before 1.900.12 allows remote attackers to have unspecified impact via a crafted image file, which triggers a heap-based buffer overflow.'}] | 2018-01-05T02:30Z | 2017-03-15T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-10-22 14:36:49-07:00 | Fixed an integer overflow problem. | 988f8365f7d8ad8073b6786e433d34c553ecf568 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_create | jas_matrix_create( int numrows , int numcols) | ['numrows', 'numcols'] | jas_matrix_t *jas_matrix_create(int numrows, int numcols)
{
jas_matrix_t *matrix;
int i;
if (numrows < 0 || numcols < 0) {
return 0;
}
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
return 0;
}
matrix->flags_ = 0;
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
matrix->rows_ = 0;
matrix->maxrows_ = numrows;
matrix->data_ = 0;
matrix->datasize_ = numrows * numcols;
if (matrix->maxrows_ > 0) {
if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
sizeof(jas_seqent_t *)))) {
jas_matrix_destroy(matrix);
return 0;
}
}
if (matrix->datasize_ > 0) {
if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
sizeof(jas_seqent_t)))) {
jas_matrix_destroy(matrix);
return 0;
}
}
for (i = 0; i < numrows; ++i) {
matrix->rows_[i] = &matrix->data_[i * matrix->numcols_];
}
for (i = 0; i < matrix->datasize_; ++i) {
matrix->data_[i] = 0;
}
matrix->xstart_ = 0;
matrix->ystart_ = 0;
matrix->xend_ = matrix->numcols_;
matrix->yend_ = matrix->numrows_;
return matrix;
} | 270 | True | 1 |
CVE-2016-9387 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d91198abd00fc435a397fe6bad906a4c1748e9cf', 'name': 'https://github.com/mdadams/jasper/commit/d91198abd00fc435a397fe6bad906a4c1748e9cf', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Vendor Advisory', 'Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396959', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396959', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94374', 'name': '94374', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the jpc_dec_process_siz function in libjasper/jpc/jpc_dec.c in JasPer before 1.900.13 allows remote attackers to have unspecified impact via a crafted file, which triggers an assertion failure.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-10-23 03:34:35-07:00 | Fixed another integer overflow problem. | d91198abd00fc435a397fe6bad906a4c1748e9cf | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_dec_process_siz | jpc_dec_process_siz( jpc_dec_t * dec , jpc_ms_t * ms) | ['dec', 'ms'] | static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
{
jpc_siz_t *siz = &ms->parms.siz;
int compno;
int tileno;
jpc_dec_tile_t *tile;
jpc_dec_tcomp_t *tcomp;
int htileno;
int vtileno;
jpc_dec_cmpt_t *cmpt;
dec->xstart = siz->xoff;
dec->ystart = siz->yoff;
dec->xend = siz->width;
dec->yend = siz->height;
dec->tilewidth = siz->tilewidth;
dec->tileheight = siz->tileheight;
dec->tilexoff = siz->tilexoff;
dec->tileyoff = siz->tileyoff;
dec->numcomps = siz->numcomps;
if (!(dec->cp = jpc_dec_cp_create(dec->numcomps))) {
return -1;
}
if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) {
return -1;
}
for (compno = 0, cmpt = dec->cmpts; compno < dec->numcomps; ++compno,
++cmpt) {
cmpt->prec = siz->comps[compno].prec;
cmpt->sgnd = siz->comps[compno].sgnd;
cmpt->hstep = siz->comps[compno].hsamp;
cmpt->vstep = siz->comps[compno].vsamp;
cmpt->width = JPC_CEILDIV(dec->xend, cmpt->hstep) -
JPC_CEILDIV(dec->xstart, cmpt->hstep);
cmpt->height = JPC_CEILDIV(dec->yend, cmpt->vstep) -
JPC_CEILDIV(dec->ystart, cmpt->vstep);
cmpt->hsubstep = 0;
cmpt->vsubstep = 0;
}
dec->image = 0;
dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth);
dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight);
dec->numtiles = dec->numhtiles * dec->numvtiles;
JAS_DBGLOG(10, ("numtiles = %d; numhtiles = %d; numvtiles = %d;\n",
dec->numtiles, dec->numhtiles, dec->numvtiles));
if (!(dec->tiles = jas_alloc2(dec->numtiles, sizeof(jpc_dec_tile_t)))) {
return -1;
}
for (tileno = 0, tile = dec->tiles; tileno < dec->numtiles; ++tileno,
++tile) {
htileno = tileno % dec->numhtiles;
vtileno = tileno / dec->numhtiles;
tile->realmode = 0;
tile->state = JPC_TILE_INIT;
tile->xstart = JAS_MAX(dec->tilexoff + htileno * dec->tilewidth,
dec->xstart);
tile->ystart = JAS_MAX(dec->tileyoff + vtileno * dec->tileheight,
dec->ystart);
tile->xend = JAS_MIN(dec->tilexoff + (htileno + 1) *
dec->tilewidth, dec->xend);
tile->yend = JAS_MIN(dec->tileyoff + (vtileno + 1) *
dec->tileheight, dec->yend);
tile->numparts = 0;
tile->partno = 0;
tile->pkthdrstream = 0;
tile->pkthdrstreampos = 0;
tile->pptstab = 0;
tile->cp = 0;
tile->pi = 0;
if (!(tile->tcomps = jas_alloc2(dec->numcomps,
sizeof(jpc_dec_tcomp_t)))) {
return -1;
}
for (compno = 0, cmpt = dec->cmpts, tcomp = tile->tcomps;
compno < dec->numcomps; ++compno, ++cmpt, ++tcomp) {
tcomp->rlvls = 0;
tcomp->numrlvls = 0;
tcomp->data = 0;
tcomp->xstart = JPC_CEILDIV(tile->xstart, cmpt->hstep);
tcomp->ystart = JPC_CEILDIV(tile->ystart, cmpt->vstep);
tcomp->xend = JPC_CEILDIV(tile->xend, cmpt->hstep);
tcomp->yend = JPC_CEILDIV(tile->yend, cmpt->vstep);
tcomp->tsfb = 0;
}
}
dec->pkthdrstreams = 0;
/* We should expect to encounter other main header marker segments
or an SOT marker segment next. */
dec->state = JPC_MH;
return 0;
} | 763 | True | 1 |
CVE-2016-10250 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/bdfe95a6e81ffb4b2fad31a76b57943695beed20', 'name': 'https://github.com/mdadams/jasper/commit/bdfe95a6e81ffb4b2fad31a76b57943695beed20', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c-incomplete-fix-for-cve-2016-8887/', 'name': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c-incomplete-fix-for-cve-2016-8887/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jp2_colr_destroy function in jp2_cod.c in JasPer before 1.900.13 allows remote attackers to cause a denial of service (NULL pointer dereference) by leveraging incorrect cleanup of JP2 box data on error. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-8887.'}] | 2018-06-29T01:29Z | 2017-03-15T14:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-23 03:52:29-07:00 | Fixed another problem with incorrect cleanup of JP2 box data upon error. | bdfe95a6e81ffb4b2fad31a76b57943695beed20 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jp2_box_dump | jp2_box_dump( jp2_box_t * box , FILE * out) | ['box', 'out'] | void jp2_box_dump(jp2_box_t *box, FILE *out)
{
jp2_boxinfo_t *boxinfo;
boxinfo = jp2_boxinfolookup(box->type);
assert(boxinfo);
fprintf(out, "JP2 box: ");
fprintf(out, "type=%c%s%c (0x%08"PRIxFAST32"); length=%"PRIuFAST32"\n", '"', boxinfo->name,
'"', box->type, box->len);
if (box->ops->dumpdata) {
(*box->ops->dumpdata)(box, out);
}
} | 88 | True | 1 |
CVE-2016-10250 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/bdfe95a6e81ffb4b2fad31a76b57943695beed20', 'name': 'https://github.com/mdadams/jasper/commit/bdfe95a6e81ffb4b2fad31a76b57943695beed20', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c-incomplete-fix-for-cve-2016-8887/', 'name': 'https://blogs.gentoo.org/ago/2016/10/23/jasper-null-pointer-dereference-in-jp2_colr_destroy-jp2_cod-c-incomplete-fix-for-cve-2016-8887/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jp2_colr_destroy function in jp2_cod.c in JasPer before 1.900.13 allows remote attackers to cause a denial of service (NULL pointer dereference) by leveraging incorrect cleanup of JP2 box data on error. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-8887.'}] | 2018-06-29T01:29Z | 2017-03-15T14:59Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Michael Adams | 2016-10-23 03:52:29-07:00 | Fixed another problem with incorrect cleanup of JP2 box data upon error. | bdfe95a6e81ffb4b2fad31a76b57943695beed20 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jp2_box_get | jp2_box_get( jas_stream_t * in) | ['in'] | jp2_box_t *jp2_box_get(jas_stream_t *in)
{
jp2_box_t *box;
jp2_boxinfo_t *boxinfo;
jas_stream_t *tmpstream;
uint_fast32_t len;
uint_fast64_t extlen;
bool dataflag;
box = 0;
tmpstream = 0;
if (!(box = jas_malloc(sizeof(jp2_box_t)))) {
goto error;
}
box->ops = &jp2_boxinfo_unk.ops;
if (jp2_getuint32(in, &len) || jp2_getuint32(in, &box->type)) {
goto error;
}
boxinfo = jp2_boxinfolookup(box->type);
box->info = boxinfo;
box->ops = &boxinfo->ops;
box->len = len;
JAS_DBGLOG(10, (
"preliminary processing of JP2 box: type=%c%s%c (0x%08x); length=%d\n",
'"', boxinfo->name, '"', box->type, box->len
));
if (box->len == 1) {
if (jp2_getuint64(in, &extlen)) {
goto error;
}
if (extlen > 0xffffffffUL) {
jas_eprintf("warning: cannot handle large 64-bit box length\n");
extlen = 0xffffffffUL;
}
box->len = extlen;
box->datalen = extlen - JP2_BOX_HDRLEN(true);
} else {
box->datalen = box->len - JP2_BOX_HDRLEN(false);
}
if (box->len != 0 && box->len < 8) {
goto error;
}
dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA));
if (dataflag) {
if (!(tmpstream = jas_stream_memopen(0, 0))) {
goto error;
}
if (jas_stream_copy(tmpstream, in, box->datalen)) {
// Mark the box data as never having been constructed
// so that we will not errantly attempt to destroy it later.
box->ops = &jp2_boxinfo_unk.ops;
jas_eprintf("cannot copy box data\n");
goto error;
}
jas_stream_rewind(tmpstream);
if (box->ops->getdata) {
if ((*box->ops->getdata)(box, tmpstream)) {
jas_eprintf("cannot parse box data\n");
goto error;
}
}
jas_stream_close(tmpstream);
}
if (jas_getdbglevel() >= 1) {
jp2_box_dump(box, stderr);
}
return box;
error:
if (box) {
jp2_box_destroy(box);
}
if (tmpstream) {
jas_stream_close(tmpstream);
}
return 0;
} | 407 | True | 1 |
CVE-2016-9388 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'name': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:1.900.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ras_getcmap function in ras_dec.c in JasPer before 1.900.14 allows remote attackers to cause a denial of service (assertion failure) via a crafted image file.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-24 06:56:08-07:00 | Fixed a few bugs in the RAS encoder and decoder where errors were tested
with assertions instead of being gracefully handled. | 411a4068f8c464e883358bf403a3e25158863823 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | ras_getcmap | ras_getcmap( jas_stream_t * in , ras_hdr_t * hdr , ras_cmap_t * cmap) | ['in', 'hdr', 'cmap'] | static int ras_getcmap(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap)
{
int i;
int j;
int x;
int c;
int numcolors;
int actualnumcolors;
switch (hdr->maptype) {
case RAS_MT_NONE:
break;
case RAS_MT_EQUALRGB:
{
jas_eprintf("warning: palettized images not fully supported\n");
numcolors = 1 << hdr->depth;
assert(numcolors <= RAS_CMAP_MAXSIZ);
actualnumcolors = hdr->maplength / 3;
for (i = 0; i < numcolors; i++) {
cmap->data[i] = 0;
}
if ((hdr->maplength % 3) || hdr->maplength < 0 ||
hdr->maplength > 3 * numcolors) {
return -1;
}
for (i = 0; i < 3; i++) {
for (j = 0; j < actualnumcolors; j++) {
if ((c = jas_stream_getc(in)) == EOF) {
return -1;
}
x = 0;
switch (i) {
case 0:
x = RAS_RED(c);
break;
case 1:
x = RAS_GREEN(c);
break;
case 2:
x = RAS_BLUE(c);
break;
}
cmap->data[j] |= x;
}
}
}
break;
default:
return -1;
break;
}
return 0;
} | 252 | True | 1 |
CVE-2016-9388 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'name': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:1.900.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ras_getcmap function in ras_dec.c in JasPer before 1.900.14 allows remote attackers to cause a denial of service (assertion failure) via a crafted image file.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-24 06:56:08-07:00 | Fixed a few bugs in the RAS encoder and decoder where errors were tested
with assertions instead of being gracefully handled. | 411a4068f8c464e883358bf403a3e25158863823 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | ras_getdatastd | ras_getdatastd( jas_stream_t * in , ras_hdr_t * hdr , ras_cmap_t * cmap , jas_image_t * image) | ['in', 'hdr', 'cmap', 'image'] | static int ras_getdatastd(jas_stream_t *in, ras_hdr_t *hdr, ras_cmap_t *cmap,
jas_image_t *image)
{
int pad;
int nz;
int z;
int c;
int y;
int x;
int v;
int i;
jas_matrix_t *data[3];
/* Note: This function does not properly handle images with a colormap. */
/* Avoid compiler warnings about unused parameters. */
cmap = 0;
for (i = 0; i < jas_image_numcmpts(image); ++i) {
data[i] = jas_matrix_create(1, jas_image_width(image));
assert(data[i]);
}
pad = RAS_ROWSIZE(hdr) - (hdr->width * hdr->depth + 7) / 8;
for (y = 0; y < hdr->height; y++) {
nz = 0;
z = 0;
for (x = 0; x < hdr->width; x++) {
while (nz < hdr->depth) {
if ((c = jas_stream_getc(in)) == EOF) {
return -1;
}
z = (z << 8) | c;
nz += 8;
}
v = (z >> (nz - hdr->depth)) & RAS_ONES(hdr->depth);
z &= RAS_ONES(nz - hdr->depth);
nz -= hdr->depth;
if (jas_image_numcmpts(image) == 3) {
jas_matrix_setv(data[0], x, (RAS_GETRED(v)));
jas_matrix_setv(data[1], x, (RAS_GETGREEN(v)));
jas_matrix_setv(data[2], x, (RAS_GETBLUE(v)));
} else {
jas_matrix_setv(data[0], x, (v));
}
}
if (pad) {
if ((c = jas_stream_getc(in)) == EOF) {
return -1;
}
}
for (i = 0; i < jas_image_numcmpts(image); ++i) {
if (jas_image_writecmpt(image, i, 0, y, hdr->width, 1,
data[i])) {
return -1;
}
}
}
for (i = 0; i < jas_image_numcmpts(image); ++i) {
jas_matrix_destroy(data[i]);
}
return 0;
} | 423 | True | 1 |
CVE-2016-9388 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'name': 'https://github.com/mdadams/jasper/commit/411a4068f8c464e883358bf403a3e25158863823', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396962', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:1.900.14:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ras_getcmap function in ras_dec.c in JasPer before 1.900.14 allows remote attackers to cause a denial of service (assertion failure) via a crafted image file.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-24 06:56:08-07:00 | Fixed a few bugs in the RAS encoder and decoder where errors were tested
with assertions instead of being gracefully handled. | 411a4068f8c464e883358bf403a3e25158863823 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | ras_putdatastd | ras_putdatastd( jas_stream_t * out , ras_hdr_t * hdr , jas_image_t * image , int numcmpts , int * cmpts) | ['out', 'hdr', 'image', 'numcmpts', 'cmpts'] | static int ras_putdatastd(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts)
{
int rowsize;
int pad;
unsigned int z;
int nz;
int c;
int x;
int y;
int v;
jas_matrix_t *data[3];
int i;
for (i = 0; i < numcmpts; ++i) {
data[i] = jas_matrix_create(jas_image_height(image), jas_image_width(image));
assert(data[i]);
}
rowsize = RAS_ROWSIZE(hdr);
pad = rowsize - (hdr->width * hdr->depth + 7) / 8;
hdr->length = hdr->height * rowsize;
for (y = 0; y < hdr->height; y++) {
for (i = 0; i < numcmpts; ++i) {
if (jas_image_readcmpt(image, cmpts[i], 0, y,
jas_image_width(image), 1, data[i])) {
return -1;
}
}
z = 0;
nz = 0;
for (x = 0; x < hdr->width; x++) {
z <<= hdr->depth;
if (RAS_ISRGB(hdr)) {
v = RAS_RED((jas_matrix_getv(data[0], x))) |
RAS_GREEN((jas_matrix_getv(data[1], x))) |
RAS_BLUE((jas_matrix_getv(data[2], x)));
} else {
v = (jas_matrix_getv(data[0], x));
}
z |= v & RAS_ONES(hdr->depth);
nz += hdr->depth;
while (nz >= 8) {
c = (z >> (nz - 8)) & 0xff;
if (jas_stream_putc(out, c) == EOF) {
return -1;
}
nz -= 8;
z &= RAS_ONES(nz);
}
}
if (nz > 0) {
c = (z >> (8 - nz)) & RAS_ONES(nz);
if (jas_stream_putc(out, c) == EOF) {
return -1;
}
}
if (pad % 2) {
if (jas_stream_putc(out, 0) == EOF) {
return -1;
}
}
}
for (i = 0; i < numcmpts; ++i) {
jas_matrix_destroy(data[i]);
}
return 0;
} | 466 | True | 1 |
CVE-2016-9391 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'name': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_bitstream_getbits function in jpc_bs.c in JasPer before 2.0.10 allows remote attackers to cause a denial of service (assertion failure) via a very large integer.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-25 07:01:50-07:00 | Changed the JPC bitstream code to more gracefully handle a request
for a larger sized integer than what can be handled (i.e., return
with an error instead of failing an assert). | 1e84674d95353c64e5c4c0e7232ae86fd6ea813b | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_bitstream_getbits | jpc_bitstream_getbits( jpc_bitstream_t * bitstream , int n) | ['bitstream', 'n'] | long jpc_bitstream_getbits(jpc_bitstream_t *bitstream, int n)
{
long v;
int u;
/* We can reliably get at most 31 bits since ISO/IEC 9899 only
guarantees that a long can represent values up to 2^31-1. */
assert(n >= 0 && n < 32);
/* Get the number of bits requested from the specified bit stream. */
v = 0;
while (--n >= 0) {
if ((u = jpc_bitstream_getbit(bitstream)) < 0) {
return -1;
}
v = (v << 1) | u;
}
return v;
} | 74 | True | 1 |
CVE-2016-9391 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'name': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_bitstream_getbits function in jpc_bs.c in JasPer before 2.0.10 allows remote attackers to cause a denial of service (assertion failure) via a very large integer.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-25 07:01:50-07:00 | Changed the JPC bitstream code to more gracefully handle a request
for a larger sized integer than what can be handled (i.e., return
with an error instead of failing an assert). | 1e84674d95353c64e5c4c0e7232ae86fd6ea813b | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_bitstream_putbits | jpc_bitstream_putbits( jpc_bitstream_t * bitstream , int n , long v) | ['bitstream', 'n', 'v'] | int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v)
{
int m;
/* We can reliably put at most 31 bits since ISO/IEC 9899 only
guarantees that a long can represent values up to 2^31-1. */
assert(n >= 0 && n < 32);
/* Ensure that only the bits to be output are nonzero. */
assert(!(v & (~JAS_ONES(n))));
/* Put the desired number of bits to the specified bit stream. */
m = n - 1;
while (--n >= 0) {
if (jpc_bitstream_putbit(bitstream, (v >> m) & 1) == EOF) {
return EOF;
}
v <<= 1;
}
return 0;
} | 88 | True | 1 |
CVE-2016-9391 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'name': 'https://github.com/mdadams/jasper/commit/1e84674d95353c64e5c4c0e7232ae86fd6ea813b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396967', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94371', 'name': '94371', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_bitstream_getbits function in jpc_bs.c in JasPer before 2.0.10 allows remote attackers to cause a denial of service (assertion failure) via a very large integer.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-25 07:01:50-07:00 | Changed the JPC bitstream code to more gracefully handle a request
for a larger sized integer than what can be handled (i.e., return
with an error instead of failing an assert). | 1e84674d95353c64e5c4c0e7232ae86fd6ea813b | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_qcd_dumpparms | jpc_qcd_dumpparms( jpc_ms_t * ms , FILE * out) | ['ms', 'out'] | static int jpc_qcd_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_qcd_t *qcd = &ms->parms.qcd;
int i;
fprintf(out, "qntsty = %d; numguard = %d; numstepsizes = %d\n",
(int) qcd->compparms.qntsty, qcd->compparms.numguard, qcd->compparms.numstepsizes);
for (i = 0; i < qcd->compparms.numstepsizes; ++i) {
fprintf(out, "expn[%d] = 0x%04x; mant[%d] = 0x%04x;\n",
i, (unsigned) JPC_QCX_GETEXPN(qcd->compparms.stepsizes[i]),
i, (unsigned) JPC_QCX_GETMANT(qcd->compparms.stepsizes[i]));
}
return 0;
} | 117 | True | 1 |
CVE-2016-9392 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'name': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396971', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396971', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94377', 'name': '94377', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html', 'name': 'https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.16', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The calcstepsizes function in jpc_dec.c in JasPer before 1.900.17 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2019-01-16T19:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-27 20:11:57-07:00 | Added some missing sanity checks on the data in a SIZ marker segment. | f7038068550fba0e41e1d0c355787f1dcd5bf330 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_siz_getparms | jpc_siz_getparms( jpc_ms_t * ms , jpc_cstate_t * cstate , jas_stream_t * in) | ['ms', 'cstate', 'in'] | static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
jas_stream_t *in)
{
jpc_siz_t *siz = &ms->parms.siz;
unsigned int i;
uint_fast8_t tmp;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
if (jpc_getuint16(in, &siz->caps) ||
jpc_getuint32(in, &siz->width) ||
jpc_getuint32(in, &siz->height) ||
jpc_getuint32(in, &siz->xoff) ||
jpc_getuint32(in, &siz->yoff) ||
jpc_getuint32(in, &siz->tilewidth) ||
jpc_getuint32(in, &siz->tileheight) ||
jpc_getuint32(in, &siz->tilexoff) ||
jpc_getuint32(in, &siz->tileyoff) ||
jpc_getuint16(in, &siz->numcomps)) {
return -1;
}
if (!siz->width || !siz->height || !siz->tilewidth ||
!siz->tileheight || !siz->numcomps || siz->numcomps > 16384) {
return -1;
}
if (siz->tilexoff >= siz->width || siz->tileyoff >= siz->height) {
jas_eprintf("all tiles are outside the image area\n");
return -1;
}
if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
return -1;
}
for (i = 0; i < siz->numcomps; ++i) {
if (jpc_getuint8(in, &tmp) ||
jpc_getuint8(in, &siz->comps[i].hsamp) ||
jpc_getuint8(in, &siz->comps[i].vsamp)) {
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].hsamp == 0 || siz->comps[i].hsamp > 255) {
jas_eprintf("invalid XRsiz value %d\n", siz->comps[i].hsamp);
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].vsamp == 0 || siz->comps[i].vsamp > 255) {
jas_eprintf("invalid YRsiz value %d\n", siz->comps[i].vsamp);
jas_free(siz->comps);
return -1;
}
siz->comps[i].sgnd = (tmp >> 7) & 1;
siz->comps[i].prec = (tmp & 0x7f) + 1;
}
if (jas_stream_eof(in)) {
jas_free(siz->comps);
return -1;
}
return 0;
} | 471 | True | 1 |
CVE-2016-9393 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'name': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396972', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396972', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/94377', 'name': '94377', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:1.900.17:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jpc_pi_nextrpcl function in jpc_t2cod.c in JasPer before 1.900.17 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Michael Adams | 2016-10-27 20:11:57-07:00 | Added some missing sanity checks on the data in a SIZ marker segment. | f7038068550fba0e41e1d0c355787f1dcd5bf330 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_siz_getparms | jpc_siz_getparms( jpc_ms_t * ms , jpc_cstate_t * cstate , jas_stream_t * in) | ['ms', 'cstate', 'in'] | static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
jas_stream_t *in)
{
jpc_siz_t *siz = &ms->parms.siz;
unsigned int i;
uint_fast8_t tmp;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
if (jpc_getuint16(in, &siz->caps) ||
jpc_getuint32(in, &siz->width) ||
jpc_getuint32(in, &siz->height) ||
jpc_getuint32(in, &siz->xoff) ||
jpc_getuint32(in, &siz->yoff) ||
jpc_getuint32(in, &siz->tilewidth) ||
jpc_getuint32(in, &siz->tileheight) ||
jpc_getuint32(in, &siz->tilexoff) ||
jpc_getuint32(in, &siz->tileyoff) ||
jpc_getuint16(in, &siz->numcomps)) {
return -1;
}
if (!siz->width || !siz->height || !siz->tilewidth ||
!siz->tileheight || !siz->numcomps || siz->numcomps > 16384) {
return -1;
}
if (siz->tilexoff >= siz->width || siz->tileyoff >= siz->height) {
jas_eprintf("all tiles are outside the image area\n");
return -1;
}
if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
return -1;
}
for (i = 0; i < siz->numcomps; ++i) {
if (jpc_getuint8(in, &tmp) ||
jpc_getuint8(in, &siz->comps[i].hsamp) ||
jpc_getuint8(in, &siz->comps[i].vsamp)) {
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].hsamp == 0 || siz->comps[i].hsamp > 255) {
jas_eprintf("invalid XRsiz value %d\n", siz->comps[i].hsamp);
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].vsamp == 0 || siz->comps[i].vsamp > 255) {
jas_eprintf("invalid YRsiz value %d\n", siz->comps[i].vsamp);
jas_free(siz->comps);
return -1;
}
siz->comps[i].sgnd = (tmp >> 7) & 1;
siz->comps[i].prec = (tmp & 0x7f) + 1;
}
if (jas_stream_eof(in)) {
jas_free(siz->comps);
return -1;
}
return 0;
} | 471 | True | 1 |
CVE-2016-9394 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'name': 'https://github.com/mdadams/jasper/commit/f7038068550fba0e41e1d0c355787f1dcd5bf330', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396975', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396975', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94372', 'name': '94372', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.16', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.17 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-10-27 20:11:57-07:00 | Added some missing sanity checks on the data in a SIZ marker segment. | f7038068550fba0e41e1d0c355787f1dcd5bf330 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_siz_getparms | jpc_siz_getparms( jpc_ms_t * ms , jpc_cstate_t * cstate , jas_stream_t * in) | ['ms', 'cstate', 'in'] | static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
jas_stream_t *in)
{
jpc_siz_t *siz = &ms->parms.siz;
unsigned int i;
uint_fast8_t tmp;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
if (jpc_getuint16(in, &siz->caps) ||
jpc_getuint32(in, &siz->width) ||
jpc_getuint32(in, &siz->height) ||
jpc_getuint32(in, &siz->xoff) ||
jpc_getuint32(in, &siz->yoff) ||
jpc_getuint32(in, &siz->tilewidth) ||
jpc_getuint32(in, &siz->tileheight) ||
jpc_getuint32(in, &siz->tilexoff) ||
jpc_getuint32(in, &siz->tileyoff) ||
jpc_getuint16(in, &siz->numcomps)) {
return -1;
}
if (!siz->width || !siz->height || !siz->tilewidth ||
!siz->tileheight || !siz->numcomps || siz->numcomps > 16384) {
return -1;
}
if (siz->tilexoff >= siz->width || siz->tileyoff >= siz->height) {
jas_eprintf("all tiles are outside the image area\n");
return -1;
}
if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
return -1;
}
for (i = 0; i < siz->numcomps; ++i) {
if (jpc_getuint8(in, &tmp) ||
jpc_getuint8(in, &siz->comps[i].hsamp) ||
jpc_getuint8(in, &siz->comps[i].vsamp)) {
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].hsamp == 0 || siz->comps[i].hsamp > 255) {
jas_eprintf("invalid XRsiz value %d\n", siz->comps[i].hsamp);
jas_free(siz->comps);
return -1;
}
if (siz->comps[i].vsamp == 0 || siz->comps[i].vsamp > 255) {
jas_eprintf("invalid YRsiz value %d\n", siz->comps[i].vsamp);
jas_free(siz->comps);
return -1;
}
siz->comps[i].sgnd = (tmp >> 7) & 1;
siz->comps[i].prec = (tmp & 0x7f) + 1;
}
if (jas_stream_eof(in)) {
jas_free(siz->comps);
return -1;
}
return 0;
} | 471 | True | 1 |
CVE-2016-10251 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/1f0dfe5a42911b6880a1445f13f6d615ddb55387', 'name': 'https://github.com/mdadams/jasper/commit/1f0dfe5a42911b6880a1445f13f6d615ddb55387', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/04/jasper-use-of-uninitialized-value-in-jpc_pi_nextcprl-jpc_t2cod-c/', 'name': 'https://blogs.gentoo.org/ago/2016/11/04/jasper-use-of-uninitialized-value-in-jpc_pi_nextcprl-jpc_t2cod-c/', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/97584', 'name': '97584', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3827', 'name': 'DSA-3827', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuapr2020.html', 'name': 'N/A', 'refsource': 'N/A', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.19', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in the jpc_pi_nextcprl function in jpc_t2cod.c in JasPer before 1.900.20 allows remote attackers to have unspecified impact via a crafted file, which triggers use of an uninitialized value.'}] | 2018-01-05T02:30Z | 2017-03-15T14:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-04 07:20:23-07:00 | Fixed an integer overflow problem in the JPC codec that later resulted
in the use of uninitialized data. | 1f0dfe5a42911b6880a1445f13f6d615ddb55387 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jpc_pi_nextcprl | jpc_pi_nextcprl( register jpc_pi_t * pi) | ['pi'] | static int jpc_pi_nextcprl(register jpc_pi_t *pi)
{
int rlvlno;
jpc_pirlvl_t *pirlvl;
jpc_pchg_t *pchg;
int prchind;
int prcvind;
int *prclyrno;
uint_fast32_t trx0;
uint_fast32_t try0;
uint_fast32_t r;
uint_fast32_t rpx;
uint_fast32_t rpy;
pchg = pi->pchg;
if (!pi->prgvolfirst) {
goto skip;
} else {
pi->prgvolfirst = 0;
}
for (pi->compno = pchg->compnostart, pi->picomp =
&pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend) && pi->compno < pi->numcomps; ++pi->compno,
++pi->picomp) {
pirlvl = pi->picomp->pirlvls;
pi->xstep = pi->picomp->hsamp * (1 << (pirlvl->prcwidthexpn +
pi->picomp->numrlvls - 1));
pi->ystep = pi->picomp->vsamp * (1 << (pirlvl->prcheightexpn +
pi->picomp->numrlvls - 1));
for (rlvlno = 1, pirlvl = &pi->picomp->pirlvls[1];
rlvlno < pi->picomp->numrlvls; ++rlvlno, ++pirlvl) {
pi->xstep = JAS_MIN(pi->xstep, pi->picomp->hsamp * (1 <<
(pirlvl->prcwidthexpn + pi->picomp->numrlvls -
rlvlno - 1)));
pi->ystep = JAS_MIN(pi->ystep, pi->picomp->vsamp * (1 <<
(pirlvl->prcheightexpn + pi->picomp->numrlvls -
rlvlno - 1)));
}
for (pi->y = pi->ystart; pi->y < pi->yend;
pi->y += pi->ystep - (pi->y % pi->ystep)) {
for (pi->x = pi->xstart; pi->x < pi->xend;
pi->x += pi->xstep - (pi->x % pi->xstep)) {
for (pi->rlvlno = pchg->rlvlnostart,
pi->pirlvl = &pi->picomp->pirlvls[pi->rlvlno];
pi->rlvlno < pi->picomp->numrlvls && pi->rlvlno <
pchg->rlvlnoend; ++pi->rlvlno, ++pi->pirlvl) {
if (pi->pirlvl->numprcs == 0) {
continue;
}
r = pi->picomp->numrlvls - 1 - pi->rlvlno;
trx0 = JPC_CEILDIV(pi->xstart, pi->picomp->hsamp << r);
try0 = JPC_CEILDIV(pi->ystart, pi->picomp->vsamp << r);
rpx = r + pi->pirlvl->prcwidthexpn;
rpy = r + pi->pirlvl->prcheightexpn;
if (((pi->x == pi->xstart && ((trx0 << r) % (1 << rpx))) ||
!(pi->x % (pi->picomp->hsamp << rpx))) &&
((pi->y == pi->ystart && ((try0 << r) % (1 << rpy))) ||
!(pi->y % (pi->picomp->vsamp << rpy)))) {
prchind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->x, pi->picomp->hsamp
<< r), pi->pirlvl->prcwidthexpn) - JPC_FLOORDIVPOW2(trx0,
pi->pirlvl->prcwidthexpn);
prcvind = JPC_FLOORDIVPOW2(JPC_CEILDIV(pi->y, pi->picomp->vsamp
<< r), pi->pirlvl->prcheightexpn) - JPC_FLOORDIVPOW2(try0,
pi->pirlvl->prcheightexpn);
pi->prcno = prcvind *
pi->pirlvl->numhprcs +
prchind;
assert(pi->prcno <
pi->pirlvl->numprcs);
for (pi->lyrno = 0; pi->lyrno <
pi->numlyrs && pi->lyrno < JAS_CAST(int, pchg->lyrnoend); ++pi->lyrno) {
prclyrno = &pi->pirlvl->prclyrnos[pi->prcno];
if (pi->lyrno >= *prclyrno) {
++(*prclyrno);
return 0;
}
skip:
;
}
}
}
}
}
}
return 1;
} | 796 | True | 1 |
CVE-2016-9262 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'name': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94224', 'name': '94224', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/10/4', 'name': '[oss-security] 20161110 Re: jasper: use after free in jas_realloc (jas_malloc.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201707-07', 'name': 'GLSA-201707-07', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.21', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the (1) jas_realloc function in base/jas_malloc.c and (2) mem_resize function in base/jas_stream.c in JasPer before 1.900.22 allow remote attackers to cause a denial of service via a crafted image, which triggers use after free vulnerabilities.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-06 10:26:16-08:00 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new function jas_stream_memopen2, which takes a
buffer size specified as a size_t instead of an int.
This can be used in jas_image_cmpt_create to avoid potential
overflow problems.
Added a new function jas_deprecated to warn about reliance on
deprecated library behavior. | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_cmpt_create | jas_image_cmpt_create( int_fast32_t tlx , int_fast32_t tly , int_fast32_t hstep , int_fast32_t vstep , int_fast32_t width , int_fast32_t height , uint_fast16_t depth , bool sgnd , uint_fast32_t inmem) | ['tlx', 'tly', 'hstep', 'vstep', 'width', 'height', 'depth', 'sgnd', 'inmem'] | static jas_image_cmpt_t *jas_image_cmpt_create(int_fast32_t tlx,
int_fast32_t tly, int_fast32_t hstep, int_fast32_t vstep,
int_fast32_t width, int_fast32_t height, uint_fast16_t depth, bool sgnd,
uint_fast32_t inmem)
{
jas_image_cmpt_t *cmpt;
size_t size;
cmpt = 0;
if (width < 0 || height < 0 || hstep <= 0 || vstep <= 0) {
goto error;
}
if (!jas_safe_intfast32_add(tlx, width, 0) ||
!jas_safe_intfast32_add(tly, height, 0)) {
goto error;
}
if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) {
goto error;
}
cmpt->type_ = JAS_IMAGE_CT_UNKNOWN;
cmpt->tlx_ = tlx;
cmpt->tly_ = tly;
cmpt->hstep_ = hstep;
cmpt->vstep_ = vstep;
cmpt->width_ = width;
cmpt->height_ = height;
cmpt->prec_ = depth;
cmpt->sgnd_ = sgnd;
cmpt->stream_ = 0;
cmpt->cps_ = (depth + 7) / 8;
// Compute the number of samples in the image component, while protecting
// against overflow.
// size = cmpt->width_ * cmpt->height_ * cmpt->cps_;
if (!jas_safe_size_mul(cmpt->width_, cmpt->height_, &size) ||
!jas_safe_size_mul(size, cmpt->cps_, &size)) {
goto error;
}
cmpt->stream_ = (inmem) ? jas_stream_memopen(0, size) :
jas_stream_tmpfile();
if (!cmpt->stream_) {
goto error;
}
/* Zero the component data. This isn't necessary, but it is
convenient for debugging purposes. */
/* Note: conversion of size - 1 to long can overflow */
if (jas_stream_seek(cmpt->stream_, size - 1, SEEK_SET) < 0 ||
jas_stream_putc(cmpt->stream_, 0) == EOF ||
jas_stream_seek(cmpt->stream_, 0, SEEK_SET) < 0) {
goto error;
}
return cmpt;
error:
if (cmpt) {
jas_image_cmpt_destroy(cmpt);
}
return 0;
} | 315 | True | 1 |
CVE-2016-9262 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'name': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94224', 'name': '94224', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/10/4', 'name': '[oss-security] 20161110 Re: jasper: use after free in jas_realloc (jas_malloc.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201707-07', 'name': 'GLSA-201707-07', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.21', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the (1) jas_realloc function in base/jas_malloc.c and (2) mem_resize function in base/jas_stream.c in JasPer before 1.900.22 allow remote attackers to cause a denial of service via a crafted image, which triggers use after free vulnerabilities.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-06 10:26:16-08:00 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new function jas_stream_memopen2, which takes a
buffer size specified as a size_t instead of an int.
This can be used in jas_image_cmpt_create to avoid potential
overflow problems.
Added a new function jas_deprecated to warn about reliance on
deprecated library behavior. | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mem_read | mem_read( jas_stream_obj_t * obj , char * buf , int cnt) | ['obj', 'buf', 'cnt'] | static int mem_read(jas_stream_obj_t *obj, char *buf, int cnt)
{
int n;
assert(cnt >= 0);
assert(buf);
JAS_DBGLOG(100, ("mem_read(%p, %p, %d)\n", obj, buf, cnt));
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
n = m->len_ - m->pos_;
cnt = JAS_MIN(n, cnt);
memcpy(buf, &m->buf_[m->pos_], cnt);
m->pos_ += cnt;
return cnt;
} | 100 | True | 1 |
CVE-2016-9262 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'name': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94224', 'name': '94224', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/10/4', 'name': '[oss-security] 20161110 Re: jasper: use after free in jas_realloc (jas_malloc.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201707-07', 'name': 'GLSA-201707-07', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.21', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the (1) jas_realloc function in base/jas_malloc.c and (2) mem_resize function in base/jas_stream.c in JasPer before 1.900.22 allow remote attackers to cause a denial of service via a crafted image, which triggers use after free vulnerabilities.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-06 10:26:16-08:00 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new function jas_stream_memopen2, which takes a
buffer size specified as a size_t instead of an int.
This can be used in jas_image_cmpt_create to avoid potential
overflow problems.
Added a new function jas_deprecated to warn about reliance on
deprecated library behavior. | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mem_resize | mem_resize( jas_stream_memobj_t * m , int bufsize) | ['m', 'bufsize'] | static int mem_resize(jas_stream_memobj_t *m, int bufsize)
{
unsigned char *buf;
//assert(m->buf_);
assert(bufsize >= 0);
JAS_DBGLOG(100, ("mem_resize(%p, %d)\n", m, bufsize));
if (!(buf = jas_realloc2(m->buf_, bufsize, sizeof(unsigned char))) &&
bufsize) {
JAS_DBGLOG(100, ("mem_resize realloc failed\n"));
return -1;
}
JAS_DBGLOG(100, ("mem_resize realloc succeeded\n"));
m->buf_ = buf;
m->bufsize_ = bufsize;
return 0;
} | 99 | True | 1 |
CVE-2016-9262 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'name': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94224', 'name': '94224', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/10/4', 'name': '[oss-security] 20161110 Re: jasper: use after free in jas_realloc (jas_malloc.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201707-07', 'name': 'GLSA-201707-07', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.21', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the (1) jas_realloc function in base/jas_malloc.c and (2) mem_resize function in base/jas_stream.c in JasPer before 1.900.22 allow remote attackers to cause a denial of service via a crafted image, which triggers use after free vulnerabilities.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-06 10:26:16-08:00 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new function jas_stream_memopen2, which takes a
buffer size specified as a size_t instead of an int.
This can be used in jas_image_cmpt_create to avoid potential
overflow problems.
Added a new function jas_deprecated to warn about reliance on
deprecated library behavior. | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mem_seek | mem_seek( jas_stream_obj_t * obj , long offset , int origin) | ['obj', 'offset', 'origin'] | static long mem_seek(jas_stream_obj_t *obj, long offset, int origin)
{
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
long newpos;
JAS_DBGLOG(100, ("mem_seek(%p, %ld, %d)\n", obj, offset, origin));
switch (origin) {
case SEEK_SET:
newpos = offset;
break;
case SEEK_END:
newpos = m->len_ - offset;
break;
case SEEK_CUR:
newpos = m->pos_ + offset;
break;
default:
abort();
break;
}
if (newpos < 0) {
return -1;
}
m->pos_ = newpos;
return m->pos_;
} | 114 | True | 1 |
CVE-2016-9262 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'name': 'https://github.com/mdadams/jasper/commit/634ce8e8a5accc0fa05dd2c20d42b4749d4b2735', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1393882', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/07/jasper-use-after-free-in-jas_realloc-jas_malloc-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94224', 'name': '94224', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/10/4', 'name': '[oss-security] 20161110 Re: jasper: use after free in jas_realloc (jas_malloc.c)', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201707-07', 'name': 'GLSA-201707-07', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1208', 'name': 'RHSA-2017:1208', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3693-1/', 'name': 'USN-3693-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.21', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple integer overflows in the (1) jas_realloc function in base/jas_malloc.c and (2) mem_resize function in base/jas_stream.c in JasPer before 1.900.22 allow remote attackers to cause a denial of service via a crafted image, which triggers use after free vulnerabilities.'}] | 2018-06-29T01:29Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-06 10:26:16-08:00 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new function jas_stream_memopen2, which takes a
buffer size specified as a size_t instead of an int.
This can be used in jas_image_cmpt_create to avoid potential
overflow problems.
Added a new function jas_deprecated to warn about reliance on
deprecated library behavior. | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | mem_write | mem_write( jas_stream_obj_t * obj , char * buf , int cnt) | ['obj', 'buf', 'cnt'] | static int mem_write(jas_stream_obj_t *obj, char *buf, int cnt)
{
int n;
int ret;
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
long newbufsize;
long newpos;
assert(buf);
assert(cnt >= 0);
JAS_DBGLOG(100, ("mem_write(%p, %p, %d)\n", obj, buf, cnt));
newpos = m->pos_ + cnt;
if (newpos > m->bufsize_ && m->growable_) {
newbufsize = m->bufsize_;
while (newbufsize < newpos) {
newbufsize <<= 1;
assert(newbufsize >= 0);
}
JAS_DBGLOG(100, ("mem_write resizing from %d to %z\n", m->bufsize_,
newbufsize));
JAS_DBGLOG(100, ("mem_write resizing from %d to %ul\n", m->bufsize_,
JAS_CAST(unsigned long, newbufsize)));
if (mem_resize(m, newbufsize)) {
return -1;
}
}
if (m->pos_ > m->len_) {
/* The current position is beyond the end of the file, so
pad the file to the current position with zeros. */
n = JAS_MIN(m->pos_, m->bufsize_) - m->len_;
if (n > 0) {
memset(&m->buf_[m->len_], 0, n);
m->len_ += n;
}
if (m->pos_ != m->len_) {
/* The buffer is not big enough. */
return 0;
}
}
n = m->bufsize_ - m->pos_;
ret = JAS_MIN(n, cnt);
if (ret > 0) {
memcpy(&m->buf_[m->pos_], buf, ret);
m->pos_ += ret;
}
if (m->pos_ > m->len_) {
m->len_ = m->pos_;
}
assert(ret == cnt);
return ret;
} | 317 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | main | main( int argc , char ** argv) | ['argc', 'argv'] | int main(int argc, char **argv)
{
int fmtid;
int id;
char *infile;
jas_stream_t *instream;
jas_image_t *image;
int width;
int height;
int depth;
int numcmpts;
int verbose;
char *fmtname;
int debug;
size_t max_mem;
if (jas_init()) {
abort();
}
cmdname = argv[0];
infile = 0;
verbose = 0;
debug = 0;
#if defined(JAS_DEFAULT_MAX_MEM_USAGE)
max_mem = JAS_DEFAULT_MAX_MEM_USAGE;
#endif
/* Parse the command line options. */
while ((id = jas_getopt(argc, argv, opts)) >= 0) {
switch (id) {
case OPT_VERBOSE:
verbose = 1;
break;
case OPT_VERSION:
printf("%s\n", JAS_VERSION);
exit(EXIT_SUCCESS);
break;
case OPT_DEBUG:
debug = atoi(jas_optarg);
break;
case OPT_INFILE:
infile = jas_optarg;
break;
case OPT_MAXMEM:
max_mem = strtoull(jas_optarg, 0, 10);
break;
case OPT_HELP:
default:
usage();
break;
}
}
jas_setdbglevel(debug);
#if defined(JAS_DEFAULT_MAX_MEM_USAGE)
jas_set_max_mem_usage(max_mem);
#endif
/* Open the image file. */
if (infile) {
/* The image is to be read from a file. */
if (!(instream = jas_stream_fopen(infile, "rb"))) {
fprintf(stderr, "cannot open input image file %s\n", infile);
exit(EXIT_FAILURE);
}
} else {
/* The image is to be read from standard input. */
if (!(instream = jas_stream_fdopen(0, "rb"))) {
fprintf(stderr, "cannot open standard input\n");
exit(EXIT_FAILURE);
}
}
if ((fmtid = jas_image_getfmt(instream)) < 0) {
fprintf(stderr, "unknown image format\n");
}
/* Decode the image. */
if (!(image = jas_image_decode(instream, fmtid, 0))) {
jas_stream_close(instream);
fprintf(stderr, "cannot load image\n");
return EXIT_FAILURE;
}
/* Close the image file. */
jas_stream_close(instream);
if (!(numcmpts = jas_image_numcmpts(image))) {
fprintf(stderr, "warning: image has no components\n");
}
if (numcmpts) {
width = jas_image_cmptwidth(image, 0);
height = jas_image_cmptheight(image, 0);
depth = jas_image_cmptprec(image, 0);
} else {
width = 0;
height = 0;
depth = 0;
}
if (!(fmtname = jas_image_fmttostr(fmtid))) {
abort();
}
printf("%s %d %d %d %d %ld\n", fmtname, numcmpts, width, height, depth, (long) jas_image_rawsize(image));
jas_image_destroy(image);
jas_image_clearfmts();
return EXIT_SUCCESS;
} | 447 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | main | main( int argc , char ** argv) | ['argc', 'argv'] | int main(int argc, char **argv)
{
int fmtid;
int id;
char *infile;
jas_stream_t *instream;
jas_image_t *image;
int width;
int height;
int depth;
int numcmpts;
int verbose;
char *fmtname;
int debug;
size_t max_mem;
if (jas_init()) {
abort();
}
cmdname = argv[0];
infile = 0;
verbose = 0;
debug = 0;
#if defined(JAS_DEFAULT_MAX_MEM_USAGE)
max_mem = JAS_DEFAULT_MAX_MEM_USAGE;
#endif
/* Parse the command line options. */
while ((id = jas_getopt(argc, argv, opts)) >= 0) {
switch (id) {
case OPT_VERBOSE:
verbose = 1;
break;
case OPT_VERSION:
printf("%s\n", JAS_VERSION);
exit(EXIT_SUCCESS);
break;
case OPT_DEBUG:
debug = atoi(jas_optarg);
break;
case OPT_INFILE:
infile = jas_optarg;
break;
case OPT_MAXMEM:
max_mem = strtoull(jas_optarg, 0, 10);
break;
case OPT_HELP:
default:
usage();
break;
}
}
jas_setdbglevel(debug);
#if defined(JAS_DEFAULT_MAX_MEM_USAGE)
jas_set_max_mem_usage(max_mem);
#endif
/* Open the image file. */
if (infile) {
/* The image is to be read from a file. */
if (!(instream = jas_stream_fopen(infile, "rb"))) {
fprintf(stderr, "cannot open input image file %s\n", infile);
exit(EXIT_FAILURE);
}
} else {
/* The image is to be read from standard input. */
if (!(instream = jas_stream_fdopen(0, "rb"))) {
fprintf(stderr, "cannot open standard input\n");
exit(EXIT_FAILURE);
}
}
if ((fmtid = jas_image_getfmt(instream)) < 0) {
fprintf(stderr, "unknown image format\n");
}
/* Decode the image. */
if (!(image = jas_image_decode(instream, fmtid, 0))) {
jas_stream_close(instream);
fprintf(stderr, "cannot load image\n");
return EXIT_FAILURE;
}
/* Close the image file. */
jas_stream_close(instream);
if (!(numcmpts = jas_image_numcmpts(image))) {
fprintf(stderr, "warning: image has no components\n");
}
if (numcmpts) {
width = jas_image_cmptwidth(image, 0);
height = jas_image_cmptheight(image, 0);
depth = jas_image_cmptprec(image, 0);
} else {
width = 0;
height = 0;
depth = 0;
}
if (!(fmtname = jas_image_fmttostr(fmtid))) {
abort();
}
printf("%s %d %d %d %d %ld\n", fmtname, numcmpts, width, height, depth, (long) jas_image_rawsize(image));
jas_image_destroy(image);
jas_image_clearfmts();
return EXIT_SUCCESS;
} | 447 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_memdump | jas_memdump( FILE * out , void * data , size_t len) | ['out', 'data', 'len'] | int jas_memdump(FILE *out, void *data, size_t len)
{
size_t i;
size_t j;
uchar *dp;
dp = data;
for (i = 0; i < len; i += 16) {
fprintf(out, "%04zx:", i);
for (j = 0; j < 16; ++j) {
if (i + j < len) {
fprintf(out, " %02x", dp[i + j]);
}
}
fprintf(out, "\n");
}
return 0;
} | 103 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_memdump | jas_memdump( FILE * out , void * data , size_t len) | ['out', 'data', 'len'] | int jas_memdump(FILE *out, void *data, size_t len)
{
size_t i;
size_t j;
uchar *dp;
dp = data;
for (i = 0; i < len; i += 16) {
fprintf(out, "%04zx:", i);
for (j = 0; j < 16; ++j) {
if (i + j < len) {
fprintf(out, " %02x", dp[i + j]);
}
}
fprintf(out, "\n");
}
return 0;
} | 103 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetsint32 | jas_iccgetsint32( jas_stream_t * in , jas_iccsint32_t * val) | ['in', 'val'] | static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 4, &tmp))
return -1;
*val = (tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) &
0x7fffffff) + 1))) : JAS_CAST(longlong, tmp);
return 0;
} | 70 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetsint32 | jas_iccgetsint32( jas_stream_t * in , jas_iccsint32_t * val) | ['in', 'val'] | static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 4, &tmp))
return -1;
*val = (tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) &
0x7fffffff) + 1))) : JAS_CAST(longlong, tmp);
return 0;
} | 70 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint | jas_iccgetuint( jas_stream_t * in , int n , ulonglong * val) | ['in', 'n', 'val'] | static int jas_iccgetuint(jas_stream_t *in, int n, ulonglong *val)
{
int i;
int c;
ulonglong v;
v = 0;
for (i = n; i > 0; --i) {
if ((c = jas_stream_getc(in)) == EOF)
return -1;
v = (v << 8) | c;
}
*val = v;
return 0;
} | 79 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint | jas_iccgetuint( jas_stream_t * in , int n , ulonglong * val) | ['in', 'n', 'val'] | static int jas_iccgetuint(jas_stream_t *in, int n, ulonglong *val)
{
int i;
int c;
ulonglong v;
v = 0;
for (i = n; i > 0; --i) {
if ((c = jas_stream_getc(in)) == EOF)
return -1;
v = (v << 8) | c;
}
*val = v;
return 0;
} | 79 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint16 | jas_iccgetuint16( jas_stream_t * in , jas_iccuint16_t * val) | ['in', 'val'] | static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 2, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint16 | jas_iccgetuint16( jas_stream_t * in , jas_iccuint16_t * val) | ['in', 'val'] | static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 2, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint32 | jas_iccgetuint32( jas_stream_t * in , jas_iccuint32_t * val) | ['in', 'val'] | static int jas_iccgetuint32(jas_stream_t *in, jas_iccuint32_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 4, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint32 | jas_iccgetuint32( jas_stream_t * in , jas_iccuint32_t * val) | ['in', 'val'] | static int jas_iccgetuint32(jas_stream_t *in, jas_iccuint32_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 4, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint64 | jas_iccgetuint64( jas_stream_t * in , jas_iccuint64_t * val) | ['in', 'val'] | static int jas_iccgetuint64(jas_stream_t *in, jas_iccuint64_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 8, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccgetuint64 | jas_iccgetuint64( jas_stream_t * in , jas_iccuint64_t * val) | ['in', 'val'] | static int jas_iccgetuint64(jas_stream_t *in, jas_iccuint64_t *val)
{
ulonglong tmp;
if (jas_iccgetuint(in, 8, &tmp))
return -1;
*val = tmp;
return 0;
} | 39 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccprof_createfrombuf | jas_iccprof_createfrombuf( uchar * buf , int len) | ['buf', 'len'] | jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len)
{
jas_stream_t *in;
jas_iccprof_t *prof;
if (!(in = jas_stream_memopen(JAS_CAST(char *, buf), len)))
goto error;
if (!(prof = jas_iccprof_load(in)))
goto error;
jas_stream_close(in);
return prof;
error:
if (in)
jas_stream_close(in);
return 0;
} | 79 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccprof_createfrombuf | jas_iccprof_createfrombuf( uchar * buf , int len) | ['buf', 'len'] | jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len)
{
jas_stream_t *in;
jas_iccprof_t *prof;
if (!(in = jas_stream_memopen(JAS_CAST(char *, buf), len)))
goto error;
if (!(prof = jas_iccprof_load(in)))
goto error;
jas_stream_close(in);
return prof;
error:
if (in)
jas_stream_close(in);
return 0;
} | 79 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccputsint | jas_iccputsint( jas_stream_t * out , int n , longlong val) | ['out', 'n', 'val'] | static int jas_iccputsint(jas_stream_t *out, int n, longlong val)
{
ulonglong tmp;
tmp = (val < 0) ? (abort(), 0) : val;
return jas_iccputuint(out, n, tmp);
} | 45 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccputsint | jas_iccputsint( jas_stream_t * out , int n , longlong val) | ['out', 'n', 'val'] | static int jas_iccputsint(jas_stream_t *out, int n, longlong val)
{
ulonglong tmp;
tmp = (val < 0) ? (abort(), 0) : val;
return jas_iccputuint(out, n, tmp);
} | 45 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccputuint | jas_iccputuint( jas_stream_t * out , int n , ulonglong val) | ['out', 'n', 'val'] | static int jas_iccputuint(jas_stream_t *out, int n, ulonglong val)
{
int i;
int c;
for (i = n; i > 0; --i) {
c = (val >> (8 * (i - 1))) & 0xff;
if (jas_stream_putc(out, c) == EOF)
return -1;
}
return 0;
} | 72 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_iccputuint | jas_iccputuint( jas_stream_t * out , int n , ulonglong val) | ['out', 'n', 'val'] | static int jas_iccputuint(jas_stream_t *out, int n, ulonglong val)
{
int i;
int c;
for (i = n; i > 0; --i) {
c = (val >> (8 * (i - 1))) & 0xff;
if (jas_stream_putc(out, c) == EOF)
return -1;
}
return 0;
} | 72 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | decode_twos_comp | decode_twos_comp( ulong c , int prec) | ['c', 'prec'] | static inline long decode_twos_comp(ulong c, int prec)
{
long result;
assert(prec >= 2);
jas_eprintf("warning: support for signed data is untested\n");
// NOTE: Is this correct?
result = (c & ((1 << (prec - 1)) - 1)) - (c & (1 << (prec - 1)));
return result;
} | 64 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | decode_twos_comp | decode_twos_comp( ulong c , int prec) | ['c', 'prec'] | static inline long decode_twos_comp(ulong c, int prec)
{
long result;
assert(prec >= 2);
jas_eprintf("warning: support for signed data is untested\n");
// NOTE: Is this correct?
result = (c & ((1 << (prec - 1)) - 1)) - (c & (1 << (prec - 1)));
return result;
} | 64 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | encode_twos_comp | encode_twos_comp( long n , int prec) | ['n', 'prec'] | static inline ulong encode_twos_comp(long n, int prec)
{
ulong result;
assert(prec >= 2);
jas_eprintf("warning: support for signed data is untested\n");
// NOTE: Is this correct?
if (n < 0) {
result = -n;
result = (result ^ 0xffffffffUL) + 1;
result &= (1 << prec) - 1;
} else {
result = n;
}
return result;
} | 69 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | encode_twos_comp | encode_twos_comp( long n , int prec) | ['n', 'prec'] | static inline ulong encode_twos_comp(long n, int prec)
{
ulong result;
assert(prec >= 2);
jas_eprintf("warning: support for signed data is untested\n");
// NOTE: Is this correct?
if (n < 0) {
result = -n;
result = (result ^ 0xffffffffUL) + 1;
result &= (1 << prec) - 1;
} else {
result = n;
}
return result;
} | 69 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_cmpt_create | jas_image_cmpt_create( int_fast32_t tlx , int_fast32_t tly , int_fast32_t hstep , int_fast32_t vstep , int_fast32_t width , int_fast32_t height , uint_fast16_t depth , bool sgnd , uint_fast32_t inmem) | ['tlx', 'tly', 'hstep', 'vstep', 'width', 'height', 'depth', 'sgnd', 'inmem'] | static jas_image_cmpt_t *jas_image_cmpt_create(int_fast32_t tlx,
int_fast32_t tly, int_fast32_t hstep, int_fast32_t vstep,
int_fast32_t width, int_fast32_t height, uint_fast16_t depth, bool sgnd,
uint_fast32_t inmem)
{
jas_image_cmpt_t *cmpt;
size_t size;
cmpt = 0;
if (width < 0 || height < 0 || hstep <= 0 || vstep <= 0) {
goto error;
}
if (!jas_safe_intfast32_add(tlx, width, 0) ||
!jas_safe_intfast32_add(tly, height, 0)) {
goto error;
}
if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) {
goto error;
}
cmpt->type_ = JAS_IMAGE_CT_UNKNOWN;
cmpt->tlx_ = tlx;
cmpt->tly_ = tly;
cmpt->hstep_ = hstep;
cmpt->vstep_ = vstep;
cmpt->width_ = width;
cmpt->height_ = height;
cmpt->prec_ = depth;
cmpt->sgnd_ = sgnd;
cmpt->stream_ = 0;
cmpt->cps_ = (depth + 7) / 8;
// Compute the number of samples in the image component, while protecting
// against overflow.
// size = cmpt->width_ * cmpt->height_ * cmpt->cps_;
if (!jas_safe_size_mul(cmpt->width_, cmpt->height_, &size) ||
!jas_safe_size_mul(size, cmpt->cps_, &size)) {
goto error;
}
cmpt->stream_ = (inmem) ? jas_stream_memopen2(0, size) :
jas_stream_tmpfile();
if (!cmpt->stream_) {
goto error;
}
/* Zero the component data. This isn't necessary, but it is
convenient for debugging purposes. */
/* Note: conversion of size - 1 to long can overflow */
if (size > 0) {
if (size - 1 > LONG_MAX) {
goto error;
}
if (jas_stream_seek(cmpt->stream_, size - 1, SEEK_SET) < 0 ||
jas_stream_putc(cmpt->stream_, 0) == EOF ||
jas_stream_seek(cmpt->stream_, 0, SEEK_SET) < 0) {
goto error;
}
}
return cmpt;
error:
if (cmpt) {
jas_image_cmpt_destroy(cmpt);
}
return 0;
} | 336 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_cmpt_create | jas_image_cmpt_create( int_fast32_t tlx , int_fast32_t tly , int_fast32_t hstep , int_fast32_t vstep , int_fast32_t width , int_fast32_t height , uint_fast16_t depth , bool sgnd , uint_fast32_t inmem) | ['tlx', 'tly', 'hstep', 'vstep', 'width', 'height', 'depth', 'sgnd', 'inmem'] | static jas_image_cmpt_t *jas_image_cmpt_create(int_fast32_t tlx,
int_fast32_t tly, int_fast32_t hstep, int_fast32_t vstep,
int_fast32_t width, int_fast32_t height, uint_fast16_t depth, bool sgnd,
uint_fast32_t inmem)
{
jas_image_cmpt_t *cmpt;
size_t size;
cmpt = 0;
if (width < 0 || height < 0 || hstep <= 0 || vstep <= 0) {
goto error;
}
if (!jas_safe_intfast32_add(tlx, width, 0) ||
!jas_safe_intfast32_add(tly, height, 0)) {
goto error;
}
if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) {
goto error;
}
cmpt->type_ = JAS_IMAGE_CT_UNKNOWN;
cmpt->tlx_ = tlx;
cmpt->tly_ = tly;
cmpt->hstep_ = hstep;
cmpt->vstep_ = vstep;
cmpt->width_ = width;
cmpt->height_ = height;
cmpt->prec_ = depth;
cmpt->sgnd_ = sgnd;
cmpt->stream_ = 0;
cmpt->cps_ = (depth + 7) / 8;
// Compute the number of samples in the image component, while protecting
// against overflow.
// size = cmpt->width_ * cmpt->height_ * cmpt->cps_;
if (!jas_safe_size_mul(cmpt->width_, cmpt->height_, &size) ||
!jas_safe_size_mul(size, cmpt->cps_, &size)) {
goto error;
}
cmpt->stream_ = (inmem) ? jas_stream_memopen2(0, size) :
jas_stream_tmpfile();
if (!cmpt->stream_) {
goto error;
}
/* Zero the component data. This isn't necessary, but it is
convenient for debugging purposes. */
/* Note: conversion of size - 1 to long can overflow */
if (size > 0) {
if (size - 1 > LONG_MAX) {
goto error;
}
if (jas_stream_seek(cmpt->stream_, size - 1, SEEK_SET) < 0 ||
jas_stream_putc(cmpt->stream_, 0) == EOF ||
jas_stream_seek(cmpt->stream_, 0, SEEK_SET) < 0) {
goto error;
}
}
return cmpt;
error:
if (cmpt) {
jas_image_cmpt_destroy(cmpt);
}
return 0;
} | 336 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_create | jas_image_create( int numcmpts , jas_image_cmptparm_t * cmptparms , int clrspc) | ['numcmpts', 'cmptparms', 'clrspc'] | jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms,
int clrspc)
{
jas_image_t *image;
uint_fast32_t rawsize;
uint_fast32_t inmem;
int cmptno;
jas_image_cmptparm_t *cmptparm;
if (!(image = jas_image_create0())) {
return 0;
}
image->clrspc_ = clrspc;
image->maxcmpts_ = numcmpts;
image->inmem_ = true;
/* Allocate memory for the per-component information. */
if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_,
sizeof(jas_image_cmpt_t *)))) {
jas_image_destroy(image);
return 0;
}
/* Initialize in case of failure. */
for (cmptno = 0; cmptno < image->maxcmpts_; ++cmptno) {
image->cmpts_[cmptno] = 0;
}
/* Compute the approximate raw size of the image. */
rawsize = 0;
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
rawsize += cmptparm->width * cmptparm->height *
(cmptparm->prec + 7) / 8;
}
/* Decide whether to buffer the image data in memory, based on the
raw size of the image. */
inmem = (rawsize < JAS_IMAGE_INMEMTHRESH);
/* Create the individual image components. */
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
if (!(image->cmpts_[cmptno] = jas_image_cmpt_create(cmptparm->tlx,
cmptparm->tly, cmptparm->hstep, cmptparm->vstep,
cmptparm->width, cmptparm->height, cmptparm->prec,
cmptparm->sgnd, inmem))) {
jas_image_destroy(image);
return 0;
}
++image->numcmpts_;
}
/* Determine the bounding box for all of the components on the
reference grid (i.e., the image area) */
jas_image_setbbox(image);
return image;
} | 271 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_create | jas_image_create( int numcmpts , jas_image_cmptparm_t * cmptparms , int clrspc) | ['numcmpts', 'cmptparms', 'clrspc'] | jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms,
int clrspc)
{
jas_image_t *image;
uint_fast32_t rawsize;
uint_fast32_t inmem;
int cmptno;
jas_image_cmptparm_t *cmptparm;
if (!(image = jas_image_create0())) {
return 0;
}
image->clrspc_ = clrspc;
image->maxcmpts_ = numcmpts;
image->inmem_ = true;
/* Allocate memory for the per-component information. */
if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_,
sizeof(jas_image_cmpt_t *)))) {
jas_image_destroy(image);
return 0;
}
/* Initialize in case of failure. */
for (cmptno = 0; cmptno < image->maxcmpts_; ++cmptno) {
image->cmpts_[cmptno] = 0;
}
/* Compute the approximate raw size of the image. */
rawsize = 0;
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
rawsize += cmptparm->width * cmptparm->height *
(cmptparm->prec + 7) / 8;
}
/* Decide whether to buffer the image data in memory, based on the
raw size of the image. */
inmem = (rawsize < JAS_IMAGE_INMEMTHRESH);
/* Create the individual image components. */
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
if (!(image->cmpts_[cmptno] = jas_image_cmpt_create(cmptparm->tlx,
cmptparm->tly, cmptparm->hstep, cmptparm->vstep,
cmptparm->width, cmptparm->height, cmptparm->prec,
cmptparm->sgnd, inmem))) {
jas_image_destroy(image);
return 0;
}
++image->numcmpts_;
}
/* Determine the bounding box for all of the components on the
reference grid (i.e., the image area) */
jas_image_setbbox(image);
return image;
} | 271 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_create0 | jas_image_create0() | [] | jas_image_t *jas_image_create0()
{
jas_image_t *image;
if (!(image = jas_malloc(sizeof(jas_image_t)))) {
return 0;
}
image->tlx_ = 0;
image->tly_ = 0;
image->brx_ = 0;
image->bry_ = 0;
image->clrspc_ = JAS_CLRSPC_UNKNOWN;
image->numcmpts_ = 0;
image->maxcmpts_ = 0;
image->cmpts_ = 0;
image->inmem_ = true;
image->cmprof_ = 0;
return image;
} | 92 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_image_create0 | jas_image_create0() | [] | jas_image_t *jas_image_create0()
{
jas_image_t *image;
if (!(image = jas_malloc(sizeof(jas_image_t)))) {
return 0;
}
image->tlx_ = 0;
image->tly_ = 0;
image->brx_ = 0;
image->bry_ = 0;
image->clrspc_ = JAS_CLRSPC_UNKNOWN;
image->numcmpts_ = 0;
image->maxcmpts_ = 0;
image->cmpts_ = 0;
image->inmem_ = true;
image->cmprof_ = 0;
return image;
} | 92 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | putint | putint( jas_stream_t * out , int sgnd , int prec , long val) | ['out', 'sgnd', 'prec', 'val'] | static int putint(jas_stream_t *out, int sgnd, int prec, long val)
{
int n;
int c;
bool s;
ulong tmp;
assert((!sgnd && prec >= 1) || (sgnd && prec >= 2));
if (sgnd) {
val = encode_twos_comp(val, prec);
}
assert(val >= 0);
val &= (1 << prec) - 1;
n = (prec + 7) / 8;
while (--n >= 0) {
c = (val >> (n * 8)) & 0xff;
if (jas_stream_putc(out, c) != c)
return -1;
}
return 0;
} | 134 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | putint | putint( jas_stream_t * out , int sgnd , int prec , long val) | ['out', 'sgnd', 'prec', 'val'] | static int putint(jas_stream_t *out, int sgnd, int prec, long val)
{
int n;
int c;
bool s;
ulong tmp;
assert((!sgnd && prec >= 1) || (sgnd && prec >= 2));
if (sgnd) {
val = encode_twos_comp(val, prec);
}
assert(val >= 0);
val &= (1 << prec) - 1;
n = (prec + 7) / 8;
while (--n >= 0) {
c = (val >> (n * 8)) & 0xff;
if (jas_stream_putc(out, c) != c)
return -1;
}
return 0;
} | 134 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_asl | jas_matrix_asl( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_asl(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
//*data <<= n;
*data = jas_seqent_asl(*data, n);
}
}
}
} | 125 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_asl | jas_matrix_asl( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_asl(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
//*data <<= n;
*data = jas_seqent_asl(*data, n);
}
}
}
} | 125 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_asr | jas_matrix_asr( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_asr(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
assert(n >= 0);
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
//*data >>= n;
*data = jas_seqent_asr(*data, n);
}
}
}
} | 132 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_asr | jas_matrix_asr( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_asr(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
assert(n >= 0);
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
//*data >>= n;
*data = jas_seqent_asr(*data, n);
}
}
}
} | 132 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_bindsub | jas_matrix_bindsub( jas_matrix_t * mat0 , jas_matrix_t * mat1 , int r0 , int c0 , int r1 , int c1) | ['mat0', 'mat1', 'r0', 'c0', 'r1', 'c1'] | void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0,
int c0, int r1, int c1)
{
int i;
if (mat0->data_) {
if (!(mat0->flags_ & JAS_MATRIX_REF)) {
jas_free(mat0->data_);
}
mat0->data_ = 0;
mat0->datasize_ = 0;
}
if (mat0->rows_) {
jas_free(mat0->rows_);
mat0->rows_ = 0;
}
mat0->flags_ |= JAS_MATRIX_REF;
mat0->numrows_ = r1 - r0 + 1;
mat0->numcols_ = c1 - c0 + 1;
mat0->maxrows_ = mat0->numrows_;
if (!(mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)))) {
/*
There is no way to indicate failure to the caller.
So, we have no choice but to abort.
Ideally, this function should have a non-void return type.
In practice, a non-void return type probably would not help
much anyways as the caller would just have to terminate anyways.
*/
abort();
}
for (i = 0; i < mat0->numrows_; ++i) {
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
}
mat0->xstart_ = mat1->xstart_ + c0;
mat0->ystart_ = mat1->ystart_ + r0;
mat0->xend_ = mat0->xstart_ + mat0->numcols_;
mat0->yend_ = mat0->ystart_ + mat0->numrows_;
} | 229 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_bindsub | jas_matrix_bindsub( jas_matrix_t * mat0 , jas_matrix_t * mat1 , int r0 , int c0 , int r1 , int c1) | ['mat0', 'mat1', 'r0', 'c0', 'r1', 'c1'] | void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0,
int c0, int r1, int c1)
{
int i;
if (mat0->data_) {
if (!(mat0->flags_ & JAS_MATRIX_REF)) {
jas_free(mat0->data_);
}
mat0->data_ = 0;
mat0->datasize_ = 0;
}
if (mat0->rows_) {
jas_free(mat0->rows_);
mat0->rows_ = 0;
}
mat0->flags_ |= JAS_MATRIX_REF;
mat0->numrows_ = r1 - r0 + 1;
mat0->numcols_ = c1 - c0 + 1;
mat0->maxrows_ = mat0->numrows_;
if (!(mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)))) {
/*
There is no way to indicate failure to the caller.
So, we have no choice but to abort.
Ideally, this function should have a non-void return type.
In practice, a non-void return type probably would not help
much anyways as the caller would just have to terminate anyways.
*/
abort();
}
for (i = 0; i < mat0->numrows_; ++i) {
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
}
mat0->xstart_ = mat1->xstart_ + c0;
mat0->ystart_ = mat1->ystart_ + r0;
mat0->xend_ = mat0->xstart_ + mat0->numcols_;
mat0->yend_ = mat0->ystart_ + mat0->numrows_;
} | 229 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_clip | jas_matrix_clip( jas_matrix_t * matrix , jas_seqent_t minval , jas_seqent_t maxval) | ['matrix', 'minval', 'maxval'] | void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval,
jas_seqent_t maxval)
{
int i;
int j;
jas_seqent_t v;
jas_seqent_t *rowstart;
jas_seqent_t *data;
int rowstep;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
data = rowstart;
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
v = *data;
if (v < minval) {
*data = minval;
} else if (v > maxval) {
*data = maxval;
}
}
}
}
} | 156 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_clip | jas_matrix_clip( jas_matrix_t * matrix , jas_seqent_t minval , jas_seqent_t maxval) | ['matrix', 'minval', 'maxval'] | void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval,
jas_seqent_t maxval)
{
int i;
int j;
jas_seqent_t v;
jas_seqent_t *rowstart;
jas_seqent_t *data;
int rowstep;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
data = rowstart;
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
v = *data;
if (v < minval) {
*data = minval;
} else if (v > maxval) {
*data = maxval;
}
}
}
}
} | 156 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_cmp | jas_matrix_cmp( jas_matrix_t * mat0 , jas_matrix_t * mat1) | ['mat0', 'mat1'] | int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
{
int i;
int j;
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
mat1->numcols_) {
return 1;
}
for (i = 0; i < mat0->numrows_; i++) {
for (j = 0; j < mat0->numcols_; j++) {
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
return 1;
}
}
}
return 0;
} | 103 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_cmp | jas_matrix_cmp( jas_matrix_t * mat0 , jas_matrix_t * mat1) | ['mat0', 'mat1'] | int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
{
int i;
int j;
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
mat1->numcols_) {
return 1;
}
for (i = 0; i < mat0->numrows_; i++) {
for (j = 0; j < mat0->numcols_; j++) {
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
return 1;
}
}
}
return 0;
} | 103 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_copy | jas_matrix_copy( jas_matrix_t * x) | ['x'] | jas_matrix_t *jas_matrix_copy(jas_matrix_t *x)
{
jas_matrix_t *y;
int i;
int j;
y = jas_matrix_create(x->numrows_, x->numcols_);
for (i = 0; i < x->numrows_; ++i) {
for (j = 0; j < x->numcols_; ++j) {
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
}
}
return y;
} | 87 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_copy | jas_matrix_copy( jas_matrix_t * x) | ['x'] | jas_matrix_t *jas_matrix_copy(jas_matrix_t *x)
{
jas_matrix_t *y;
int i;
int j;
y = jas_matrix_create(x->numrows_, x->numcols_);
for (i = 0; i < x->numrows_; ++i) {
for (j = 0; j < x->numcols_; ++j) {
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
}
}
return y;
} | 87 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_create | jas_matrix_create( int numrows , int numcols) | ['numrows', 'numcols'] | jas_matrix_t *jas_matrix_create(int numrows, int numcols)
{
jas_matrix_t *matrix;
int i;
size_t size;
matrix = 0;
if (numrows < 0 || numcols < 0) {
goto error;
}
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
goto error;
}
matrix->flags_ = 0;
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
matrix->rows_ = 0;
matrix->maxrows_ = numrows;
matrix->data_ = 0;
matrix->datasize_ = 0;
// matrix->datasize_ = numrows * numcols;
if (!jas_safe_size_mul(numrows, numcols, &size)) {
goto error;
}
matrix->datasize_ = size;
if (matrix->maxrows_ > 0) {
if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
sizeof(jas_seqent_t *)))) {
goto error;
}
}
if (matrix->datasize_ > 0) {
if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
sizeof(jas_seqent_t)))) {
goto error;
}
}
for (i = 0; i < numrows; ++i) {
matrix->rows_[i] = &matrix->data_[i * matrix->numcols_];
}
for (i = 0; i < matrix->datasize_; ++i) {
matrix->data_[i] = 0;
}
matrix->xstart_ = 0;
matrix->ystart_ = 0;
matrix->xend_ = matrix->numcols_;
matrix->yend_ = matrix->numrows_;
return matrix;
error:
if (matrix) {
jas_matrix_destroy(matrix);
}
return 0;
} | 305 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_create | jas_matrix_create( int numrows , int numcols) | ['numrows', 'numcols'] | jas_matrix_t *jas_matrix_create(int numrows, int numcols)
{
jas_matrix_t *matrix;
int i;
size_t size;
matrix = 0;
if (numrows < 0 || numcols < 0) {
goto error;
}
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
goto error;
}
matrix->flags_ = 0;
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
matrix->rows_ = 0;
matrix->maxrows_ = numrows;
matrix->data_ = 0;
matrix->datasize_ = 0;
// matrix->datasize_ = numrows * numcols;
if (!jas_safe_size_mul(numrows, numcols, &size)) {
goto error;
}
matrix->datasize_ = size;
if (matrix->maxrows_ > 0) {
if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
sizeof(jas_seqent_t *)))) {
goto error;
}
}
if (matrix->datasize_ > 0) {
if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
sizeof(jas_seqent_t)))) {
goto error;
}
}
for (i = 0; i < numrows; ++i) {
matrix->rows_[i] = &matrix->data_[i * matrix->numcols_];
}
for (i = 0; i < matrix->datasize_; ++i) {
matrix->data_[i] = 0;
}
matrix->xstart_ = 0;
matrix->ystart_ = 0;
matrix->xend_ = matrix->numcols_;
matrix->yend_ = matrix->numrows_;
return matrix;
error:
if (matrix) {
jas_matrix_destroy(matrix);
}
return 0;
} | 305 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_divpow2 | jas_matrix_divpow2( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_divpow2(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
*data = (*data >= 0) ? ((*data) >> n) :
(-((-(*data)) >> n));
}
}
}
} | 150 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_divpow2 | jas_matrix_divpow2( jas_matrix_t * matrix , int n) | ['matrix', 'n'] | void jas_matrix_divpow2(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
*data = (*data >= 0) ? ((*data) >> n) :
(-((-(*data)) >> n));
}
}
}
} | 150 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_resize | jas_matrix_resize( jas_matrix_t * matrix , int numrows , int numcols) | ['matrix', 'numrows', 'numcols'] | int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols)
{
int size;
int i;
size = numrows * numcols;
if (size > matrix->datasize_ || numrows > matrix->maxrows_) {
return -1;
}
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
for (i = 0; i < numrows; ++i) {
matrix->rows_[i] = &matrix->data_[numcols * i];
}
return 0;
} | 93 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_resize | jas_matrix_resize( jas_matrix_t * matrix , int numrows , int numcols) | ['matrix', 'numrows', 'numcols'] | int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols)
{
int size;
int i;
size = numrows * numcols;
if (size > matrix->datasize_ || numrows > matrix->maxrows_) {
return -1;
}
matrix->numrows_ = numrows;
matrix->numcols_ = numcols;
for (i = 0; i < numrows; ++i) {
matrix->rows_[i] = &matrix->data_[numcols * i];
}
return 0;
} | 93 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_setall | jas_matrix_setall( jas_matrix_t * matrix , jas_seqent_t val) | ['matrix', 'val'] | void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
*data = val;
}
}
}
} | 119 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_matrix_setall | jas_matrix_setall( jas_matrix_t * matrix , jas_seqent_t val) | ['matrix', 'val'] | void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) {
assert(matrix->rows_);
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
++data) {
*data = val;
}
}
}
} | 119 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_bindsub | jas_seq2d_bindsub( jas_matrix_t * s , jas_matrix_t * s1 , int xstart , int ystart , int xend , int yend) | ['s', 's1', 'xstart', 'ystart', 'xend', 'yend'] | void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
int ystart, int xend, int yend)
{
jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_,
yend - s1->ystart_ - 1, xend - s1->xstart_ - 1);
} | 59 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_bindsub | jas_seq2d_bindsub( jas_matrix_t * s , jas_matrix_t * s1 , int xstart , int ystart , int xend , int yend) | ['s', 's1', 'xstart', 'ystart', 'xend', 'yend'] | void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
int ystart, int xend, int yend)
{
jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_,
yend - s1->ystart_ - 1, xend - s1->xstart_ - 1);
} | 59 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_copy | jas_seq2d_copy( jas_seq2d_t * x) | ['x'] | jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x)
{
jas_matrix_t *y;
int i;
int j;
y = jas_seq2d_create(jas_seq2d_xstart(x), jas_seq2d_ystart(x),
jas_seq2d_xend(x), jas_seq2d_yend(x));
assert(y);
for (i = 0; i < x->numrows_; ++i) {
for (j = 0; j < x->numcols_; ++j) {
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
}
}
return y;
} | 104 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_copy | jas_seq2d_copy( jas_seq2d_t * x) | ['x'] | jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x)
{
jas_matrix_t *y;
int i;
int j;
y = jas_seq2d_create(jas_seq2d_xstart(x), jas_seq2d_ystart(x),
jas_seq2d_xend(x), jas_seq2d_yend(x));
assert(y);
for (i = 0; i < x->numrows_; ++i) {
for (j = 0; j < x->numcols_; ++j) {
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
}
}
return y;
} | 104 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_create | jas_seq2d_create( int xstart , int ystart , int xend , int yend) | ['xstart', 'ystart', 'xend', 'yend'] | jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend)
{
jas_matrix_t *matrix;
assert(xstart <= xend && ystart <= yend);
if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) {
return 0;
}
matrix->xstart_ = xstart;
matrix->ystart_ = ystart;
matrix->xend_ = xend;
matrix->yend_ = yend;
return matrix;
} | 81 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_create | jas_seq2d_create( int xstart , int ystart , int xend , int yend) | ['xstart', 'ystart', 'xend', 'yend'] | jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend)
{
jas_matrix_t *matrix;
assert(xstart <= xend && ystart <= yend);
if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) {
return 0;
}
matrix->xstart_ = xstart;
matrix->ystart_ = ystart;
matrix->xend_ = xend;
matrix->yend_ = yend;
return matrix;
} | 81 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_input | jas_seq2d_input( FILE * in) | ['in'] | jas_matrix_t *jas_seq2d_input(FILE *in)
{
jas_matrix_t *matrix;
int i;
int j;
long x;
int numrows;
int numcols;
int xoff;
int yoff;
if (fscanf(in, "%d %d", &xoff, &yoff) != 2)
return 0;
if (fscanf(in, "%d %d", &numcols, &numrows) != 2)
return 0;
if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows)))
return 0;
if (jas_matrix_numrows(matrix) != numrows ||
jas_matrix_numcols(matrix) != numcols) {
abort();
}
/* Get matrix data. */
for (i = 0; i < jas_matrix_numrows(matrix); i++) {
for (j = 0; j < jas_matrix_numcols(matrix); j++) {
if (fscanf(in, "%ld", &x) != 1) {
jas_matrix_destroy(matrix);
return 0;
}
jas_matrix_set(matrix, i, j, JAS_CAST(jas_seqent_t, x));
}
}
return matrix;
} | 199 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_input | jas_seq2d_input( FILE * in) | ['in'] | jas_matrix_t *jas_seq2d_input(FILE *in)
{
jas_matrix_t *matrix;
int i;
int j;
long x;
int numrows;
int numcols;
int xoff;
int yoff;
if (fscanf(in, "%d %d", &xoff, &yoff) != 2)
return 0;
if (fscanf(in, "%d %d", &numcols, &numrows) != 2)
return 0;
if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows)))
return 0;
if (jas_matrix_numrows(matrix) != numrows ||
jas_matrix_numcols(matrix) != numcols) {
abort();
}
/* Get matrix data. */
for (i = 0; i < jas_matrix_numrows(matrix); i++) {
for (j = 0; j < jas_matrix_numcols(matrix); j++) {
if (fscanf(in, "%ld", &x) != 1) {
jas_matrix_destroy(matrix);
return 0;
}
jas_matrix_set(matrix, i, j, JAS_CAST(jas_seqent_t, x));
}
}
return matrix;
} | 199 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_output | jas_seq2d_output( jas_matrix_t * matrix , FILE * out) | ['matrix', 'out'] | int jas_seq2d_output(jas_matrix_t *matrix, FILE *out)
{
#define MAXLINELEN 80
int i;
int j;
jas_seqent_t x;
char buf[MAXLINELEN + 1];
char sbuf[MAXLINELEN + 1];
int n;
fprintf(out, "%"PRIiFAST32" %"PRIiFAST32"\n", jas_seq2d_xstart(matrix),
jas_seq2d_ystart(matrix));
fprintf(out, "%"PRIiFAST32" %"PRIiFAST32"\n", jas_matrix_numcols(matrix),
jas_matrix_numrows(matrix));
buf[0] = '\0';
for (i = 0; i < jas_matrix_numrows(matrix); ++i) {
for (j = 0; j < jas_matrix_numcols(matrix); ++j) {
x = jas_matrix_get(matrix, i, j);
sprintf(sbuf, "%s%4ld", (strlen(buf) > 0) ? " " : "",
JAS_CAST(long, x));
n = JAS_CAST(int, strlen(buf));
if (n + JAS_CAST(int, strlen(sbuf)) > MAXLINELEN) {
fputs(buf, out);
fputs("\n", out);
buf[0] = '\0';
}
strcat(buf, sbuf);
if (j == jas_matrix_numcols(matrix) - 1) {
fputs(buf, out);
fputs("\n", out);
buf[0] = '\0';
}
}
}
fputs(buf, out);
return 0;
} | 265 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_seq2d_output | jas_seq2d_output( jas_matrix_t * matrix , FILE * out) | ['matrix', 'out'] | int jas_seq2d_output(jas_matrix_t *matrix, FILE *out)
{
#define MAXLINELEN 80
int i;
int j;
jas_seqent_t x;
char buf[MAXLINELEN + 1];
char sbuf[MAXLINELEN + 1];
int n;
fprintf(out, "%"PRIiFAST32" %"PRIiFAST32"\n", jas_seq2d_xstart(matrix),
jas_seq2d_ystart(matrix));
fprintf(out, "%"PRIiFAST32" %"PRIiFAST32"\n", jas_matrix_numcols(matrix),
jas_matrix_numrows(matrix));
buf[0] = '\0';
for (i = 0; i < jas_matrix_numrows(matrix); ++i) {
for (j = 0; j < jas_matrix_numcols(matrix); ++j) {
x = jas_matrix_get(matrix, i, j);
sprintf(sbuf, "%s%4ld", (strlen(buf) > 0) ? " " : "",
JAS_CAST(long, x));
n = JAS_CAST(int, strlen(buf));
if (n + JAS_CAST(int, strlen(sbuf)) > MAXLINELEN) {
fputs(buf, out);
fputs("\n", out);
buf[0] = '\0';
}
strcat(buf, sbuf);
if (j == jas_matrix_numcols(matrix) - 1) {
fputs(buf, out);
fputs("\n", out);
buf[0] = '\0';
}
}
}
fputs(buf, out);
return 0;
} | 265 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_stream_initbuf | jas_stream_initbuf( jas_stream_t * stream , int bufmode , char * buf , int bufsize) | ['stream', 'bufmode', 'buf', 'bufsize'] | static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf,
int bufsize)
{
/* If this function is being called, the buffer should not have been
initialized yet. */
assert(!stream->bufbase_);
if (bufmode != JAS_STREAM_UNBUF) {
/* The full- or line-buffered mode is being employed. */
if (!buf) {
/* The caller has not specified a buffer to employ, so allocate
one. */
if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE +
JAS_STREAM_MAXPUTBACK))) {
stream->bufmode_ |= JAS_STREAM_FREEBUF;
stream->bufsize_ = JAS_STREAM_BUFSIZE;
} else {
/* The buffer allocation has failed. Resort to unbuffered
operation. */
stream->bufbase_ = stream->tinybuf_;
stream->bufsize_ = 1;
}
} else {
/* The caller has specified a buffer to employ. */
/* The buffer must be large enough to accommodate maximum
putback. */
assert(bufsize > JAS_STREAM_MAXPUTBACK);
stream->bufbase_ = JAS_CAST(uchar *, buf);
stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK;
}
} else {
/* The unbuffered mode is being employed. */
/* A buffer should not have been supplied by the caller. */
assert(!buf);
/* Use a trivial one-character buffer. */
stream->bufbase_ = stream->tinybuf_;
stream->bufsize_ = 1;
}
stream->bufstart_ = &stream->bufbase_[JAS_STREAM_MAXPUTBACK];
stream->ptr_ = stream->bufstart_;
stream->cnt_ = 0;
stream->bufmode_ |= bufmode & JAS_STREAM_BUFMODEMASK;
} | 174 | True | 1 |
CVE-2016-9557 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1398251', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'name': 'https://blogs.gentoo.org/ago/2016/11/19/jasper-signed-integer-overflow-in-jas_image-c', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94490', 'name': '94490', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/23/2', 'name': '[oss-security] 20161122 Re: jasper: signed integer overflow in jas_image.c', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Integer overflow in jas_image.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (application crash) via a crafted file.'}] | 2017-03-27T17:30Z | 2017-03-23T18:59Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | jas_stream_initbuf | jas_stream_initbuf( jas_stream_t * stream , int bufmode , char * buf , int bufsize) | ['stream', 'bufmode', 'buf', 'bufsize'] | static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf,
int bufsize)
{
/* If this function is being called, the buffer should not have been
initialized yet. */
assert(!stream->bufbase_);
if (bufmode != JAS_STREAM_UNBUF) {
/* The full- or line-buffered mode is being employed. */
if (!buf) {
/* The caller has not specified a buffer to employ, so allocate
one. */
if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE +
JAS_STREAM_MAXPUTBACK))) {
stream->bufmode_ |= JAS_STREAM_FREEBUF;
stream->bufsize_ = JAS_STREAM_BUFSIZE;
} else {
/* The buffer allocation has failed. Resort to unbuffered
operation. */
stream->bufbase_ = stream->tinybuf_;
stream->bufsize_ = 1;
}
} else {
/* The caller has specified a buffer to employ. */
/* The buffer must be large enough to accommodate maximum
putback. */
assert(bufsize > JAS_STREAM_MAXPUTBACK);
stream->bufbase_ = JAS_CAST(uchar *, buf);
stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK;
}
} else {
/* The unbuffered mode is being employed. */
/* A buffer should not have been supplied by the caller. */
assert(!buf);
/* Use a trivial one-character buffer. */
stream->bufbase_ = stream->tinybuf_;
stream->bufsize_ = 1;
}
stream->bufstart_ = &stream->bufbase_[JAS_STREAM_MAXPUTBACK];
stream->ptr_ = stream->bufstart_;
stream->cnt_ = 0;
stream->bufmode_ |= bufmode & JAS_STREAM_BUFMODEMASK;
} | 174 | True | 1 |
CVE-2016-9395 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'name': 'https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396977', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'name': 'https://blogs.gentoo.org/ago/2016/11/16/jasper-multiple-assertion-failure', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94376', 'name': '94376', 'refsource': 'BID', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/17/1', 'name': '[oss-security] 20161117 Re: jasper: multiple assertion failures', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00009.html', 'name': 'openSUSE-SU-2017:0101', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00008.html', 'name': 'SUSE-SU-2017:0084', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jasper_project:jasper:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.900.24', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The jas_seq2d_create function in jas_seq.c in JasPer before 1.900.25 allows remote attackers to cause a denial of service (assertion failure) via a crafted file.'}] | 2017-03-27T17:14Z | 2017-03-23T18:59Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Michael Adams | 2016-11-11 16:27:34-08:00 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict the maximum size of image that they can decode. This change
was made as a (possibly temporary) fix to address security concerns.
A max_samples command-line option has also been added to imginfo.
Whether an image component (for jas_image_t) is stored in memory or on
disk is now based on the component size (rather than the image size).
Some debug log message were added.
Some new integer overflow checks were added.
Some new safe integer add/multiply functions were added.
More pre-C99 cruft was removed. JasPer has numerous "hacks" to
handle pre-C99 compilers. JasPer now assumes C99 support. So, this
pre-C99 cruft is unnecessary and can be removed.
The regression jasper-doublefree-mem_close.jpg has been re-enabled.
Theoretically, it should work more predictably now. | d42b2388f7f8e0332c846675133acea151fc557a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | mdadams | visit repo url | visit repo url | bmp_decode | bmp_decode( jas_stream_t * in , char * optstr) | ['in', 'optstr'] | jas_image_t *bmp_decode(jas_stream_t *in, char *optstr)
{
jas_image_t *image;
bmp_hdr_t hdr;
bmp_info_t *info;
uint_fast16_t cmptno;
jas_image_cmptparm_t cmptparms[3];
jas_image_cmptparm_t *cmptparm;
uint_fast16_t numcmpts;
long n;
image = 0;
info = 0;
if (optstr) {
jas_eprintf("warning: ignoring BMP decoder options\n");
}
jas_eprintf(
"THE BMP FORMAT IS NOT FULLY SUPPORTED!\n"
"THAT IS, THE JASPER SOFTWARE CANNOT DECODE ALL TYPES OF BMP DATA.\n"
"IF YOU HAVE ANY PROBLEMS, PLEASE TRY CONVERTING YOUR IMAGE DATA\n"
"TO THE PNM FORMAT, AND USING THIS FORMAT INSTEAD.\n"
);
/* Read the bitmap header. */
if (bmp_gethdr(in, &hdr)) {
jas_eprintf("cannot get header\n");
goto error;
//return 0;
}
JAS_DBGLOG(1, (
"BMP header: magic 0x%x; siz %d; res1 %d; res2 %d; off %d\n",
hdr.magic, hdr.siz, hdr.reserved1, hdr.reserved2, hdr.off
));
/* Read the bitmap information. */
if (!(info = bmp_getinfo(in))) {
jas_eprintf("cannot get info\n");
//return 0;
goto error;
}
JAS_DBGLOG(1,
("BMP information: len %ld; width %ld; height %ld; numplanes %d; "
"depth %d; enctype %ld; siz %ld; hres %ld; vres %ld; numcolors %ld; "
"mincolors %ld\n", JAS_CAST(long, info->len),
JAS_CAST(long, info->width), JAS_CAST(long, info->height),
JAS_CAST(long, info->numplanes), JAS_CAST(long, info->depth),
JAS_CAST(long, info->enctype), JAS_CAST(long, info->siz),
JAS_CAST(long, info->hres), JAS_CAST(long, info->vres),
JAS_CAST(long, info->numcolors), JAS_CAST(long, info->mincolors)));
if (info->width < 0 || info->height < 0 || info->numplanes < 0 ||
info->depth < 0 || info->siz < 0 || info->hres < 0 || info->vres < 0) {
jas_eprintf("corrupt bit stream\n");
goto error;
}
/* Ensure that we support this type of BMP file. */
if (!bmp_issupported(&hdr, info)) {
jas_eprintf("error: unsupported BMP encoding\n");
//bmp_info_destroy(info);
//return 0;
goto error;
}
/* Skip over any useless data between the end of the palette
and start of the bitmap data. */
if ((n = hdr.off - (BMP_HDRLEN + BMP_INFOLEN + BMP_PALLEN(info))) < 0) {
jas_eprintf("error: possibly bad bitmap offset?\n");
goto error;
//return 0;
}
if (n > 0) {
jas_eprintf("skipping unknown data in BMP file\n");
if (bmp_gobble(in, n)) {
//bmp_info_destroy(info);
//return 0;
goto error;
}
}
/* Get the number of components. */
numcmpts = bmp_numcmpts(info);
for (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,
++cmptparm) {
cmptparm->tlx = 0;
cmptparm->tly = 0;
cmptparm->hstep = 1;
cmptparm->vstep = 1;
cmptparm->width = info->width;
cmptparm->height = info->height;
cmptparm->prec = 8;
cmptparm->sgnd = false;
}
/* Create image object. */
if (!(image = jas_image_create(numcmpts, cmptparms,
JAS_CLRSPC_UNKNOWN))) {
//bmp_info_destroy(info);
//return 0;
goto error;
}
if (numcmpts == 3) {
jas_image_setclrspc(image, JAS_CLRSPC_SRGB);
jas_image_setcmpttype(image, 0,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R));
jas_image_setcmpttype(image, 1,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G));
jas_image_setcmpttype(image, 2,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B));
} else {
jas_image_setclrspc(image, JAS_CLRSPC_SGRAY);
jas_image_setcmpttype(image, 0,
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y));
}
/* Read the bitmap data. */
if (bmp_getdata(in, info, image)) {
//bmp_info_destroy(info);
//jas_image_destroy(image);
//return 0;
goto error;
}
bmp_info_destroy(info);
return image;
error:
if (info) {
bmp_info_destroy(info);
}
if (image) {
jas_image_destroy(image);
}
return 0;
} | 611 | True | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.