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-2022-1296
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:P
NETWORK
LOW
NONE
PARTIAL
NONE
PARTIAL
6.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
NONE
HIGH
9.1
CRITICAL
3.9
5.2
False
[{'url': 'https://huntr.dev/bounties/52b57274-0e1a-4d61-ab29-1373b555fea0', 'name': 'https://huntr.dev/bounties/52b57274-0e1a-4d61-ab29-1373b555fea0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/153bcdc29f11cd8c90e7d639a7405450f644ddb6', 'name': 'https://github.com/radareorg/radare2/commit/153bcdc29f11cd8c90e7d639a7405450f644ddb6', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.6.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds read in `r_bin_ne_get_relocs` function in GitHub repository radareorg/radare2 prior to 5.6.8. This vulnerability may allow attackers to read sensitive information or cause a crash.'}]
2022-04-15T03:27Z
2022-04-11T12:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Sergi Àlvarez i Capilla
2022-04-08 20:14:32+02:00
Fix oobread in NE parser ##crash * Reported by @hmsec via huntr.dev * Reproducer: necrash * BountyID: 52b57274-0e1a-4d61-ab29-1373b555fea0/
153bcdc29f11cd8c90e7d639a7405450f644ddb6
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_ne_get_relocs
r_bin_ne_get_relocs( r_bin_ne_obj_t * bin)
['bin']
RList *r_bin_ne_get_relocs(r_bin_ne_obj_t *bin) { RList *segments = bin->segments; if (!segments) { return NULL; } RList *entries = bin->entries; if (!entries) { return NULL; } RList *symbols = bin->symbols; if (!symbols) { return NULL; } ut16 *modref = calloc (bin->ne_header->ModRefs, sizeof (ut16)); if (!modref) { return NULL; } r_buf_read_at (bin->buf, (ut64)bin->ne_header->ModRefTable + bin->header_offset, (ut8 *)modref, bin->ne_header->ModRefs * sizeof (ut16)); RList *relocs = r_list_newf (free); if (!relocs) { free (modref); return NULL; } RListIter *it; RBinSection *seg; int index = -1; r_list_foreach (segments, it, seg) { index++; if (!(bin->segment_entries[index].flags & RELOCINFO)) { continue; } ut32 off = seg->paddr + seg->size; ut32 start = off; ut16 length = r_buf_read_le16_at (bin->buf, off); if (!length) { continue; } off += 2; // size_t buf_size = r_buf_size (bin->buf); while (off < start + length * sizeof (NE_image_reloc_item)) { // && off + sizeof (NE_image_reloc_item) < buf_size) NE_image_reloc_item rel = {0}; if (r_buf_read_at (bin->buf, off, (ut8 *)&rel, sizeof (rel)) < 1) { return NULL; } RBinReloc *reloc = R_NEW0 (RBinReloc); if (!reloc) { return NULL; } reloc->paddr = seg->paddr + rel.offset; switch (rel.type) { case LOBYTE: reloc->type = R_BIN_RELOC_8; break; case SEL_16: case OFF_16: reloc->type = R_BIN_RELOC_16; break; case POI_32: case OFF_32: reloc->type = R_BIN_RELOC_32; break; case POI_48: reloc->type = R_BIN_RELOC_64; break; } ut32 offset; if (rel.flags & (IMPORTED_ORD | IMPORTED_NAME)) { RBinImport *imp = R_NEW0 (RBinImport); if (!imp) { free (reloc); break; } char *name; #if NE_BUG if (rel.index > 0 && rel.index < bin->ne_header->ModRefs) { offset = modref[rel.index - 1] + bin->header_offset + bin->ne_header->ImportNameTable; name = __read_nonnull_str_at (bin->buf, offset); } else { name = r_str_newf ("UnknownModule%d_%x", rel.index, off); // ???? } #else if (rel.index > bin->ne_header->ModRefs) { name = r_str_newf ("UnknownModule%d_%x", rel.index, off); // ???? } else { offset = modref[rel.index - 1] + bin->header_offset + bin->ne_header->ImportNameTable; name = __read_nonnull_str_at (bin->buf, offset); } #endif if (rel.flags & IMPORTED_ORD) { imp->ordinal = rel.func_ord; imp->name = r_str_newf ("%s.%s", name, __func_name_from_ord(name, rel.func_ord)); } else { offset = bin->header_offset + bin->ne_header->ImportNameTable + rel.name_off; char *func = __read_nonnull_str_at (bin->buf, offset); imp->name = r_str_newf ("%s.%s", name, func); free (func); } free (name); reloc->import = imp; } else if (rel.flags & OSFIXUP) { // TODO } else { if (strstr (seg->name, "FIXED")) { RBinSection *s = r_list_get_n (segments, rel.segnum - 1); if (s) { offset = s->paddr + rel.segoff; } else { offset = -1; } } else { RBinAddr *entry = r_list_get_n (entries, rel.entry_ordinal - 1); if (entry) { offset = entry->paddr; } else { offset = -1; } } reloc->addend = offset; RBinSymbol *sym = NULL; RListIter *sit; r_list_foreach (symbols, sit, sym) { if (sym->paddr == reloc->addend) { reloc->symbol = sym; break; } } } if (rel.flags & ADDITIVE) { reloc->additive = 1; r_list_append (relocs, reloc); } else { do { #if NE_BUG if (reloc->paddr + 4 < r_buf_size (bin->buf)) { break; } #endif r_list_append (relocs, reloc); offset = r_buf_read_le16_at (bin->buf, reloc->paddr); RBinReloc *tmp = reloc; reloc = R_NEW0 (RBinReloc); if (!reloc) { break; } *reloc = *tmp; reloc->paddr = seg->paddr + offset; } while (offset != 0xFFFF); free (reloc); } off += sizeof (NE_image_reloc_item); } } free (modref); return relocs; }
936
True
1
CVE-2022-1297
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:P
NETWORK
LOW
NONE
PARTIAL
NONE
PARTIAL
6.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
NONE
HIGH
9.1
CRITICAL
3.9
5.2
False
[{'url': 'https://github.com/radareorg/radare2/commit/0a557045476a2969c7079aec9eeb29d02f2809c6', 'name': 'https://github.com/radareorg/radare2/commit/0a557045476a2969c7079aec9eeb29d02f2809c6', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/ec538fa4-06c6-4050-a141-f60153ddeaac', 'name': 'https://huntr.dev/bounties/ec538fa4-06c6-4050-a141-f60153ddeaac', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.6.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds Read in r_bin_ne_get_entrypoints function in GitHub repository radareorg/radare2 prior to 5.6.8. This vulnerability may allow attackers to read sensitive information or cause a crash.'}]
2022-04-15T03:34Z
2022-04-11T12:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
pancake
2022-04-11 13:35:52+02:00
Fix oobread and unaligned casts in the NE entrypoint logic ##crash * Reported by @hmsec via huntr.dev * Reproducer: nepocaligns * BountyID: ec538fa4-06c6-4050-a141-f60153ddeaac
0a557045476a2969c7079aec9eeb29d02f2809c6
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_ne_get_entrypoints
r_bin_ne_get_entrypoints( r_bin_ne_obj_t * bin)
['bin']
RList *r_bin_ne_get_entrypoints(r_bin_ne_obj_t *bin) { if (!bin->entry_table) { return NULL; } RList *entries = r_list_newf (free); if (!entries) { return NULL; } RList *segments = r_bin_ne_get_segments (bin); if (!segments) { r_list_free (entries); return NULL; } if (bin->ne_header->csEntryPoint) { RBinAddr *entry = R_NEW0 (RBinAddr); if (!entry) { r_list_free (entries); return NULL; } entry->bits = 16; ut32 entry_cs = bin->ne_header->csEntryPoint; RBinSection *s = r_list_get_n (segments, entry_cs - 1); entry->paddr = bin->ne_header->ipEntryPoint + (s? s->paddr: 0); r_list_append (entries, entry); } int off = 0; size_t tableat = bin->header_offset + bin->ne_header->EntryTableOffset; while (off < bin->ne_header->EntryTableLength) { if (tableat + off >= r_buf_size (bin->buf)) { break; } ut8 bundle_length = *(ut8 *)(bin->entry_table + off); if (!bundle_length) { break; } off++; ut8 bundle_type = *(ut8 *)(bin->entry_table + off); off++; int i; for (i = 0; i < bundle_length; i++) { if (tableat + off + 4 >= r_buf_size (bin->buf)) { break; } RBinAddr *entry = R_NEW0 (RBinAddr); if (!entry) { r_list_free (entries); return NULL; } off++; if (!bundle_type) { // Skip off--; free (entry); break; } else if (bundle_type == 0xff) { // moveable off += 2; ut8 segnum = *(bin->entry_table + off); off++; ut16 segoff = *(ut16 *)(bin->entry_table + off); if (segnum > 0) { entry->paddr = (ut64)bin->segment_entries[segnum - 1].offset * bin->alignment + segoff; } } else { // Fixed if (bundle_type < bin->ne_header->SegCount) { entry->paddr = (ut64)bin->segment_entries[bundle_type - 1].offset * bin->alignment + *(ut16 *)(bin->entry_table + off); } } off += 2; r_list_append (entries, entry); } } r_list_free (segments); bin->entries = entries; return entries; }
478
True
1
CVE-2022-1382
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:N/A:C
NETWORK
MEDIUM
NONE
NONE
NONE
COMPLETE
7.1
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
False
[{'url': 'https://github.com/radareorg/radare2/commit/48f0ea79f99174fb0a62cb2354e13496ce5b7c44', 'name': 'https://github.com/radareorg/radare2/commit/48f0ea79f99174fb0a62cb2354e13496ce5b7c44', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/d8b6d239-6d7b-4783-b26b-5be848c01aa1', 'name': 'https://huntr.dev/bounties/d8b6d239-6d7b-4783-b26b-5be848c01aa1', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.6.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository radareorg/radare2 prior to 5.6.8. This vulnerability is capable of making the radare2 crash, thus affecting the availability of the system.'}]
2022-04-26T16:17Z
2022-04-18T01:15Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
pancake
2022-04-17 00:38:35+02:00
Fix null deref in ne parser ##crash * Reported by @cnitlrt via huntr.dev * BountyID: d8b6d239-6d7b-4783-b26b-5be848c01aa1/ * Reproducer: nenull
48f0ea79f99174fb0a62cb2354e13496ce5b7c44
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_ne_get_segments
r_bin_ne_get_segments( r_bin_ne_obj_t * bin)
['bin']
RList *r_bin_ne_get_segments(r_bin_ne_obj_t *bin) { int i; if (!bin) { return NULL; } RList *segments = r_list_newf (free); for (i = 0; i < bin->ne_header->SegCount; i++) { RBinSection *bs = R_NEW0 (RBinSection); if (!bs) { return segments; } NE_image_segment_entry *se = &bin->segment_entries[i]; bs->size = se->length; bs->vsize = se->minAllocSz ? se->minAllocSz : 64000; bs->bits = R_SYS_BITS_16; bs->is_data = se->flags & IS_DATA; bs->perm = __translate_perms (se->flags); bs->paddr = (ut64)se->offset * bin->alignment; bs->name = r_str_newf ("%s.%" PFMT64d, se->flags & IS_MOVEABLE ? "MOVEABLE" : "FIXED", bs->paddr); bs->is_segment = true; r_list_append (segments, bs); } bin->segments = segments; return segments; }
190
True
1
CVE-2022-1383
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
LOW
NONE
HIGH
6.1
MEDIUM
1.8
4.2
False
[{'url': 'https://huntr.dev/bounties/02b4b563-b946-4343-9092-38d1c5cd60c9', 'name': 'https://huntr.dev/bounties/02b4b563-b946-4343-9092-38d1c5cd60c9', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/1dd65336f0f0c351d6ea853efcf73cf9c0030862', 'name': 'https://github.com/radareorg/radare2/commit/1dd65336f0f0c351d6ea853efcf73cf9c0030862', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.6.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.6.8. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-04-26T16:26Z
2022-04-18T01:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-04-17 01:06:07+02:00
Fix oobread bug in NE parser ##crash * Reported by @cnitlrt via huntrdev * BountyID: 02b4b563-b946-4343-9092-38d1c5cd60c9 * Reproducer: neoobread
1dd65336f0f0c351d6ea853efcf73cf9c0030862
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_coresym_cache_element_new
r_coresym_cache_element_new( RBinFile * bf , RBuffer * buf , ut64 off , int bits , char * file_name)
['bf', 'buf', 'off', 'bits', 'file_name']
RCoreSymCacheElement *r_coresym_cache_element_new(RBinFile *bf, RBuffer *buf, ut64 off, int bits, char * file_name) { RCoreSymCacheElement *result = NULL; ut8 *b = NULL; RCoreSymCacheElementHdr *hdr = r_coresym_cache_element_header_new (buf, off, bits); if (!hdr) { return NULL; } if (hdr->version != 1) { eprintf ("Unsupported CoreSymbolication cache version (%d)\n", hdr->version); goto beach; } if (hdr->size == 0 || hdr->size > r_buf_size (buf) - off) { eprintf ("Corrupted CoreSymbolication header: size out of bounds (0x%x)\n", hdr->size); goto beach; } result = R_NEW0 (RCoreSymCacheElement); if (!result) { goto beach; } result->hdr = hdr; b = malloc (hdr->size); if (!b) { goto beach; } if (r_buf_read_at (buf, off, b, hdr->size) != hdr->size) { goto beach; } ut8 *end = b + hdr->size; if (file_name) { result->file_name = file_name; } else if (hdr->file_name_off) { result->file_name = str_dup_safe (b, b + (size_t)hdr->file_name_off, end); } if (hdr->version_off) { result->binary_version = str_dup_safe (b, b + (size_t)hdr->version_off, end); } const size_t word_size = bits / 8; const ut64 start_of_sections = (ut64)hdr->n_segments * R_CS_EL_SIZE_SEG + R_CS_EL_OFF_SEGS; const ut64 sect_size = (bits == 32) ? R_CS_EL_SIZE_SECT_32 : R_CS_EL_SIZE_SECT_64; const ut64 start_of_symbols = start_of_sections + (ut64)hdr->n_sections * sect_size; const ut64 start_of_lined_symbols = start_of_symbols + (ut64)hdr->n_symbols * R_CS_EL_SIZE_SYM; const ut64 start_of_line_info = start_of_lined_symbols + (ut64)hdr->n_lined_symbols * R_CS_EL_SIZE_LSYM; const ut64 start_of_unknown_pairs = start_of_line_info + (ut64)hdr->n_line_info * R_CS_EL_SIZE_LINFO; const ut64 start_of_strings = start_of_unknown_pairs + (ut64)hdr->n_symbols * 8; ut64 page_zero_size = 0; size_t page_zero_idx = 0; if (UT32_MUL_OVFCHK (hdr->n_segments, sizeof (RCoreSymCacheElementSegment))) { goto beach; } else if (UT32_MUL_OVFCHK (hdr->n_sections, sizeof (RCoreSymCacheElementSection))) { goto beach; } else if (UT32_MUL_OVFCHK (hdr->n_symbols, sizeof (RCoreSymCacheElementSymbol))) { goto beach; } else if (UT32_MUL_OVFCHK (hdr->n_lined_symbols, sizeof (RCoreSymCacheElementLinedSymbol))) { goto beach; } else if (UT32_MUL_OVFCHK (hdr->n_line_info, sizeof (RCoreSymCacheElementLineInfo))) { goto beach; } if (hdr->n_segments > 0) { result->segments = R_NEWS0 (RCoreSymCacheElementSegment, hdr->n_segments); if (!result->segments) { goto beach; } size_t i; ut8 *cursor = b + R_CS_EL_OFF_SEGS; for (i = 0; i < hdr->n_segments && cursor + sizeof (RCoreSymCacheElementSegment) < end; i++) { RCoreSymCacheElementSegment *seg = &result->segments[i]; seg->paddr = seg->vaddr = r_read_le64 (cursor); cursor += 8; if (cursor >= end) { break; } seg->size = seg->vsize = r_read_le64 (cursor); cursor += 8; if (cursor >= end) { break; } seg->name = str_dup_safe_fixed (b, cursor, 16, end); cursor += 16; if (!seg->name) { continue; } if (!strcmp (seg->name, "__PAGEZERO")) { page_zero_size = seg->size; page_zero_idx = i; seg->paddr = seg->vaddr = 0; seg->size = 0; } } for (i = 0; i < hdr->n_segments && page_zero_size > 0; i++) { if (i == page_zero_idx) { continue; } RCoreSymCacheElementSegment *seg = &result->segments[i]; if (seg->vaddr < page_zero_size) { seg->vaddr += page_zero_size; } } } bool relative_to_strings = false; ut8* string_origin; if (hdr->n_sections > 0) { result->sections = R_NEWS0 (RCoreSymCacheElementSection, hdr->n_sections); if (!result->sections) { goto beach; } size_t i; ut8 *cursor = b + start_of_sections; for (i = 0; i < hdr->n_sections && cursor < end; i++) { ut8 *sect_start = cursor; RCoreSymCacheElementSection *sect = &result->sections[i]; sect->vaddr = sect->paddr = r_read_ble (cursor, false, bits); if (sect->vaddr < page_zero_size) { sect->vaddr += page_zero_size; } cursor += word_size; if (cursor >= end) { break; } sect->size = r_read_ble (cursor, false, bits); cursor += word_size; if (cursor >= end) { break; } ut64 sect_name_off = r_read_ble (cursor, false, bits); if (!i && !sect_name_off) { relative_to_strings = true; } cursor += word_size; if (bits == 32) { cursor += word_size; } string_origin = relative_to_strings? b + start_of_strings : sect_start; sect->name = str_dup_safe (b, string_origin + (size_t)sect_name_off, end); } } if (hdr->n_symbols) { result->symbols = R_NEWS0 (RCoreSymCacheElementSymbol, hdr->n_symbols); if (!result->symbols) { goto beach; } size_t i; ut8 *cursor = b + start_of_symbols; for (i = 0; i < hdr->n_symbols && cursor + R_CS_EL_SIZE_SYM <= end; i++) { RCoreSymCacheElementSymbol *sym = &result->symbols[i]; sym->paddr = r_read_le32 (cursor); sym->size = r_read_le32 (cursor + 0x4); sym->unk1 = r_read_le32 (cursor + 0x8); size_t name_off = r_read_le32 (cursor + 0xc); size_t mangled_name_off = r_read_le32 (cursor + 0x10); sym->unk2 = (st32)r_read_le32 (cursor + 0x14); string_origin = relative_to_strings? b + start_of_strings : cursor; sym->name = str_dup_safe (b, string_origin + name_off, end); if (!sym->name) { cursor += R_CS_EL_SIZE_SYM; continue; } string_origin = relative_to_strings? b + start_of_strings : cursor; sym->mangled_name = str_dup_safe (b, string_origin + mangled_name_off, end); if (!sym->mangled_name) { cursor += R_CS_EL_SIZE_SYM; continue; } cursor += R_CS_EL_SIZE_SYM; } } if (hdr->n_lined_symbols) { result->lined_symbols = R_NEWS0 (RCoreSymCacheElementLinedSymbol, hdr->n_lined_symbols); if (!result->lined_symbols) { goto beach; } size_t i; ut8 *cursor = b + start_of_lined_symbols; for (i = 0; i < hdr->n_lined_symbols && cursor + R_CS_EL_SIZE_LSYM <= end; i++) { RCoreSymCacheElementLinedSymbol *lsym = &result->lined_symbols[i]; lsym->sym.paddr = r_read_le32 (cursor); lsym->sym.size = r_read_le32 (cursor + 0x4); lsym->sym.unk1 = r_read_le32 (cursor + 0x8); size_t name_off = r_read_le32 (cursor + 0xc); size_t mangled_name_off = r_read_le32 (cursor + 0x10); lsym->sym.unk2 = (st32)r_read_le32 (cursor + 0x14); size_t file_name_off = r_read_le32 (cursor + 0x18); lsym->flc.line = r_read_le32 (cursor + 0x1c); lsym->flc.col = r_read_le32 (cursor + 0x20); string_origin = relative_to_strings? b + start_of_strings : cursor; lsym->sym.name = str_dup_safe (b, string_origin + name_off, end); if (!lsym->sym.name) { cursor += R_CS_EL_SIZE_LSYM; continue; } string_origin = relative_to_strings? b + start_of_strings : cursor; lsym->sym.mangled_name = str_dup_safe (b, string_origin + mangled_name_off, end); if (!lsym->sym.mangled_name) { cursor += R_CS_EL_SIZE_LSYM; continue; } string_origin = relative_to_strings? b + start_of_strings : cursor; lsym->flc.file = str_dup_safe (b, string_origin + file_name_off, end); if (!lsym->flc.file) { cursor += R_CS_EL_SIZE_LSYM; continue; } cursor += R_CS_EL_SIZE_LSYM; meta_add_fileline (bf, r_coresym_cache_element_pa2va (result, lsym->sym.paddr), lsym->sym.size, &lsym->flc); } } if (hdr->n_line_info) { result->line_info = R_NEWS0 (RCoreSymCacheElementLineInfo, hdr->n_line_info); if (!result->line_info) { goto beach; } size_t i; ut8 *cursor = b + start_of_line_info; for (i = 0; i < hdr->n_line_info && cursor + R_CS_EL_SIZE_LINFO <= end; i++) { RCoreSymCacheElementLineInfo *info = &result->line_info[i]; info->paddr = r_read_le32 (cursor); info->size = r_read_le32 (cursor + 4); size_t file_name_off = r_read_le32 (cursor + 8); info->flc.line = r_read_le32 (cursor + 0xc); info->flc.col = r_read_le32 (cursor + 0x10); string_origin = relative_to_strings? b + start_of_strings : cursor; info->flc.file = str_dup_safe (b, string_origin + file_name_off, end); if (!info->flc.file) { break; } cursor += R_CS_EL_SIZE_LINFO; meta_add_fileline (bf, r_coresym_cache_element_pa2va (result, info->paddr), info->size, &info->flc); } } /* * TODO: * Figure out the meaning of the 2 arrays of hdr->n_symbols * 32-bit integers located at the end of line info. * Those are the last info before the strings at the end. */ beach: free (b); return result; }
1774
True
1
CVE-2022-1437
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/af6c3e9e-b7df-4d80-b48f-77fdd17b4038', 'name': 'https://huntr.dev/bounties/af6c3e9e-b7df-4d80-b48f-77fdd17b4038', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/669a404b6d98d5db409a5ebadae4e94b34ef5136', 'name': 'https://github.com/radareorg/radare2/commit/669a404b6d98d5db409a5ebadae4e94b34ef5136', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-03T20:22Z
2022-04-22T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-04-21 18:22:00+02:00
Fix oobread and null deref in symbols file parser ##crash * Reported by @cnitlrt * BountyID: af6c3e9e-b7df-4d80-b48f-77fdd17b4038/ * Reproducer: symoob
669a404b6d98d5db409a5ebadae4e94b34ef5136
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
symbols
symbols( RBinFile * bf)
['bf']
static RList *symbols(RBinFile *bf) { RList *res = r_list_newf ((RListFree)r_bin_symbol_free); r_return_val_if_fail (res && bf->o && bf->o->bin_obj, res); RCoreSymCacheElement *element = bf->o->bin_obj; size_t i; HtUU *hash = ht_uu_new0 (); if (!hash) { return res; } bool found = false; for (i = 0; i < element->hdr->n_lined_symbols; i++) { RCoreSymCacheElementSymbol *sym = (RCoreSymCacheElementSymbol *)&element->lined_symbols[i]; if (!sym) { break; } ht_uu_find (hash, sym->paddr, &found); if (found) { continue; } RBinSymbol *s = bin_symbol_from_symbol (element, sym); if (s) { r_list_append (res, s); ht_uu_insert (hash, sym->paddr, 1); } } if (element->symbols) { for (i = 0; i < element->hdr->n_symbols; i++) { RCoreSymCacheElementSymbol *sym = &element->symbols[i]; ht_uu_find (hash, sym->paddr, &found); if (found) { continue; } RBinSymbol *s = bin_symbol_from_symbol (element, sym); if (s) { r_list_append (res, s); } } } ht_uu_free (hash); return res; }
263
True
1
CVE-2022-1444
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
False
[{'url': 'https://huntr.dev/bounties/b438a940-f8a4-4872-b030-59bdd1ab72aa', 'name': 'https://huntr.dev/bounties/b438a940-f8a4-4872-b030-59bdd1ab72aa', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/14189710859c27981adb4c2c2aed2863c1859ec5', 'name': 'https://github.com/radareorg/radare2/commit/14189710859c27981adb4c2c2aed2863c1859ec5', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-416'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'heap-use-after-free in GitHub repository radareorg/radare2 prior to 5.7.0. This vulnerability is capable of inducing denial of service.'}]
2022-05-04T15:22Z
2022-04-23T22:15Z
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
condret
2022-04-23 02:36:51+02:00
Redo minor cleanup in new_rbtree
14189710859c27981adb4c2c2aed2863c1859ec5
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_crbtree_insert
r_crbtree_insert( RRBTree * tree , void * data , RRBComparator cmp , void * user)
['tree', 'data', 'cmp', 'user']
R_API bool r_crbtree_insert(RRBTree *tree, void *data, RRBComparator cmp, void *user) { r_return_val_if_fail (tree && data && cmp, false); bool inserted = false; if (tree->root == NULL) { tree->root = _node_new (data, NULL); if (tree->root == NULL) { return false; } inserted = true; goto out_exit; } RRBNode head; /* Fake tree root */ memset (&head, 0, sizeof (RRBNode)); RRBNode *g = NULL, *parent = &head; /* Grandparent & parent */ RRBNode *p = NULL, *q = tree->root; /* Iterator & parent */ int dir = 0, last = 0; /* Directions */ _set_link (parent, q, 1); for (;;) { if (!q) { /* Insert a node at first null link(also set its parent link) */ q = _node_new (data, p); if (!q) { return false; } p->link[dir] = q; inserted = true; } else if (IS_RED (q->link[0]) && IS_RED (q->link[1])) { /* Simple red violation: color flip */ q->red = 1; q->link[0]->red = 0; q->link[1]->red = 0; } if (IS_RED (q) && IS_RED (p)) { #if 0 // coverity error, parent is never null /* Hard red violation: rotate */ if (!parent) { return false; } #endif int dir2 = parent->link[1] == g; if (q == p->link[last]) { _set_link (parent, _rot_once (g, !last), dir2); } else { _set_link (parent, _rot_twice (g, !last), dir2); } } if (inserted) { break; } last = dir; dir = cmp (data, q->data, user) >= 0; if (g) { parent = g; } g = p; p = q; q = q->link[dir]; } /* Update root(it may different due to root rotation) */ tree->root = head.link[1]; out_exit: /* Invariant: root is black */ tree->root->red = 0; tree->root->parent = NULL; if (inserted) { tree->size++; } return inserted; }
413
True
1
CVE-2022-1451
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'name': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'name': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds Read in r_bin_java_constant_value_attr_new function in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end 2f the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. More details see [CWE-125: Out-of-bounds read](https://cwe.mitre.org/data/definitions/125.html).'}]
2022-05-03T18:01Z
2022-04-24T21:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
pancake
2022-04-24 21:09:17+02:00
Fix oobread crash in java parser ##crash * Reported by @bet4it via @huntrdev * BountyID: 229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7 * Reproducer: poc4java
0927ed3ae99444e7b47b84e43118deb10fe37529
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_constant_value_attr_new
r_bin_java_constant_value_attr_new( RBinJavaObj * bin , ut8 * buffer , ut64 sz , ut64 buf_offset)
['bin', 'buffer', 'sz', 'buf_offset']
R_API RBinJavaAttrInfo *r_bin_java_constant_value_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { ut64 offset = 6; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); if (attr) { attr->type = R_BIN_JAVA_ATTR_TYPE_CONST_VALUE_ATTR; attr->info.constant_value_attr.constantvalue_idx = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->size = offset; } // IFDBG r_bin_java_print_constant_value_attr_summary(attr); return attr; }
78
True
1
CVE-2022-1451
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'name': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'name': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds Read in r_bin_java_constant_value_attr_new function in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end 2f the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. More details see [CWE-125: Out-of-bounds read](https://cwe.mitre.org/data/definitions/125.html).'}]
2022-05-03T18:01Z
2022-04-24T21:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
pancake
2022-04-24 21:09:17+02:00
Fix oobread crash in java parser ##crash * Reported by @bet4it via @huntrdev * BountyID: 229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7 * Reproducer: poc4java
0927ed3ae99444e7b47b84e43118deb10fe37529
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_get_attr_buf
r_bin_java_get_attr_buf( RBinJavaObj * bin , ut64 sz , const ut64 offset , const ut8 * buf , const ut64 len)
['bin', 'sz', 'offset', 'buf', 'len']
R_API ut8 *r_bin_java_get_attr_buf(RBinJavaObj *bin, ut64 sz, const ut64 offset, const ut8 *buf, const ut64 len) { ut8 *attr_buf = NULL; int pending = len - offset; const ut8 *a_buf = offset + buf; attr_buf = (ut8 *) calloc (pending + 1, 1); if (!attr_buf) { eprintf ("Unable to allocate enough bytes (0x%04"PFMT64x ") to read in the attribute.\n", sz); return attr_buf; } memcpy (attr_buf, a_buf, pending); // sz+1); return attr_buf; }
92
True
1
CVE-2022-1451
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'name': 'https://huntr.dev/bounties/229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'name': 'https://github.com/radareorg/radare2/commit/0927ed3ae99444e7b47b84e43118deb10fe37529', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds Read in r_bin_java_constant_value_attr_new function in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end 2f the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. More details see [CWE-125: Out-of-bounds read](https://cwe.mitre.org/data/definitions/125.html).'}]
2022-05-03T18:01Z
2022-04-24T21:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
pancake
2022-04-24 21:09:17+02:00
Fix oobread crash in java parser ##crash * Reported by @bet4it via @huntrdev * BountyID: 229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7 * Reproducer: poc4java
0927ed3ae99444e7b47b84e43118deb10fe37529
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_rti_annotations_attr_new
r_bin_java_rti_annotations_attr_new( RBinJavaObj * bin , ut8 * buffer , ut64 sz , ut64 buf_offset)
['bin', 'buffer', 'sz', 'buf_offset']
R_API RBinJavaAttrInfo *r_bin_java_rti_annotations_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { ut32 i = 0; RBinJavaAttrInfo *attr = NULL; ut64 offset = 0; attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); offset += 6; if (attr) { attr->type = R_BIN_JAVA_ATTR_TYPE_RUNTIME_INVISIBLE_ANNOTATION_ATTR; attr->info.annotation_array.num_annotations = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.annotation_array.annotations = r_list_newf (r_bin_java_annotation_free); for (i = 0; i < attr->info.rtv_annotations_attr.num_annotations; i++) { if (offset >= sz) { break; } RBinJavaAnnotation *annotation = r_bin_java_annotation_new (buffer + offset, sz - offset, buf_offset + offset); if (annotation) { offset += annotation->size; } r_list_append (attr->info.annotation_array.annotations, (void *) annotation); } attr->size = offset; } return attr; }
183
True
1
CVE-2022-1714
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'name': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'name': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-23T18:35Z
2022-05-13T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-05-13 15:58:15+02:00
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
msp430_op
msp430_op( RAnal * anal , RAnalOp * op , ut64 addr , const ut8 * buf , int len , RAnalOpMask mask)
['anal', 'op', 'addr', 'buf', 'len', 'mask']
static int msp430_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len, RAnalOpMask mask) { int ret; struct msp430_cmd cmd; memset (&cmd, 0, sizeof (cmd)); //op->id = ???; op->size = -1; op->nopcode = 1; op->type = R_ANAL_OP_TYPE_UNK; op->family = R_ANAL_OP_FAMILY_CPU; ret = op->size = msp430_decode_command (buf, len, &cmd); if (mask & R_ANAL_OP_MASK_DISASM) { if (ret < 1) { op->mnemonic = strdup ("invalid"); } else if (ret > 0) { if (cmd.operands[0]) { op->mnemonic = r_str_newf ("%s %s",cmd.instr, cmd.operands); } else { op->mnemonic = strdup (cmd.instr); } } { // if (a->syntax != R_ASM_SYNTAX_ATT) char *ba = op->mnemonic; r_str_replace_ch (ba, '#', 0, 1); // r_str_replace_ch (ba, "$", "$$", 1); r_str_replace_ch (ba, '&', 0, 1); r_str_replace_ch (ba, '%', 0, 1); } } if (ret < 0) { return ret; } op->addr = addr; switch (cmd.type) { case MSP430_ONEOP: switch (cmd.opcode) { case MSP430_RRA: case MSP430_RRC: op->type = R_ANAL_OP_TYPE_ROR; break; case MSP430_PUSH: op->type = R_ANAL_OP_TYPE_PUSH; break; case MSP430_CALL: op->type = R_ANAL_OP_TYPE_CALL; op->fail = addr + op->size; op->jump = r_read_at_le16 (buf, 2); break; case MSP430_RETI: op->type = R_ANAL_OP_TYPE_RET; break; } break; case MSP430_TWOOP: switch (cmd.opcode) { case MSP430_BIT: case MSP430_BIC: case MSP430_BIS: case MSP430_MOV: op->type = R_ANAL_OP_TYPE_MOV; if ((cmd.instr)[0] == 'b' && (cmd.instr)[1] == 'r') { // Emulated branch instruction, moves source operand to PC register. op->type = R_ANAL_OP_TYPE_UJMP; } break; case MSP430_DADD: case MSP430_ADDC: case MSP430_ADD: op->type = R_ANAL_OP_TYPE_ADD; break; case MSP430_SUBC: case MSP430_SUB: op->type = R_ANAL_OP_TYPE_SUB; break; case MSP430_CMP: op->type = R_ANAL_OP_TYPE_CMP; break; case MSP430_XOR: op->type = R_ANAL_OP_TYPE_XOR; break; case MSP430_AND: op->type = R_ANAL_OP_TYPE_AND; break; } break; case MSP430_JUMP: if (cmd.jmp_cond == MSP430_JMP) { op->type = R_ANAL_OP_TYPE_JMP; } else { op->type = R_ANAL_OP_TYPE_CJMP; } op->jump = addr + cmd.jmp_addr; op->fail = addr + 2; break; case MSP430_INV: op->type = R_ANAL_OP_TYPE_ILL; break; default: op->type = R_ANAL_OP_TYPE_UNK; break; } return ret; }
513
True
1
CVE-2022-1714
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'name': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'name': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-23T18:35Z
2022-05-13T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-05-13 15:58:15+02:00
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
init_ehdr
init_ehdr( ELFOBJ * bin)
['bin']
static bool init_ehdr(ELFOBJ *bin) { ut8 e_ident[EI_NIDENT]; ut8 ehdr[sizeof (Elf_(Ehdr))] = {0}; int i, len; if (r_buf_read_at (bin->b, 0, e_ident, EI_NIDENT) == -1) { R_LOG_ERROR ("read (magic)"); return false; } sdb_set (bin->kv, "elf_type.cparse", "enum elf_type { ET_NONE=0, ET_REL=1," " ET_EXEC=2, ET_DYN=3, ET_CORE=4, ET_LOOS=0xfe00, ET_HIOS=0xfeff," " ET_LOPROC=0xff00, ET_HIPROC=0xffff };", 0); sdb_set (bin->kv, "elf_machine.cparse", "enum elf_machine {EM_NONE=0, EM_M32=1," " EM_SPARC=2, EM_386=3, EM_68K=4, EM_88K=5, EM_IAMCU=6, EM_860=7, EM_MIPS=8," " EM_S370=9, EM_MIPS_RS3_LE=10, EM_RS6000=11, EM_PARISC=15, EM_nCUBE=16," " EM_VPP500=17, EM_SPARC32PLUS=18, EM_960=19, EM_PPC=20, EM_PPC64=21, EM_S390=22," " EM_SPU=23, EM_V800=36, EM_FR20=37, EM_RH32=38, EM_RCE=39, EM_ARM=40," " EM_ALPHA=41, EM_SH=42, EM_SPARCV9=43, EM_TRICORE=44, EM_ARC=45, EM_H8_300=46," " EM_H8_300H=47, EM_H8S=48, EM_H8_500=49, EM_IA_64=50, EM_MIPS_X=51," " EM_COLDFIRE=52, EM_68HC12=53, EM_MMA=54, EM_PCP=55, EM_NCPU=56, EM_NDR1=57," " EM_STARCORE=58, EM_ME16=59, EM_ST100=60, EM_TINYJ=61, EM_X86_64=62, EM_PDSP=63," " EM_PDP10=64, EM_PDP11=65, EM_FX66=66, EM_ST9PLUS=67, EM_ST7=68, EM_68HC16=69," " EM_68HC11=70, EM_68HC08=71, EM_68HC05=72, EM_SVX=73, EM_ST19=74, EM_VAX=75," " EM_CRIS=76, EM_JAVELIN=77, EM_FIREPATH=78, EM_ZSP=79, EM_MMIX=80, EM_HUANY=81," " EM_PRISM=82, EM_AVR=83, EM_FR30=84, EM_D10V=85, EM_D30V=86, EM_V850=87," " EM_M32R=88, EM_MN10300=89, EM_MN10200=90, EM_PJ=91, EM_OPENRISC=92," " EM_ARC_COMPACT=93, EM_XTENSA=94, EM_VIDEOCORE=95, EM_TMM_GPP=96, EM_NS32K=97," " EM_TPC=98, EM_SNP1K=99, EM_ST200=100, EM_IP2K=101, EM_MAX=102, EM_CR=103," " EM_F2MC16=104, EM_MSP430=105, EM_BLACKFIN=106, EM_SE_C33=107, EM_SEP=108," " EM_ARCA=109, EM_UNICORE=110, EM_EXCESS=111, EM_DXP=112, EM_ALTERA_NIOS2=113," " EM_CRX=114, EM_XGATE=115, EM_C166=116, EM_M16C=117, EM_DSPIC30F=118, EM_CE=119," " EM_M32C=120, EM_TSK3000=131, EM_RS08=132, EM_SHARC=133, EM_ECOG2=134," " EM_SCORE7=135, EM_DSP24=136, EM_VIDEOCORE3=137, EM_LATTICEMICO32=138," " EM_SE_C17=139, EM_TI_C6000=140, EM_TI_C2000=141, EM_TI_C5500=142," " EM_TI_ARP32=143, EM_TI_PRU=144," " EM_MMDSP_PLUS=160, EM_CYPRESS_M8C=161, EM_R32C=162, EM_TRIMEDIA=163," " EM_QDSP6=164, EM_8051=165, EM_STXP7X=166, EM_NDS32=167," " EM_ECOG1X=168, EM_MAXQ30=169, EM_XIMO16=170, EM_MANIK=171, EM_CRAYNV2=172," " EM_RX=173, EM_METAG=174, EM_MCST_ELBRUS=175, EM_ECOG16=176, EM_CR16=177," " EM_ETPU=178, EM_SLE9X=179, EM_L10M=180, EM_K10M=181, EM_AARCH64=183," " EM_AVR32=185, EM_STM8=186, EM_TILE64=187, EM_TILEPRO=188, EM_CUDA=190," " EM_TILEGX=191, EM_CLOUDSHIELD=192, EM_COREA_1ST=193, EM_COREA_2ND=194," " EM_ARC_COMPACT2=195, EM_OPEN8=196, EM_RL78=197, EM_VIDEOCORE5=198," " EM_78KOR=199, EM_56800EX=200, EM_BA1=201, EM_BA2=202, EM_XCORE=203," " EM_MCHP_PIC=204, EM_INTEL205=205, EM_INTEL206=206, EM_INTEL207=207," " EM_INTEL208=208, EM_INTEL209=209, EM_KM32=210, EM_KMX32=211, EM_KMX16=212," " EM_KMX8=213, EM_KVARC=214, EM_CDP=215, EM_COGE=216, EM_COOL=217, EM_NORC=218," " EM_CSR_KALIMBA=219, EM_AMDGPU=224, EM_RISCV=243, EM_LANAI=244, EM_BPF=247," " EM_CSKY=252, EM_KVX=256, EM_LOONGARCH=258}", 0); sdb_set (bin->kv, "elf_class.cparse", "enum elf_class {ELFCLASSNONE=0, ELFCLASS32=1, ELFCLASS64=2};", 0); sdb_set (bin->kv, "elf_data.cparse", "enum elf_data {ELFDATANONE=0, ELFDATA2LSB=1, ELFDATA2MSB=2};", 0); sdb_set (bin->kv, "elf_hdr_version.cparse", "enum elf_hdr_version {EV_NONE=0, EV_CURRENT=1};", 0); sdb_set (bin->kv, "elf_obj_version.cparse", "enum elf_obj_version {EV_NONE=0, EV_CURRENT=1};", 0); sdb_num_set (bin->kv, "elf_header.offset", 0, 0); sdb_num_set (bin->kv, "elf_header.size", sizeof (Elf_(Ehdr)), 0); sdb_set (bin->kv, "elf_ident.format", "[4]z[1]E[1]E[1]E.::" " magic (elf_class)class (elf_data)data (elf_hdr_version)version", 0); #if R_BIN_ELF64 sdb_set (bin->kv, "elf_header.format", "?[2]E[2]E[4]EqqqxN2N2N2N2N2N2" " (elf_ident)ident (elf_type)type (elf_machine)machine (elf_obj_version)version" " entry phoff shoff flags ehsize phentsize phnum shentsize shnum shstrndx", 0); #else sdb_set (bin->kv, "elf_header.format", "?[2]E[2]E[4]ExxxxN2N2N2N2N2N2" " (elf_ident)ident (elf_type)type (elf_machine)machine (elf_obj_version)version" " entry phoff shoff flags ehsize phentsize phnum shentsize shnum shstrndx", 0); #endif bin->endian = (e_ident[EI_DATA] == ELFDATA2MSB)? 1: 0; memset (&bin->ehdr, 0, sizeof (Elf_(Ehdr))); len = r_buf_read_at (bin->b, 0, ehdr, sizeof (ehdr)); if (len < 32) { // tinyelf != sizeof (Elf_(Ehdr))) { R_LOG_ERROR ("read (ehdr)"); return false; } // XXX no need to check twice memcpy (&bin->ehdr.e_ident, ehdr, 16); if (!__is_valid_ident (bin)) { return false; } i = 16; // TODO: use r_read or r_buf_read_ apis instead bin->ehdr.e_type = READ16 (ehdr, i); bin->ehdr.e_machine = READ16 (ehdr, i); bin->ehdr.e_version = READ32 (ehdr, i); #if R_BIN_ELF64 bin->ehdr.e_entry = READ64 (ehdr, i); bin->ehdr.e_phoff = READ64 (ehdr, i); bin->ehdr.e_shoff = READ64 (ehdr, i); #else bin->ehdr.e_entry = READ32 (ehdr, i); bin->ehdr.e_phoff = READ32 (ehdr, i); bin->ehdr.e_shoff = READ32 (ehdr, i); #endif bin->ehdr.e_flags = READ32 (ehdr, i); bin->ehdr.e_ehsize = READ16 (ehdr, i); bin->ehdr.e_phentsize = READ16 (ehdr, i); bin->ehdr.e_phnum = READ16 (ehdr, i); bin->ehdr.e_shentsize = READ16 (ehdr, i); bin->ehdr.e_shnum = READ16 (ehdr, i); bin->ehdr.e_shstrndx = READ16 (ehdr, i); return true; // [Outdated] Usage example: // > td `k bin/cur/info/elf_type.cparse`; td `k bin/cur/info/elf_machine.cparse` // > pf `k bin/cur/info/elf_header.format` @ `k bin/cur/info/elf_header.offset` }
566
True
1
CVE-2022-1714
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'name': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'name': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-23T18:35Z
2022-05-13T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-05-13 15:58:15+02:00
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
init_shdr
init_shdr( ELFOBJ * bin)
['bin']
static int init_shdr(ELFOBJ *bin) { ut32 shdr_size; ut8 shdr[sizeof (Elf_(Shdr))] = {0}; size_t i, j, len; r_return_val_if_fail (bin && !bin->shdr, false); if (!UT32_MUL (&shdr_size, bin->ehdr.e_shnum, sizeof (Elf_(Shdr)))) { return false; } if (shdr_size < 1) { return false; } if (shdr_size > bin->size) { return false; } if (bin->ehdr.e_shoff > bin->size) { return false; } if (bin->ehdr.e_shoff + shdr_size > bin->size) { return false; } if (!(bin->shdr = R_NEWS0 (Elf_(Shdr), bin->ehdr.e_shnum))) { r_sys_perror ("malloc (shdr)"); return false; } sdb_num_set (bin->kv, "elf_shdr.offset", bin->ehdr.e_shoff, 0); sdb_num_set (bin->kv, "elf_shdr.size", sizeof (Elf_(Shdr)), 0); sdb_set (bin->kv, "elf_s_type.cparse", "enum elf_s_type {SHT_NULL=0,SHT_PROGBITS=1," "SHT_SYMTAB=2,SHT_STRTAB=3,SHT_RELA=4,SHT_HASH=5,SHT_DYNAMIC=6,SHT_NOTE=7," "SHT_NOBITS=8,SHT_REL=9,SHT_SHLIB=10,SHT_DYNSYM=11,SHT_LOOS=0x60000000," "SHT_HIOS=0x6fffffff,SHT_LOPROC=0x70000000,SHT_HIPROC=0x7fffffff};", 0); for (i = 0; i < bin->ehdr.e_shnum; i++) { j = 0; len = r_buf_read_at (bin->b, bin->ehdr.e_shoff + i * sizeof (Elf_(Shdr)), shdr, sizeof (Elf_(Shdr))); if (len < 1) { R_LOG_ERROR ("read (shdr) at 0x%" PFMT64x, (ut64) bin->ehdr.e_shoff); R_FREE (bin->shdr); return false; } bin->shdr[i].sh_name = READ32 (shdr, j); bin->shdr[i].sh_type = READ32 (shdr, j); bin->shdr[i].sh_flags = R_BIN_ELF_READWORD (shdr, j); bin->shdr[i].sh_addr = R_BIN_ELF_READWORD (shdr, j); bin->shdr[i].sh_offset = R_BIN_ELF_READWORD (shdr, j); bin->shdr[i].sh_size = R_BIN_ELF_READWORD (shdr, j); bin->shdr[i].sh_link = READ32 (shdr, j); bin->shdr[i].sh_info = READ32 (shdr, j); bin->shdr[i].sh_addralign = R_BIN_ELF_READWORD (shdr, j); bin->shdr[i].sh_entsize = R_BIN_ELF_READWORD (shdr, j); } #if R_BIN_ELF64 sdb_set (bin->kv, "elf_s_flags_64.cparse", "enum elf_s_flags_64 {SF64_None=0,SF64_Exec=1," "SF64_Alloc=2,SF64_Alloc_Exec=3,SF64_Write=4,SF64_Write_Exec=5," "SF64_Write_Alloc=6,SF64_Write_Alloc_Exec=7};", 0); sdb_set (bin->kv, "elf_shdr.format", "x[4]E[8]Eqqqxxqq name (elf_s_type)type" " (elf_s_flags_64)flags addr offset size link info addralign entsize", 0); #else sdb_set (bin->kv, "elf_s_flags_32.cparse", "enum elf_s_flags_32 {SF32_None=0,SF32_Exec=1," "SF32_Alloc=2,SF32_Alloc_Exec=3,SF32_Write=4,SF32_Write_Exec=5," "SF32_Write_Alloc=6,SF32_Write_Alloc_Exec=7};", 0); sdb_set (bin->kv, "elf_shdr.format", "x[4]E[4]Exxxxxxx name (elf_s_type)type" " (elf_s_flags_32)flags addr offset size link info addralign entsize", 0); #endif return true; // Usage example: // > td `k bin/cur/info/elf_s_type.cparse`; td `k bin/cur/info/elf_s_flags_64.cparse` // > pf `k bin/cur/info/elf_shdr.format` @ `k bin/cur/info/elf_shdr.offset` }
531
True
1
CVE-2022-1714
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'name': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'name': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-23T18:35Z
2022-05-13T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-05-13 15:58:15+02:00
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
init_strtab
init_strtab( ELFOBJ * bin)
['bin']
static int init_strtab(ELFOBJ *bin) { r_return_val_if_fail (!bin->strtab, false); if (!bin->shdr) { return false; } Elf_(Half) shstrndx = bin->ehdr.e_shstrndx; if (shstrndx != SHN_UNDEF && !is_shidx_valid (bin, shstrndx)) { return false; } /* sh_size must be lower than UT32_MAX and not equal to zero, to avoid bugs on malloc() */ if (bin->shdr[shstrndx].sh_size > UT32_MAX) { return false; } if (!bin->shdr[shstrndx].sh_size) { return false; } bin->shstrtab_section = bin->strtab_section = &bin->shdr[shstrndx]; bin->shstrtab_size = bin->shstrtab_section->sh_size; if (bin->shstrtab_size > bin->size) { return false; } if (bin->shstrtab_section->sh_offset > bin->size) { return false; } if (bin->shstrtab_section->sh_offset + bin->shstrtab_section->sh_size > bin->size) { return false; } if (!(bin->shstrtab = calloc (1, bin->shstrtab_size + 1))) { r_sys_perror ("malloc"); bin->shstrtab = NULL; return false; } int res = r_buf_read_at (bin->b, bin->shstrtab_section->sh_offset, (ut8*)bin->shstrtab, bin->shstrtab_section->sh_size); if (res < 1) { R_LOG_ERROR ("read (shstrtab) at 0x%" PFMT64x, (ut64) bin->shstrtab_section->sh_offset); R_FREE (bin->shstrtab); return false; } bin->shstrtab[bin->shstrtab_section->sh_size] = '\0'; sdb_num_set (bin->kv, "elf_shstrtab.offset", bin->shstrtab_section->sh_offset, 0); sdb_num_set (bin->kv, "elf_shstrtab.size", bin->shstrtab_section->sh_size, 0); return true; }
326
True
1
CVE-2022-1714
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
HIGH
7.1
HIGH
1.8
5.2
False
[{'url': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'name': 'https://huntr.dev/bounties/1c22055b-b015-47a8-a57b-4982978751d0', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'name': 'https://github.com/radareorg/radare2/commit/3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Heap-based Buffer Overflow in GitHub repository radareorg/radare2 prior to 5.7.0. The bug causes the program reads data past the end of the intented buffer. Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash.'}]
2022-05-23T18:35Z
2022-05-13T15:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
pancake
2022-05-13 15:58:15+02:00
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
read_phdr
read_phdr( ELFOBJ * bin , bool linux_kernel_hack)
['bin', 'linux_kernel_hack']
static bool read_phdr(ELFOBJ *bin, bool linux_kernel_hack) { bool phdr_found = false; int i; #if R_BIN_ELF64 const bool is_elf64 = true; #else const bool is_elf64 = false; #endif ut64 phnum = Elf_(r_bin_elf_get_phnum) (bin); for (i = 0; i < phnum; i++) { ut8 phdr[sizeof (Elf_(Phdr))] = {0}; int j = 0; const size_t rsize = bin->ehdr.e_phoff + i * sizeof (Elf_(Phdr)); int len = r_buf_read_at (bin->b, rsize, phdr, sizeof (Elf_(Phdr))); if (len < 1) { R_LOG_ERROR ("read (phdr)"); R_FREE (bin->phdr); return false; } bin->phdr[i].p_type = READ32 (phdr, j); if (bin->phdr[i].p_type == PT_PHDR) { phdr_found = true; } if (is_elf64) { bin->phdr[i].p_flags = READ32 (phdr, j); } bin->phdr[i].p_offset = R_BIN_ELF_READWORD (phdr, j); bin->phdr[i].p_vaddr = R_BIN_ELF_READWORD (phdr, j); bin->phdr[i].p_paddr = R_BIN_ELF_READWORD (phdr, j); bin->phdr[i].p_filesz = R_BIN_ELF_READWORD (phdr, j); bin->phdr[i].p_memsz = R_BIN_ELF_READWORD (phdr, j); if (!is_elf64) { bin->phdr[i].p_flags = READ32 (phdr, j); // bin->phdr[i].p_flags |= 1; tiny.elf needs this somehow :? LOAD0 is always +x for linux? } bin->phdr[i].p_align = R_BIN_ELF_READWORD (phdr, j); } /* Here is the where all the fun starts. * Linux kernel since 2005 calculates phdr offset wrongly * adding it to the load address (va of the LOAD0). * See `fs/binfmt_elf.c` file this line: * NEW_AUX_ENT(AT_PHDR, load_addr + exec->e_phoff); * So after the first read, we fix the address and read it again */ if (linux_kernel_hack && phdr_found) { ut64 load_addr = Elf_(r_bin_elf_get_baddr) (bin); bin->ehdr.e_phoff = Elf_(r_bin_elf_v2p) (bin, load_addr + bin->ehdr.e_phoff); return read_phdr (bin, false); } return true; }
371
True
1
CVE-2022-1809
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.1/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
False
[{'url': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'name': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'name': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-824'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Access of Uninitialized Pointer in GitHub repository radareorg/radare2 prior to 5.7.0.'}]
2022-06-03T14:46Z
2022-05-21T23:16Z
Access of Uninitialized Pointer
The program accesses or uses a pointer that has not been initialized.
If the pointer contains an uninitialized value, then the value might not point to a valid memory location. This could cause the program to read from or write to unexpected memory locations, leading to a denial of service. If the uninitialized pointer is used as a function call, then arbitrary functions could be invoked. If an attacker can influence the portion of uninitialized memory that is contained in the pointer, this weakness could be leveraged to execute code or perform other attacks. Depending on memory layout, associated memory management behaviors, and program operation, the attacker might be able to influence the contents of the uninitialized pointer, thus gaining more fine-grained control of the memory location to be accessed.
https://cwe.mitre.org/data/definitions/824.html
0
pancake
2022-05-21 22:13:32+02:00
Fix crash in vtable analysis on UB ##crash * Reported by @greatergoodest via huntrdev * BountyID 0730a95e-c485-4ff2-9a5d-bb3abfda0b17 * Reproducer: minified_crash
919e3ac1a13f753c73e7a8e8d8bb4a143218732d
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_anal_list_vtables
r_anal_list_vtables( RAnal * anal , int rad)
['anal', 'rad']
R_API void r_anal_list_vtables(RAnal *anal, int rad) { RVTableContext context; r_anal_vtable_begin (anal, &context); const char *noMethodName = "No Name found"; RVTableMethodInfo *curMethod; RListIter *vtableIter; RVTableInfo *table; RList *vtables = r_anal_vtable_search (&context); if (rad == 'j') { PJ *pj = pj_new (); if (!pj) { return; } pj_a (pj); r_list_foreach (vtables, vtableIter, table) { pj_o (pj); pj_kN (pj, "offset", table->saddr); pj_ka (pj, "methods"); r_vector_foreach (&table->methods, curMethod) { RAnalFunction *fcn = r_anal_get_fcn_in (anal, curMethod->addr, 0); const char *const name = fcn ? fcn->name : NULL; pj_o (pj); pj_kN (pj, "offset", curMethod->addr); pj_ks (pj, "name", r_str_get_fail (name, noMethodName)); pj_end (pj); } pj_end (pj); pj_end (pj); } pj_end (pj); r_cons_println (pj_string (pj)); pj_free (pj); } else if (rad == '*') { r_list_foreach (vtables, vtableIter, table) { r_cons_printf ("f vtable.0x%08"PFMT64x" %"PFMT64d" @ 0x%08"PFMT64x"\n", table->saddr, r_anal_vtable_info_get_size (&context, table), table->saddr); r_vector_foreach (&table->methods, curMethod) { r_cons_printf ("Cd %d @ 0x%08"PFMT64x"\n", context.word_size, table->saddr + curMethod->vtable_offset); RAnalFunction *fcn = r_anal_get_fcn_in (anal, curMethod->addr, 0); const char *const name = fcn ? fcn->name : NULL; if (name) { r_cons_printf ("f %s=0x%08"PFMT64x"\n", name, curMethod->addr); } else { r_cons_printf ("f method.virtual.0x%08"PFMT64x"=0x%08"PFMT64x"\n", curMethod->addr, curMethod->addr); } } } } else { r_list_foreach (vtables, vtableIter, table) { ut64 vtableStartAddress = table->saddr; r_cons_printf ("\nVtable Found at 0x%08"PFMT64x"\n", vtableStartAddress); r_vector_foreach (&table->methods, curMethod) { RAnalFunction *fcn = r_anal_get_fcn_in (anal, curMethod->addr, 0); const char *const name = fcn ? fcn->name : NULL; r_cons_printf ("0x%08"PFMT64x" : %s\n", vtableStartAddress, r_str_get_fail (name, noMethodName)); vtableStartAddress += context.word_size; } r_cons_newline (); } } r_list_free (vtables); }
461
True
1
CVE-2022-1809
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.1/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
False
[{'url': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'name': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'name': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-824'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Access of Uninitialized Pointer in GitHub repository radareorg/radare2 prior to 5.7.0.'}]
2022-06-03T14:46Z
2022-05-21T23:16Z
Access of Uninitialized Pointer
The program accesses or uses a pointer that has not been initialized.
If the pointer contains an uninitialized value, then the value might not point to a valid memory location. This could cause the program to read from or write to unexpected memory locations, leading to a denial of service. If the uninitialized pointer is used as a function call, then arbitrary functions could be invoked. If an attacker can influence the portion of uninitialized memory that is contained in the pointer, this weakness could be leveraged to execute code or perform other attacks. Depending on memory layout, associated memory management behaviors, and program operation, the attacker might be able to influence the contents of the uninitialized pointer, thus gaining more fine-grained control of the memory location to be accessed.
https://cwe.mitre.org/data/definitions/824.html
0
pancake
2022-05-21 22:13:32+02:00
Fix crash in vtable analysis on UB ##crash * Reported by @greatergoodest via huntrdev * BountyID 0730a95e-c485-4ff2-9a5d-bb3abfda0b17 * Reproducer: minified_crash
919e3ac1a13f753c73e7a8e8d8bb4a143218732d
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
vtable_is_addr_vtable_start_msvc
vtable_is_addr_vtable_start_msvc( RVTableContext * context , ut64 curAddress)
['context', 'curAddress']
static bool vtable_is_addr_vtable_start_msvc(RVTableContext *context, ut64 curAddress) { RAnalRef *xref; RListIter *xrefIter; if (!curAddress || curAddress == UT64_MAX) { return false; } if (curAddress && !vtable_is_value_in_text_section (context, curAddress, NULL)) { return false; } // total xref's to curAddress RList *xrefs = r_anal_xrefs_get (context->anal, curAddress); if (r_list_empty (xrefs)) { r_list_free (xrefs); return false; } r_list_foreach (xrefs, xrefIter, xref) { // section in which currenct xref lies if (vtable_addr_in_text_section (context, xref->addr)) { ut8 buf[VTABLE_BUFF_SIZE]; context->anal->iob.read_at (context->anal->iob.io, xref->addr, buf, sizeof(buf)); RAnalOp analop = {0}; r_anal_op (context->anal, &analop, xref->addr, buf, sizeof(buf), R_ANAL_OP_MASK_BASIC); if (analop.type == R_ANAL_OP_TYPE_MOV || analop.type == R_ANAL_OP_TYPE_LEA) { r_list_free (xrefs); r_anal_op_fini (&analop); return true; } r_anal_op_fini (&analop); } } r_list_free (xrefs); return false; }
213
True
1
CVE-2022-1809
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.1/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
False
[{'url': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'name': 'https://huntr.dev/bounties/0730a95e-c485-4ff2-9a5d-bb3abfda0b17', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'name': 'https://github.com/radareorg/radare2/commit/919e3ac1a13f753c73e7a8e8d8bb4a143218732d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-824'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Access of Uninitialized Pointer in GitHub repository radareorg/radare2 prior to 5.7.0.'}]
2022-06-03T14:46Z
2022-05-21T23:16Z
Access of Uninitialized Pointer
The program accesses or uses a pointer that has not been initialized.
If the pointer contains an uninitialized value, then the value might not point to a valid memory location. This could cause the program to read from or write to unexpected memory locations, leading to a denial of service. If the uninitialized pointer is used as a function call, then arbitrary functions could be invoked. If an attacker can influence the portion of uninitialized memory that is contained in the pointer, this weakness could be leveraged to execute code or perform other attacks. Depending on memory layout, associated memory management behaviors, and program operation, the attacker might be able to influence the contents of the uninitialized pointer, thus gaining more fine-grained control of the memory location to be accessed.
https://cwe.mitre.org/data/definitions/824.html
0
pancake
2022-05-21 22:13:32+02:00
Fix crash in vtable analysis on UB ##crash * Reported by @greatergoodest via huntrdev * BountyID 0730a95e-c485-4ff2-9a5d-bb3abfda0b17 * Reproducer: minified_crash
919e3ac1a13f753c73e7a8e8d8bb4a143218732d
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
vtable_is_value_in_text_section
vtable_is_value_in_text_section( RVTableContext * context , ut64 curAddress , ut64 * value)
['context', 'curAddress', 'value']
static bool vtable_is_value_in_text_section(RVTableContext *context, ut64 curAddress, ut64 *value) { //value at the current address ut64 curAddressValue; if (!context->read_addr (context->anal, curAddress, &curAddressValue)) { return false; } //if the value is in text section bool ret = vtable_addr_in_text_section (context, curAddressValue); if (value) { *value = curAddressValue; } return ret; }
64
True
1
CVE-2022-1899
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:P
NETWORK
LOW
NONE
PARTIAL
NONE
PARTIAL
6.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
NONE
HIGH
9.1
CRITICAL
3.9
5.2
False
[{'url': 'https://huntr.dev/bounties/8a3dc5cb-08b3-4807-82b2-77f08c137a04', 'name': 'https://huntr.dev/bounties/8a3dc5cb-08b3-4807-82b2-77f08c137a04', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/193f4fe01d7f626e2ea937450f2e0c4604420e9d', 'name': 'https://github.com/radareorg/radare2/commit/193f4fe01d7f626e2ea937450f2e0c4604420e9d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Out-of-bounds Read in GitHub repository radareorg/radare2 prior to 5.7.0.'}]
2022-06-03T12:43Z
2022-05-26T17:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
pancake
2022-05-26 17:42:39+02:00
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
193f4fe01d7f626e2ea937450f2e0c4604420e9d
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
string_scan_range
string_scan_range( RList * list , RBinFile * bf , int min , const ut64 from , const ut64 to , int type , int raw , RBinSection * section)
['list', 'bf', 'min', 'from', 'to', 'type', 'raw', 'section']
static int string_scan_range(RList *list, RBinFile *bf, int min, const ut64 from, const ut64 to, int type, int raw, RBinSection *section) { RBin *bin = bf->rbin; ut8 tmp[R_STRING_SCAN_BUFFER_SIZE]; ut64 str_start, needle = from; int count = 0, i, rc, runes; int str_type = R_STRING_TYPE_DETECT; // if list is null it means its gonna dump r_return_val_if_fail (bf, -1); if (type == -1) { type = R_STRING_TYPE_DETECT; } if (from == to) { return 0; } if (from > to) { eprintf ("Invalid range to find strings 0x%"PFMT64x" .. 0x%"PFMT64x"\n", from, to); return -1; } st64 len = (st64)(to - from); if (len < 1 || len > ST32_MAX) { eprintf ("String scan range is invalid (%"PFMT64d" bytes)\n", len); return -1; } ut8 *buf = calloc (len, 1); if (!buf || !min) { free (buf); return -1; } st64 vdelta = 0, pdelta = 0; RBinSection *s = NULL; bool ascii_only = false; PJ *pj = NULL; if (bf->strmode == R_MODE_JSON && !list) { pj = pj_new (); if (pj) { pj_a (pj); } } r_buf_read_at (bf->buf, from, buf, len); char *charset = r_sys_getenv ("RABIN2_CHARSET"); if (!R_STR_ISEMPTY (charset)) { RCharset *ch = r_charset_new (); if (r_charset_use (ch, charset)) { int outlen = len * 4; ut8 *out = calloc (len, 4); if (out) { int res = r_charset_encode_str (ch, out, outlen, buf, len); int i; // TODO unknown chars should be translated to null bytes for (i = 0; i < res; i++) { if (out[i] == '?') { out[i] = 0; } } len = res; free (buf); buf = out; } else { eprintf ("Cannot allocate\n"); } } else { eprintf ("Invalid value for RABIN2_CHARSET.\n"); } r_charset_free (ch); } free (charset); RConsIsBreaked is_breaked = (bin && bin->consb.is_breaked)? bin->consb.is_breaked: NULL; // may oobread while (needle < to) { if (is_breaked && is_breaked ()) { break; } // smol optimization if (needle + 4 < to) { ut32 n1 = r_read_le32 (buf + needle - from); if (!n1) { needle += 4; continue; } } rc = r_utf8_decode (buf + needle - from, to - needle, NULL); if (!rc) { needle++; continue; } bool addr_aligned = !(needle % 4); if (type == R_STRING_TYPE_DETECT) { char *w = (char *)buf + needle + rc - from; if (((to - needle) > 8 + rc)) { // TODO: support le and be bool is_wide32le = (needle + rc + 2 < to) && (!w[0] && !w[1] && !w[2] && w[3] && !w[4]); // reduce false positives if (is_wide32le) { if (!w[5] && !w[6] && w[7] && w[8]) { is_wide32le = false; } } if (!addr_aligned) { is_wide32le = false; } ///is_wide32be &= (n1 < 0xff && n11 < 0xff); // false; // n11 < 0xff; if (is_wide32le && addr_aligned) { str_type = R_STRING_TYPE_WIDE32; // asume big endian,is there little endian w32? } else { // bool is_wide = (n1 && n2 && n1 < 0xff && (!n2 || n2 < 0xff)); bool is_wide = needle + rc + 4 < to && !w[0] && w[1] && !w[2] && w[3] && !w[4]; str_type = is_wide? R_STRING_TYPE_WIDE: R_STRING_TYPE_ASCII; } } else { if (rc > 1) { str_type = R_STRING_TYPE_UTF8; // could be charset if set :? } else { str_type = R_STRING_TYPE_ASCII; } } } else if (type == R_STRING_TYPE_UTF8) { str_type = R_STRING_TYPE_ASCII; // initial assumption } else { str_type = type; } runes = 0; str_start = needle; /* Eat a whole C string */ for (i = 0; i < sizeof (tmp) - 4 && needle < to; i += rc) { RRune r = {0}; if (str_type == R_STRING_TYPE_WIDE32) { rc = r_utf32le_decode (buf + needle - from, to - needle, &r); if (rc) { rc = 4; } } else if (str_type == R_STRING_TYPE_WIDE) { rc = r_utf16le_decode (buf + needle - from, to - needle, &r); if (rc == 1) { rc = 2; } } else { rc = r_utf8_decode (buf + needle - from, to - needle, &r); if (rc > 1) { str_type = R_STRING_TYPE_UTF8; } } /* Invalid sequence detected */ if (!rc || (ascii_only && r > 0x7f)) { needle++; break; } needle += rc; if (r_isprint (r) && r != '\\') { if (str_type == R_STRING_TYPE_WIDE32) { if (r == 0xff) { r = 0; } } rc = r_utf8_encode (tmp + i, r); runes++; /* Print the escape code */ } else if (r && r < 0x100 && strchr ("\b\v\f\n\r\t\a\033\\", (char)r)) { if ((i + 32) < sizeof (tmp) && r < 93) { tmp[i + 0] = '\\'; tmp[i + 1] = " abtnvfr e " " " " " " \\"[r]; } else { // string too long break; } rc = 2; runes++; } else { /* \0 marks the end of C-strings */ break; } } tmp[i++] = '\0'; if (runes < min && runes >= 2 && str_type == R_STRING_TYPE_ASCII && needle < to) { // back up past the \0 to the last char just in case it starts a wide string needle -= 2; } if (runes >= min) { // reduce false positives int j, num_blocks, *block_list; int *freq_list = NULL, expected_ascii, actual_ascii, num_chars; if (str_type == R_STRING_TYPE_ASCII) { for (j = 0; j < i; j++) { char ch = tmp[j]; if (ch != '\n' && ch != '\r' && ch != '\t') { if (!IS_PRINTABLE (tmp[j])) { continue; } } } } switch (str_type) { case R_STRING_TYPE_UTF8: case R_STRING_TYPE_WIDE: case R_STRING_TYPE_WIDE32: num_blocks = 0; block_list = r_utf_block_list ((const ut8*)tmp, i - 1, str_type == R_STRING_TYPE_WIDE? &freq_list: NULL); if (block_list) { for (j = 0; block_list[j] != -1; j++) { num_blocks++; } } if (freq_list) { num_chars = 0; actual_ascii = 0; for (j = 0; freq_list[j] != -1; j++) { num_chars += freq_list[j]; if (!block_list[j]) { // ASCII actual_ascii = freq_list[j]; } } free (freq_list); expected_ascii = num_blocks ? num_chars / num_blocks : 0; if (actual_ascii > expected_ascii) { ascii_only = true; needle = str_start; free (block_list); continue; } } free (block_list); if (num_blocks > R_STRING_MAX_UNI_BLOCKS) { needle++; continue; } } RBinString *bs = R_NEW0 (RBinString); if (!bs) { break; } bs->type = str_type; bs->length = runes; bs->size = needle - str_start; bs->ordinal = count++; // TODO: move into adjust_offset switch (str_type) { case R_STRING_TYPE_WIDE: if (str_start - from > 1) { const ut8 *p = buf + str_start - 2 - from; if (p[0] == 0xff && p[1] == 0xfe) { str_start -= 2; // \xff\xfe } } break; case R_STRING_TYPE_WIDE32: if (str_start - from > 3) { const ut8 *p = buf + str_start - 4 - from; if (p[0] == 0xff && p[1] == 0xfe) { str_start -= 4; // \xff\xfe\x00\x00 } } break; } if (!s) { if (section) { s = section; } else if (bf->o) { s = r_bin_get_section_at (bf->o, str_start, false); } if (s) { vdelta = s->vaddr; pdelta = s->paddr; } } ut64 baddr = bf->loadaddr && bf->o? bf->o->baddr: bf->loadaddr; bs->paddr = str_start + baddr; bs->vaddr = str_start - pdelta + vdelta + baddr; bs->string = r_str_ndup ((const char *)tmp, i); if (list) { r_list_append (list, bs); if (bf->o) { ht_up_insert (bf->o->strings_db, bs->vaddr, bs); } } else { print_string (bf, bs, raw, pj); r_bin_string_free (bs); } if (from == 0 && to == bf->size) { /* force lookup section at the next one */ s = NULL; } } ascii_only = false; } free (buf); if (pj) { pj_end (pj); if (bin) { RIO *io = bin->iob.io; if (io) { io->cb_printf ("%s", pj_string (pj)); } } pj_free (pj); } return count; }
1773
True
1
CVE-2018-20458
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
False
[{'url': 'https://github.com/radare/radare2/issues/12374', 'name': 'https://github.com/radare/radare2/issues/12374', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19', 'name': 'https://github.com/radareorg/radare2/commit/30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.1.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 prior to 3.1.1, r_bin_dyldcache_extract in libr/bin/format/mach0/dyldcache.c may allow attackers to cause a denial-of-service (application crash caused by out-of-bounds read) by crafting an input file.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-12-03 02:03:00+01:00
Fix #12374 - oobread crash in truncated dyldcache ##bin (#12381)
30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_dyldcache_extract
r_bin_dyldcache_extract( struct r_bin_dyldcache_obj_t * bin , int idx , int * nlib)
['bin', 'idx', 'nlib']
struct r_bin_dyldcache_lib_t *r_bin_dyldcache_extract(struct r_bin_dyldcache_obj_t* bin, int idx, int *nlib) { ut64 liboff, linkedit_offset; ut64 dyld_vmbase; ut32 addend = 0; struct r_bin_dyldcache_lib_t *ret = NULL; struct dyld_cache_image_info* image_infos = NULL; struct mach_header *mh; ut8 *data, *cmdptr; int cmd, libsz = 0; RBuffer* dbuf; char *libname; if (!bin) { return NULL; } if (bin->size < 1) { eprintf ("Empty file? (%s)\n", bin->file? bin->file: "(null)"); return NULL; } if (bin->nlibs < 0 || idx < 0 || idx >= bin->nlibs) { return NULL; } *nlib = bin->nlibs; ret = R_NEW0 (struct r_bin_dyldcache_lib_t); if (!ret) { perror ("malloc (ret)"); return NULL; } if (bin->hdr.startaddr > bin->size) { eprintf ("corrupted dyldcache"); free (ret); return NULL; } if (bin->hdr.startaddr > bin->size || bin->hdr.baseaddroff > bin->size) { eprintf ("corrupted dyldcache"); free (ret); return NULL; } image_infos = (struct dyld_cache_image_info*) (bin->b->buf + bin->hdr.startaddr); dyld_vmbase = *(ut64 *)(bin->b->buf + bin->hdr.baseaddroff); liboff = image_infos[idx].address - dyld_vmbase; if (liboff > bin->size) { eprintf ("Corrupted file\n"); free (ret); return NULL; } ret->offset = liboff; if (image_infos[idx].pathFileOffset > bin->size) { eprintf ("corrupted file\n"); free (ret); return NULL; } libname = (char *)(bin->b->buf + image_infos[idx].pathFileOffset); /* Locate lib hdr in cache */ data = bin->b->buf + liboff; mh = (struct mach_header *)data; /* Check it is mach-o */ if (mh->magic != MH_MAGIC && mh->magic != MH_MAGIC_64) { if (mh->magic == 0xbebafeca) { //FAT binary eprintf ("FAT Binary\n"); } eprintf ("Not mach-o\n"); free (ret); return NULL; } /* Write mach-o hdr */ if (!(dbuf = r_buf_new ())) { eprintf ("new (dbuf)\n"); free (ret); return NULL; } addend = mh->magic == MH_MAGIC? sizeof (struct mach_header) : sizeof (struct mach_header_64); r_buf_set_bytes (dbuf, data, addend); cmdptr = data + addend; /* Write load commands */ for (cmd = 0; cmd < mh->ncmds; cmd++) { struct load_command *lc = (struct load_command *)cmdptr; r_buf_append_bytes (dbuf, (ut8*)lc, lc->cmdsize); cmdptr += lc->cmdsize; } cmdptr = data + addend; /* Write segments */ for (cmd = linkedit_offset = 0; cmd < mh->ncmds; cmd++) { struct load_command *lc = (struct load_command *)cmdptr; cmdptr += lc->cmdsize; switch (lc->cmd) { case LC_SEGMENT: { /* Write segment and patch offset */ struct segment_command *seg = (struct segment_command *)lc; int t = seg->filesize; if (seg->fileoff + seg->filesize > bin->size || seg->fileoff > bin->size) { eprintf ("malformed dyldcache\n"); free (ret); r_buf_free (dbuf); return NULL; } r_buf_append_bytes (dbuf, bin->b->buf+seg->fileoff, t); r_bin_dyldcache_apply_patch (dbuf, dbuf->length, (ut64)((size_t)&seg->fileoff - (size_t)data)); /* Patch section offsets */ int sect_offset = seg->fileoff - libsz; libsz = dbuf->length; if (!strcmp (seg->segname, "__LINKEDIT")) { linkedit_offset = sect_offset; } if (seg->nsects > 0) { struct section *sects = (struct section *)((ut8 *)seg + sizeof(struct segment_command)); int nsect; for (nsect = 0; nsect < seg->nsects; nsect++) { if (sects[nsect].offset > libsz) { r_bin_dyldcache_apply_patch (dbuf, sects[nsect].offset - sect_offset, (ut64)((size_t)&sects[nsect].offset - (size_t)data)); } } } } break; case LC_SYMTAB: { struct symtab_command *st = (struct symtab_command *)lc; NZ_OFFSET (st->symoff); NZ_OFFSET (st->stroff); } break; case LC_DYSYMTAB: { struct dysymtab_command *st = (struct dysymtab_command *)lc; NZ_OFFSET (st->tocoff); NZ_OFFSET (st->modtaboff); NZ_OFFSET (st->extrefsymoff); NZ_OFFSET (st->indirectsymoff); NZ_OFFSET (st->extreloff); NZ_OFFSET (st->locreloff); } break; case LC_DYLD_INFO: case LC_DYLD_INFO_ONLY: { struct dyld_info_command *st = (struct dyld_info_command *)lc; NZ_OFFSET (st->rebase_off); NZ_OFFSET (st->bind_off); NZ_OFFSET (st->weak_bind_off); NZ_OFFSET (st->lazy_bind_off); NZ_OFFSET (st->export_off); } break; } } /* Fill r_bin_dyldcache_lib_t ret */ ret->b = dbuf; strncpy (ret->path, libname, sizeof (ret->path) - 1); ret->size = libsz; return ret; }
1012
True
1
CVE-2018-20458
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
False
[{'url': 'https://github.com/radare/radare2/issues/12374', 'name': 'https://github.com/radare/radare2/issues/12374', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19', 'name': 'https://github.com/radareorg/radare2/commit/30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.1.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 prior to 3.1.1, r_bin_dyldcache_extract in libr/bin/format/mach0/dyldcache.c may allow attackers to cause a denial-of-service (application crash caused by out-of-bounds read) by crafting an input file.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-12-03 02:03:00+01:00
Fix #12374 - oobread crash in truncated dyldcache ##bin (#12381)
30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_dyldcache_from_bytes_new
r_bin_dyldcache_from_bytes_new( const ut8 * buf , ut64 size)
['buf', 'size']
struct r_bin_dyldcache_obj_t* r_bin_dyldcache_from_bytes_new(const ut8* buf, ut64 size) { struct r_bin_dyldcache_obj_t *bin; if (!(bin = malloc (sizeof (struct r_bin_dyldcache_obj_t)))) { return NULL; } memset (bin, 0, sizeof (struct r_bin_dyldcache_obj_t)); if (!buf) { return r_bin_dyldcache_free (bin); } bin->b = r_buf_new(); if (!r_buf_set_bytes (bin->b, buf, size)) { return r_bin_dyldcache_free (bin); } if (!r_bin_dyldcache_init (bin)) { return r_bin_dyldcache_free (bin); } bin->size = size; return bin; }
119
True
1
CVE-2018-20457
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
False
[{'url': 'https://github.com/radare/radare2/issues/12417', 'name': 'https://github.com/radare/radare2/issues/12417', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'name': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 through 3.1.3, the assemble function inside libr/asm/p/asm_arm_cs.c allows attackers to cause a denial-of-service (application crash via an r_num_calc out-of-bounds read) by crafting an arm assembly input because a loop uses an incorrect index in armass.c and certain length validation is missing in armass64.c, a related issue to CVE-2018-20459.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
David CARLIER
2018-12-10 15:42:02+00:00
Fix #12417/#12418 (arm assembler heap overflows)
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
armass_assemble
armass_assemble( const char * str , ut64 off , int thumb)
['str', 'off', 'thumb']
ut32 armass_assemble(const char *str, ut64 off, int thumb) { int i, j; char buf[128]; ArmOpcode aop = {.off = off}; for (i = j = 0; i < sizeof (buf) - 1 && str[i]; i++, j++) { if (str[j] == '#') { i--; continue; } buf[i] = tolower ((const ut8)str[j]); } buf[i] = 0; arm_opcode_parse (&aop, buf); aop.off = off; if (thumb < 0 || thumb > 1) { return -1; } if (!assemble[thumb] (&aop, off, buf)) { //eprintf ("armass: Unknown opcode (%s)\n", buf); return -1; } return aop.o; }
163
True
1
CVE-2018-20459
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
False
[{'url': 'https://github.com/radare/radare2/issues/12418', 'name': 'https://github.com/radare/radare2/issues/12418', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'name': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 through 3.1.3, the armass_assemble function in libr/asm/arch/arm/armass.c allows attackers to cause a denial-of-service (application crash by out-of-bounds read) by crafting an arm assembly input because a loop uses an incorrect index in armass.c and certain length validation is missing in armass64.c, a related issue to CVE-2018-20457.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
David CARLIER
2018-12-10 15:42:02+00:00
Fix #12417/#12418 (arm assembler heap overflows)
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
armass_assemble
armass_assemble( const char * str , ut64 off , int thumb)
['str', 'off', 'thumb']
ut32 armass_assemble(const char *str, ut64 off, int thumb) { int i, j; char buf[128]; ArmOpcode aop = {.off = off}; for (i = j = 0; i < sizeof (buf) - 1 && str[i]; i++, j++) { if (str[j] == '#') { i--; continue; } buf[i] = tolower ((const ut8)str[j]); } buf[i] = 0; arm_opcode_parse (&aop, buf); aop.off = off; if (thumb < 0 || thumb > 1) { return -1; } if (!assemble[thumb] (&aop, off, buf)) { //eprintf ("armass: Unknown opcode (%s)\n", buf); return -1; } return aop.o; }
163
True
1
CVE-2018-20457
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
False
[{'url': 'https://github.com/radare/radare2/issues/12417', 'name': 'https://github.com/radare/radare2/issues/12417', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'name': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 through 3.1.3, the assemble function inside libr/asm/p/asm_arm_cs.c allows attackers to cause a denial-of-service (application crash via an r_num_calc out-of-bounds read) by crafting an arm assembly input because a loop uses an incorrect index in armass.c and certain length validation is missing in armass64.c, a related issue to CVE-2018-20459.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
David CARLIER
2018-12-10 15:42:02+00:00
Fix #12417/#12418 (arm assembler heap overflows)
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
parseOperands
parseOperands( char * str , ArmOp * op)
['str', 'op']
static bool parseOperands(char* str, ArmOp *op) { char *t = strdup (str); int operand = 0; char *token = t; char *x; int imm_count = 0; int mem_opt = 0; if (!token) { return false; } while (token) { char *next = strchr (token, ','); if (next) { *next++ = 0; } while (token[0] == ' ') { token++; } if (operand >= MAX_OPERANDS) { eprintf ("Too many operands\n"); return false; } op->operands[operand].type = ARM_NOTYPE; op->operands[operand].reg_type = ARM_UNDEFINED; op->operands[operand].shift = ARM_NO_SHIFT; while (token[0] == ' ' || token[0] == '[' || token[0] == ']') { token ++; } if (!strncmp (token, "lsl", 3)) { op->operands[operand].shift = ARM_LSL; } else if (!strncmp (token, "lsr", 3)) { op->operands[operand].shift = ARM_LSR; } else if (!strncmp (token, "asr", 3)) { op->operands[operand].shift = ARM_ASR; } if (op->operands[operand].shift != ARM_NO_SHIFT) { op->operands_count ++; op->operands[operand].shift_amount = r_num_math (NULL, token + 4); if (op->operands[operand].shift_amount > 63) { return false; } operand ++; token = next; continue; } switch (token[0]) { case 'x': x = strchr (token, ','); if (x) { x[0] = '\0'; } op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_REG64; op->operands[operand].reg = r_num_math (NULL, token + 1); if (op->operands[operand].reg > 31) { return false; } break; case 'w': op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_REG32; op->operands[operand].reg = r_num_math (NULL, token + 1); if (op->operands[operand].reg > 31) { return false; } break; case 'v': op->operands_count ++; op->operands[operand].type = ARM_FP; op->operands[operand].reg = r_num_math (NULL, token + 1); break; case 's': case 'S': if (token[1] == 'P' || token [1] == 'p') { int i; for (i = 0; msr_const[i].name; i++) { if (!r_str_ncasecmp (token, msr_const[i].name, strlen (msr_const[i].name))) { op->operands[operand].sp_val = msr_const[i].val; break; } } op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_SP | ARM_REG64; op->operands[operand].reg = 31; break; } mem_opt = get_mem_option (token); if (mem_opt != -1) { op->operands_count ++; op->operands[operand].type = ARM_MEM_OPT; op->operands[operand].mem_option = mem_opt; } break; case 'L': case 'l': case 'I': case 'i': case 'N': case 'n': case 'O': case 'o': case 'p': case 'P': mem_opt = get_mem_option (token); if (mem_opt != -1) { op->operands_count ++; op->operands[operand].type = ARM_MEM_OPT; op->operands[operand].mem_option = mem_opt; } break; case '-': op->operands[operand].sign = -1; // falthru default: op->operands_count ++; op->operands[operand].type = ARM_CONSTANT; op->operands[operand].immediate = r_num_math (NULL, token); imm_count++; break; } token = next; operand ++; if (operand > MAX_OPERANDS) { free (t); return false; } } free (t); return true; }
861
True
1
CVE-2018-20459
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
False
[{'url': 'https://github.com/radare/radare2/issues/12418', 'name': 'https://github.com/radare/radare2/issues/12418', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'name': 'https://github.com/radareorg/radare2/commit/e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In radare2 through 3.1.3, the armass_assemble function in libr/asm/arch/arm/armass.c allows attackers to cause a denial-of-service (application crash by out-of-bounds read) by crafting an arm assembly input because a loop uses an incorrect index in armass.c and certain length validation is missing in armass64.c, a related issue to CVE-2018-20457.'}]
2020-10-15T16:14Z
2018-12-25T19:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
David CARLIER
2018-12-10 15:42:02+00:00
Fix #12417/#12418 (arm assembler heap overflows)
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
parseOperands
parseOperands( char * str , ArmOp * op)
['str', 'op']
static bool parseOperands(char* str, ArmOp *op) { char *t = strdup (str); int operand = 0; char *token = t; char *x; int imm_count = 0; int mem_opt = 0; if (!token) { return false; } while (token) { char *next = strchr (token, ','); if (next) { *next++ = 0; } while (token[0] == ' ') { token++; } if (operand >= MAX_OPERANDS) { eprintf ("Too many operands\n"); return false; } op->operands[operand].type = ARM_NOTYPE; op->operands[operand].reg_type = ARM_UNDEFINED; op->operands[operand].shift = ARM_NO_SHIFT; while (token[0] == ' ' || token[0] == '[' || token[0] == ']') { token ++; } if (!strncmp (token, "lsl", 3)) { op->operands[operand].shift = ARM_LSL; } else if (!strncmp (token, "lsr", 3)) { op->operands[operand].shift = ARM_LSR; } else if (!strncmp (token, "asr", 3)) { op->operands[operand].shift = ARM_ASR; } if (op->operands[operand].shift != ARM_NO_SHIFT) { op->operands_count ++; op->operands[operand].shift_amount = r_num_math (NULL, token + 4); if (op->operands[operand].shift_amount > 63) { return false; } operand ++; token = next; continue; } switch (token[0]) { case 'x': x = strchr (token, ','); if (x) { x[0] = '\0'; } op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_REG64; op->operands[operand].reg = r_num_math (NULL, token + 1); if (op->operands[operand].reg > 31) { return false; } break; case 'w': op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_REG32; op->operands[operand].reg = r_num_math (NULL, token + 1); if (op->operands[operand].reg > 31) { return false; } break; case 'v': op->operands_count ++; op->operands[operand].type = ARM_FP; op->operands[operand].reg = r_num_math (NULL, token + 1); break; case 's': case 'S': if (token[1] == 'P' || token [1] == 'p') { int i; for (i = 0; msr_const[i].name; i++) { if (!r_str_ncasecmp (token, msr_const[i].name, strlen (msr_const[i].name))) { op->operands[operand].sp_val = msr_const[i].val; break; } } op->operands_count ++; op->operands[operand].type = ARM_GPR; op->operands[operand].reg_type = ARM_SP | ARM_REG64; op->operands[operand].reg = 31; break; } mem_opt = get_mem_option (token); if (mem_opt != -1) { op->operands_count ++; op->operands[operand].type = ARM_MEM_OPT; op->operands[operand].mem_option = mem_opt; } break; case 'L': case 'l': case 'I': case 'i': case 'N': case 'n': case 'O': case 'o': case 'p': case 'P': mem_opt = get_mem_option (token); if (mem_opt != -1) { op->operands_count ++; op->operands[operand].type = ARM_MEM_OPT; op->operands[operand].mem_option = mem_opt; } break; case '-': op->operands[operand].sign = -1; // falthru default: op->operands_count ++; op->operands[operand].type = ARM_CONSTANT; op->operands[operand].immediate = r_num_math (NULL, token); imm_count++; break; } token = next; operand ++; if (operand > MAX_OPERANDS) { free (t); return false; } } free (t); return true; }
861
True
1
CVE-2019-16718
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.1/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
False
[{'url': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'name': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'name': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'name': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-78'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.9.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In radare2 before 3.9.0, a command injection vulnerability exists in bin_symbols() in libr/core/cbin.c. By using a crafted executable file, it's possible to execute arbitrary shell commands with the permissions of the victim. This vulnerability is due to an insufficient fix for CVE-2019-14745 and improper handling of symbol names embedded in executables."}]
2020-11-16T19:21Z
2019-09-23T14:15Z
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing. The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line. From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
https://cwe.mitre.org/data/definitions/78.html
0
pancake
2019-09-09 06:13:45+02:00
More fixes for the CVE-2019-14745
5411543a310a470b1257fb93273cdd6e8dfcb3af
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
__filterShell
__filterShell( const char * arg)
['arg']
static char *__filterShell(const char *arg) { r_return_val_if_fail (arg, NULL); char *a = malloc (strlen (arg) + 1); if (!a) { return NULL; } char *b = a; while (*arg) { switch (*arg) { case '@': case '`': case '|': case ';': case '\n': break; default: *b++ = *arg; break; } arg++; } *b = 0; return a; }
99
True
1
CVE-2019-16718
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.1/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
False
[{'url': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'name': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'name': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'name': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-78'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.9.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In radare2 before 3.9.0, a command injection vulnerability exists in bin_symbols() in libr/core/cbin.c. By using a crafted executable file, it's possible to execute arbitrary shell commands with the permissions of the victim. This vulnerability is due to an insufficient fix for CVE-2019-14745 and improper handling of symbol names embedded in executables."}]
2020-11-16T19:21Z
2019-09-23T14:15Z
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing. The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line. From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
https://cwe.mitre.org/data/definitions/78.html
0
pancake
2019-09-09 06:13:45+02:00
More fixes for the CVE-2019-14745
5411543a310a470b1257fb93273cdd6e8dfcb3af
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
bin_symbols
bin_symbols( RCore * r , int mode , ut64 laddr , int va , ut64 at , const char * name , bool exponly , const char * args)
['r', 'mode', 'laddr', 'va', 'at', 'name', 'exponly', 'args']
static int bin_symbols(RCore *r, int mode, ut64 laddr, int va, ut64 at, const char *name, bool exponly, const char *args) { RBinInfo *info = r_bin_get_info (r->bin); RList *entries = r_bin_get_entries (r->bin); RBinSymbol *symbol; RBinAddr *entry; RListIter *iter; bool firstexp = true; bool printHere = false; int i = 0, lastfs = 's'; bool bin_demangle = r_config_get_i (r->config, "bin.demangle"); if (!info) { return 0; } if (args && *args == '.') { printHere = true; } bool is_arm = info && info->arch && !strncmp (info->arch, "arm", 3); const char *lang = bin_demangle ? r_config_get (r->config, "bin.lang") : NULL; RList *symbols = r_bin_get_symbols (r->bin); r_spaces_push (&r->anal->meta_spaces, "bin"); if (IS_MODE_JSON (mode) && !printHere) { r_cons_printf ("["); } else if (IS_MODE_SET (mode)) { r_flag_space_set (r->flags, R_FLAGS_FS_SYMBOLS); } else if (!at && exponly) { if (IS_MODE_RAD (mode)) { r_cons_printf ("fs exports\n"); } else if (IS_MODE_NORMAL (mode)) { r_cons_printf (printHere ? "" : "[Exports]\n"); } } else if (!at && !exponly) { if (IS_MODE_RAD (mode)) { r_cons_printf ("fs symbols\n"); } else if (IS_MODE_NORMAL (mode)) { r_cons_printf (printHere ? "" : "[Symbols]\n"); } } if (IS_MODE_NORMAL (mode)) { r_cons_printf ("Num Paddr Vaddr Bind Type Size Name\n"); } size_t count = 0; r_list_foreach (symbols, iter, symbol) { if (!symbol->name) { continue; } char *r_symbol_name = r_str_escape_utf8 (symbol->name, false, true); ut64 addr = compute_addr (r->bin, symbol->paddr, symbol->vaddr, va); int len = symbol->size ? symbol->size : 32; SymName sn = {0}; if (exponly && !isAnExport (symbol)) { free (r_symbol_name); continue; } if (name && strcmp (r_symbol_name, name)) { free (r_symbol_name); continue; } if (at && (!symbol->size || !is_in_range (at, addr, symbol->size))) { free (r_symbol_name); continue; } if ((printHere && !is_in_range (r->offset, symbol->paddr, len)) && (printHere && !is_in_range (r->offset, addr, len))) { free (r_symbol_name); continue; } count ++; snInit (r, &sn, symbol, lang); if (IS_MODE_SET (mode) && (is_section_symbol (symbol) || is_file_symbol (symbol))) { /* * Skip section symbols because they will have their own flag. * Skip also file symbols because not useful for now. */ } else if (IS_MODE_SET (mode) && is_special_symbol (symbol)) { if (is_arm) { handle_arm_special_symbol (r, symbol, va); } } else if (IS_MODE_SET (mode)) { // TODO: provide separate API in RBinPlugin to let plugins handle anal hints/metadata if (is_arm) { handle_arm_symbol (r, symbol, info, va); } select_flag_space (r, symbol); /* If that's a Classed symbol (method or so) */ if (sn.classname) { RFlagItem *fi = r_flag_get (r->flags, sn.methflag); if (r->bin->prefix) { char *prname = r_str_newf ("%s.%s", r->bin->prefix, sn.methflag); r_name_filter (sn.methflag, -1); free (sn.methflag); sn.methflag = prname; } if (fi) { r_flag_item_set_realname (fi, sn.methname); if ((fi->offset - r->flags->base) == addr) { // char *comment = fi->comment ? strdup (fi->comment) : NULL; r_flag_unset (r->flags, fi); } } else { fi = r_flag_set (r->flags, sn.methflag, addr, symbol->size); char *comment = fi->comment ? strdup (fi->comment) : NULL; if (comment) { r_flag_item_set_comment (fi, comment); R_FREE (comment); } } } else { const char *n = sn.demname ? sn.demname : sn.name; const char *fn = sn.demflag ? sn.demflag : sn.nameflag; char *fnp = (r->bin->prefix) ? r_str_newf ("%s.%s", r->bin->prefix, fn): strdup (fn); RFlagItem *fi = r_flag_set (r->flags, fnp, addr, symbol->size); if (fi) { r_flag_item_set_realname (fi, n); fi->demangled = (bool)(size_t)sn.demname; } else { if (fn) { eprintf ("[Warning] Can't find flag (%s)\n", fn); } } free (fnp); } if (sn.demname) { r_meta_add (r->anal, R_META_TYPE_COMMENT, addr, symbol->size, sn.demname); } r_flag_space_pop (r->flags); } else if (IS_MODE_JSON (mode)) { char *str = r_str_escape_utf8_for_json (r_symbol_name, -1); // str = r_str_replace (str, "\"", "\\\"", 1); r_cons_printf ("%s{\"name\":\"%s\"," "\"demname\":\"%s\"," "\"flagname\":\"%s\"," "\"ordinal\":%d," "\"bind\":\"%s\"," "\"size\":%d," "\"type\":\"%s\"," "\"vaddr\":%"PFMT64d"," "\"paddr\":%"PFMT64d"}", ((exponly && firstexp) || printHere) ? "" : (iter->p ? "," : ""), str, sn.demname? sn.demname: "", sn.nameflag, symbol->ordinal, symbol->bind, (int)symbol->size, symbol->type, (ut64)addr, (ut64)symbol->paddr); free (str); } else if (IS_MODE_SIMPLE (mode)) { const char *name = sn.demname? sn.demname: r_symbol_name; r_cons_printf ("0x%08"PFMT64x" %d %s\n", addr, (int)symbol->size, name); } else if (IS_MODE_SIMPLEST (mode)) { const char *name = sn.demname? sn.demname: r_symbol_name; r_cons_printf ("%s\n", name); } else if (IS_MODE_RAD (mode)) { /* Skip special symbols because we do not flag them and * they shouldn't be printed in the rad format either */ if (is_special_symbol (symbol)) { goto next; } RBinFile *binfile; RBinPlugin *plugin; const char *name = sn.demname? sn.demname: r_symbol_name; if (!name) { goto next; } if (!strncmp (name, "imp.", 4)) { if (lastfs != 'i') { r_cons_printf ("fs imports\n"); } lastfs = 'i'; } else { if (lastfs != 's') { const char *fs = exponly? "exports": "symbols"; r_cons_printf ("fs %s\n", fs); } lastfs = 's'; } if (r->bin->prefix || *name) { // we don't want unnamed symbol flags char *flagname = construct_symbol_flagname ("sym", name, MAXFLAG_LEN_DEFAULT); if (!flagname) { goto next; } r_cons_printf ("\"f %s%s%s %u 0x%08" PFMT64x "\"\n", r->bin->prefix ? r->bin->prefix : "", r->bin->prefix ? "." : "", flagname, symbol->size, addr); free (flagname); } binfile = r_bin_cur (r->bin); plugin = r_bin_file_cur_plugin (binfile); if (plugin && plugin->name) { if (r_str_startswith (plugin->name, "pe")) { char *module = strdup (r_symbol_name); char *p = strstr (module, ".dll_"); if (p && strstr (module, "imp.")) { char *symname = __filterShell (p + 5); char *m = __filterShell (module); *p = 0; if (r->bin->prefix) { r_cons_printf ("k bin/pe/%s/%d=%s.%s\n", module, symbol->ordinal, r->bin->prefix, symname); } else { r_cons_printf ("k bin/pe/%s/%d=%s\n", module, symbol->ordinal, symname); } free (symname); free (m); } free (module); } } } else { const char *bind = symbol->bind? symbol->bind: "NONE"; const char *type = symbol->type? symbol->type: "NONE"; const char *name = r_str_get (sn.demname? sn.demname: r_symbol_name); // const char *fwd = r_str_get (symbol->forwarder); r_cons_printf ("%03u", symbol->ordinal); if (symbol->paddr == UT64_MAX) { r_cons_printf (" ----------"); } else { r_cons_printf (" 0x%08"PFMT64x, symbol->paddr); } r_cons_printf (" 0x%08"PFMT64x" %6s %6s %4d%s%s\n", addr, bind, type, symbol->size, *name? " ": "", name); } next: snFini (&sn); i++; free (r_symbol_name); if (exponly && firstexp) { firstexp = false; } if (printHere) { break; } } if (count == 0 && IS_MODE_JSON (mode)) { r_cons_printf ("{}"); } //handle thumb and arm for entry point since they are not present in symbols if (is_arm) { r_list_foreach (entries, iter, entry) { if (IS_MODE_SET (mode)) { handle_arm_entry (r, entry, info, va); } } } if (IS_MODE_JSON (mode) && !printHere) { r_cons_printf ("]"); } r_spaces_pop (&r->anal->meta_spaces); return true; }
1739
True
1
CVE-2019-16718
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.1/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
False
[{'url': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'name': 'https://github.com/radareorg/radare2/commit/5411543a310a470b1257fb93273cdd6e8dfcb3af', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'name': 'https://github.com/radareorg/radare2/compare/3.8.0...3.9.0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'name': 'https://github.com/radareorg/radare2/commit/dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-78'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.9.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In radare2 before 3.9.0, a command injection vulnerability exists in bin_symbols() in libr/core/cbin.c. By using a crafted executable file, it's possible to execute arbitrary shell commands with the permissions of the victim. This vulnerability is due to an insufficient fix for CVE-2019-14745 and improper handling of symbol names embedded in executables."}]
2020-11-16T19:21Z
2019-09-23T14:15Z
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection: The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing. The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line. From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
https://cwe.mitre.org/data/definitions/78.html
0
pancake
2019-09-09 06:28:11+02:00
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_core_cmd_subst_i
r_core_cmd_subst_i( RCore * core , char * cmd , char * colon , bool * tmpseek)
['core', 'cmd', 'colon', 'tmpseek']
static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon, bool *tmpseek) { RList *tmpenvs = r_list_newf (tmpenvs_free); const char *quotestr = "`"; const char *tick = NULL; char *ptr, *ptr2, *str; char *arroba = NULL; char *grep = NULL; RIODesc *tmpdesc = NULL; int pamode = !core->io->va; int i, ret = 0, pipefd; bool usemyblock = false; int scr_html = -1; int scr_color = -1; bool eos = false; bool haveQuote = false; bool oldfixedarch = core->fixedarch; bool oldfixedbits = core->fixedbits; bool cmd_tmpseek = false; ut64 tmpbsz = core->blocksize; int cmd_ignbithints = -1; if (!cmd) { r_list_free (tmpenvs); return 0; } cmd = r_str_trim_head_tail (cmd); char *$0 = strstr (cmd, "$("); if ($0) { char *$1 = strchr ($0 + 2, ')'); if ($1) { *$0 = '`'; *$1 = '`'; memmove ($0 + 1, $0 + 2, strlen ($0 + 2) + 1); } else { eprintf ("Unterminated $() block\n"); } } /* quoted / raw command */ switch (*cmd) { case '.': if (cmd[1] == '"') { /* interpret */ r_list_free (tmpenvs); return r_cmd_call (core->rcmd, cmd); } break; case '"': for (; *cmd; ) { int pipefd = -1; ut64 oseek = UT64_MAX; char *line, *p; haveQuote = *cmd == '"'; if (haveQuote) { cmd++; p = *cmd ? find_eoq (cmd) : NULL; if (!p || !*p) { eprintf ("Missing \" in (%s).", cmd); r_list_free (tmpenvs); return false; } *p++ = 0; if (!*p) { eos = true; } } else { char *sc = strchr (cmd, ';'); if (sc) { *sc = 0; } r_core_cmd0 (core, cmd); if (!sc) { break; } cmd = sc + 1; continue; } if (*p) { // workaround :D if (p[0] == '@') { p--; } while (p[1] == ';' || IS_WHITESPACE (p[1])) { p++; } if (p[1] == '@' || (p[1] && p[2] == '@')) { char *q = strchr (p + 1, '"'); if (q) { *q = 0; } haveQuote = q != NULL; oseek = core->offset; r_core_seek (core, r_num_math (core->num, p + 2), 1); if (q) { *p = '"'; p = q; } else { p = strchr (p + 1, ';'); } } if (p && *p && p[1] == '>') { str = p + 2; while (*str == '>') { str++; } str = (char *)r_str_trim_ro (str); r_cons_flush (); const bool append = p[2] == '>'; pipefd = r_cons_pipe_open (str, 1, append); } } line = strdup (cmd); line = r_str_replace (line, "\\\"", "\"", true); if (p && *p && p[1] == '|') { str = p + 2; while (IS_WHITESPACE (*str)) { str++; } r_core_cmd_pipe (core, cmd, str); } else { r_cmd_call (core->rcmd, line); } free (line); if (oseek != UT64_MAX) { r_core_seek (core, oseek, 1); } if (pipefd != -1) { r_cons_flush (); r_cons_pipe_close (pipefd); } if (!p) { break; } if (eos) { break; } if (haveQuote) { if (*p == ';') { cmd = p + 1; } else { if (*p == '"') { cmd = p + 1; } else { *p = '"'; cmd = p; } } } else { cmd = p + 1; } } r_list_free (tmpenvs); return true; case '(': if (cmd[1] != '*' && !strstr (cmd, ")()")) { r_list_free (tmpenvs); return r_cmd_call (core->rcmd, cmd); } break; case '?': if (cmd[1] == '>') { r_core_cmd_help (core, help_msg_greater_sign); r_list_free (tmpenvs); return true; } } // TODO must honor ` /* comments */ if (*cmd != '#') { ptr = (char *)r_str_firstbut (cmd, '#', "`\""); // TODO: use quotestr here if (ptr && (ptr[1] == ' ' || ptr[1] == '\t')) { *ptr = '\0'; } } /* multiple commands */ // TODO: must honor " and ` boundaries //ptr = strrchr (cmd, ';'); if (*cmd != '#') { ptr = (char *)r_str_lastbut (cmd, ';', quotestr); if (colon && ptr) { int ret ; *ptr = '\0'; if (r_core_cmd_subst (core, cmd) == -1) { r_list_free (tmpenvs); return -1; } cmd = ptr + 1; ret = r_core_cmd_subst (core, cmd); *ptr = ';'; r_list_free (tmpenvs); return ret; //r_cons_flush (); } } // TODO must honor " and ` /* pipe console to shell process */ //ptr = strchr (cmd, '|'); ptr = (char *)r_str_lastbut (cmd, '|', quotestr); if (ptr) { if (ptr > cmd) { char *ch = ptr - 1; if (*ch == '\\') { memmove (ch, ptr, strlen (ptr) + 1); goto escape_pipe; } } char *ptr2 = strchr (cmd, '`'); if (!ptr2 || (ptr2 && ptr2 > ptr)) { if (!tick || (tick && tick > ptr)) { *ptr = '\0'; cmd = r_str_trim_nc (cmd); if (!strcmp (ptr + 1, "?")) { // "|?" r_core_cmd_help (core, help_msg_vertical_bar); r_list_free (tmpenvs); return ret; } else if (!strncmp (ptr + 1, "H", 1)) { // "|H" scr_html = r_config_get_i (core->config, "scr.html"); r_config_set_i (core->config, "scr.html", true); } else if (!strcmp (ptr + 1, "T")) { // "|T" scr_color = r_config_get_i (core->config, "scr.color"); r_config_set_i (core->config, "scr.color", COLOR_MODE_DISABLED); core->cons->use_tts = true; } else if (!strcmp (ptr + 1, ".")) { // "|." ret = *cmd ? r_core_cmdf (core, ".%s", cmd) : 0; r_list_free (tmpenvs); return ret; } else if (ptr[1]) { // "| grep .." int value = core->num->value; if (*cmd) { r_core_cmd_pipe (core, cmd, ptr + 1); } else { char *res = r_io_system (core->io, ptr + 1); if (res) { r_cons_printf ("%s\n", res); free (res); } } core->num->value = value; r_list_free (tmpenvs); return 0; } else { // "|" scr_html = r_config_get_i (core->config, "scr.html"); r_config_set_i (core->config, "scr.html", 0); scr_color = r_config_get_i (core->config, "scr.color"); r_config_set_i (core->config, "scr.color", COLOR_MODE_DISABLED); } } } } escape_pipe: // TODO must honor " and ` /* bool conditions */ ptr = (char *)r_str_lastbut (cmd, '&', quotestr); //ptr = strchr (cmd, '&'); while (ptr && *ptr && ptr[1] == '&') { *ptr = '\0'; ret = r_cmd_call (core->rcmd, cmd); if (ret == -1) { eprintf ("command error(%s)\n", cmd); if (scr_html != -1) { r_config_set_i (core->config, "scr.html", scr_html); } if (scr_color != -1) { r_config_set_i (core->config, "scr.color", scr_color); } r_list_free (tmpenvs); return ret; } for (cmd = ptr + 2; cmd && *cmd == ' '; cmd++) { ; } ptr = strchr (cmd, '&'); } /* Out Of Band Input */ R_FREE (core->oobi); ptr = strstr (cmd, "?*"); if (ptr && (ptr == cmd || ptr[-1] != '~')) { ptr[0] = 0; if (*cmd != '#') { int detail = 0; if (cmd < ptr && ptr[-1] == '?') { detail++; if (cmd < ptr - 1 && ptr[-2] == '?') { detail++; } } r_cons_break_push (NULL, NULL); recursive_help (core, detail, cmd); r_cons_break_pop (); r_cons_grep_parsecmd (ptr + 2, "`"); if (scr_html != -1) { r_config_set_i (core->config, "scr.html", scr_html); } if (scr_color != -1) { r_config_set_i (core->config, "scr.color", scr_color); } r_list_free (tmpenvs); return 0; } } #if 0 ptr = strchr (cmd, '<'); if (ptr) { ptr[0] = '\0'; if (r_cons_singleton ()->is_interactive) { if (ptr[1] == '<') { /* this is a bit mess */ //const char *oprompt = strdup (r_line_singleton ()->prompt); //oprompt = ">"; for (str = ptr + 2; str[0] == ' '; str++) { //nothing to see here } eprintf ("==> Reading from stdin until '%s'\n", str); free (core->oobi); core->oobi = malloc (1); if (core->oobi) { core->oobi[0] = '\0'; } core->oobi_len = 0; for (;;) { char buf[1024]; int ret; write (1, "> ", 2); fgets (buf, sizeof (buf) - 1, stdin); // XXX use r_line ?? if (feof (stdin)) { break; } if (*buf) buf[strlen (buf) - 1]='\0'; ret = strlen (buf); core->oobi_len += ret; core->oobi = realloc (core->oobi, core->oobi_len + 1); if (core->oobi) { if (!strcmp (buf, str)) { break; } strcat ((char *)core->oobi, buf); } } //r_line_set_prompt (oprompt); } else { for (str = ptr + 1; *str == ' '; str++) { //nothing to see here } if (!*str) { goto next; } eprintf ("Slurping file '%s'\n", str); free (core->oobi); core->oobi = (ut8*)r_file_slurp (str, &core->oobi_len); if (!core->oobi) { eprintf ("cannot open file\n"); } else if (ptr == cmd) { return r_core_cmd_buffer (core, (const char *)core->oobi); } } } else { eprintf ("Cannot slurp with << in non-interactive mode\n"); r_list_free (tmpenvs); return 0; } } next: #endif /* pipe console to file */ ptr = (char *)r_str_firstbut (cmd, '>', "\""); // TODO honor ` if (ptr) { if (ptr > cmd) { char *ch = ptr - 1; if (*ch == '\\') { memmove (ch, ptr, strlen (ptr) + 1); goto escape_redir; } } if (ptr[0] && ptr[1] == '?') { r_core_cmd_help (core, help_msg_greater_sign); r_list_free (tmpenvs); return true; } int fdn = 1; int pipecolor = r_config_get_i (core->config, "scr.color.pipe"); int use_editor = false; int ocolor = r_config_get_i (core->config, "scr.color"); *ptr = '\0'; str = r_str_trim_head_tail (ptr + 1 + (ptr[1] == '>')); if (!*str) { eprintf ("No output?\n"); goto next2; } /* r_cons_flush() handles interactive output (to the terminal) * differently (e.g. asking about too long output). This conflicts * with piping to a file. Disable it while piping. */ if (ptr > (cmd + 1) && IS_WHITECHAR (ptr[-2])) { char *fdnum = ptr - 1; if (*fdnum == 'H') { // "H>" scr_html = r_config_get_i (core->config, "scr.html"); r_config_set_i (core->config, "scr.html", true); pipecolor = true; *fdnum = 0; } else { if (IS_DIGIT (*fdnum)) { fdn = *fdnum - '0'; } *fdnum = 0; } } r_cons_set_interactive (false); if (!strcmp (str, "-")) { use_editor = true; str = r_file_temp ("dumpedit"); r_config_set_i (core->config, "scr.color", COLOR_MODE_DISABLED); } const bool appendResult = (ptr[1] == '>'); if (*str == '$') { // pipe to alias variable // register output of command as an alias char *o = r_core_cmd_str (core, cmd); if (appendResult) { char *oldText = r_cmd_alias_get (core->rcmd, str, 1); if (oldText) { char *two = r_str_newf ("%s%s", oldText, o); if (two) { r_cmd_alias_set (core->rcmd, str, two, 1); free (two); } } else { char *n = r_str_newf ("$%s", o); r_cmd_alias_set (core->rcmd, str, n, 1); free (n); } } else { char *n = r_str_newf ("$%s", o); r_cmd_alias_set (core->rcmd, str, n, 1); free (n); } ret = 0; free (o); } else if (fdn > 0) { // pipe to file (or append) pipefd = r_cons_pipe_open (str, fdn, appendResult); if (pipefd != -1) { if (!pipecolor) { r_config_set_i (core->config, "scr.color", COLOR_MODE_DISABLED); } ret = r_core_cmd_subst (core, cmd); r_cons_flush (); r_cons_pipe_close (pipefd); } } r_cons_set_last_interactive (); if (!pipecolor) { r_config_set_i (core->config, "scr.color", ocolor); } if (use_editor) { const char *editor = r_config_get (core->config, "cfg.editor"); if (editor && *editor) { r_sys_cmdf ("%s '%s'", editor, str); r_file_rm (str); } else { eprintf ("No cfg.editor configured\n"); } r_config_set_i (core->config, "scr.color", ocolor); free (str); } if (scr_html != -1) { r_config_set_i (core->config, "scr.html", scr_html); } if (scr_color != -1) { r_config_set_i (core->config, "scr.color", scr_color); } core->cons->use_tts = false; r_list_free (tmpenvs); return ret; } escape_redir: next2: /* sub commands */ ptr = strchr (cmd, '`'); if (ptr) { if (ptr > cmd) { char *ch = ptr - 1; if (*ch == '\\') { memmove (ch, ptr, strlen (ptr) + 1); goto escape_backtick; } } bool empty = false; int oneline = 1; if (ptr[1] == '`') { memmove (ptr, ptr + 1, strlen (ptr)); oneline = 0; empty = true; } ptr2 = strchr (ptr + 1, '`'); if (empty) { /* do nothing */ } else if (!ptr2) { eprintf ("parse: Missing backtick in expression.\n"); goto fail; } else { int value = core->num->value; *ptr = '\0'; *ptr2 = '\0'; if (ptr[1] == '!') { str = r_core_cmd_str_pipe (core, ptr + 1); } else { // Color disabled when doing backticks ?e `pi 1` int ocolor = r_config_get_i (core->config, "scr.color"); r_config_set_i (core->config, "scr.color", 0); core->cmd_in_backticks = true; str = r_core_cmd_str (core, ptr + 1); core->cmd_in_backticks = false; r_config_set_i (core->config, "scr.color", ocolor); } if (!str) { goto fail; } // ignore contents if first char is pipe or comment if (*str == '|' || *str == '*') { eprintf ("r_core_cmd_subst_i: invalid backticked command\n"); free (str); goto fail; } if (oneline && str) { for (i = 0; str[i]; i++) { if (str[i] == '\n') { str[i] = ' '; } } } str = r_str_append (str, ptr2 + 1); cmd = r_str_append (strdup (cmd), str); core->num->value = value; ret = r_core_cmd_subst (core, cmd); free (cmd); if (scr_html != -1) { r_config_set_i (core->config, "scr.html", scr_html); } free (str); r_list_free (tmpenvs); return ret; } } escape_backtick: // TODO must honor " and ` if (*cmd != '"' && *cmd) { const char *s = strstr (cmd, "~?"); if (s) { bool showHelp = false; if (cmd == s) { // ~? // ~?? showHelp = true; } else { // pd~? // pd~?? if (!strcmp (s, "~??")) { showHelp = true; } } if (showHelp) { r_cons_grep_help (); r_list_free (tmpenvs); return true; } } } if (*cmd != '.') { grep = r_cons_grep_strip (cmd, quotestr); } /* temporary seek commands */ // if (*cmd != '(' && *cmd != '"') { if (*cmd != '"') { ptr = strchr (cmd, '@'); if (ptr == cmd + 1 && *cmd == '?') { ptr = NULL; } } else { ptr = NULL; } cmd_tmpseek = core->tmpseek = ptr ? true: false; int rc = 0; if (ptr) { char *f, *ptr2 = strchr (ptr + 1, '!'); ut64 addr = core->offset; bool addr_is_set = false; char *tmpbits = NULL; const char *offstr = NULL; bool is_bits_set = false; bool is_arch_set = false; char *tmpeval = NULL; char *tmpasm = NULL; bool flgspc_changed = false; int tmpfd = -1; int sz, len; ut8 *buf; *ptr++ = '\0'; repeat_arroba: arroba = (ptr[0] && ptr[1] && ptr[2])? strchr (ptr + 2, '@'): NULL; if (arroba) { *arroba = 0; } for (; *ptr == ' '; ptr++) { //nothing to see here } if (*ptr && ptr[1] == ':') { /* do nothing here */ } else { ptr--; } ptr = r_str_trim_tail (ptr); if (ptr[1] == '?') { r_core_cmd_help (core, help_msg_at); } else if (ptr[1] == '%') { // "@%" char *k = strdup (ptr + 2); char *v = strchr (k, '='); if (v) { *v++ = 0; r_sys_setenv (k, v); r_list_append (tmpenvs, k); } else { free (k); } } else if (ptr[1] == '.') { // "@." if (ptr[2] == '.') { // "@.." if (ptr[3] == '.') { // "@..." ut64 addr = r_num_tail (core->num, core->offset, ptr + 4); r_core_block_size (core, R_ABS ((st64)addr - (st64)core->offset)); goto fuji; } else { addr = r_num_tail (core->num, core->offset, ptr + 3); r_core_seek (core, addr, 1); cmd_tmpseek = core->tmpseek = true; goto fuji; } } else { // WAT DU eprintf ("TODO: what do you expect for @. import offset from file maybe?\n"); } } else if (ptr[0] && ptr[1] == ':' && ptr[2]) { switch (ptr[0]) { case 'F': // "@F:" // temporary flag space flgspc_changed = r_flag_space_push (core->flags, ptr + 2); break; case 'B': // "@B:#" // seek to the last instruction in current bb { int index = (int)r_num_math (core->num, ptr + 2); RAnalBlock *bb = r_anal_bb_from_offset (core->anal, core->offset); if (bb) { // handle negative indices if (index < 0) { index = bb->ninstr + index; } if (index >= 0 && index < bb->ninstr) { ut16 inst_off = r_anal_bb_offset_inst (bb, index); r_core_seek (core, bb->addr + inst_off, 1); cmd_tmpseek = core->tmpseek = true; } else { eprintf ("The current basic block has %d instructions\n", bb->ninstr); } } else { eprintf ("Can't find a basic block for 0x%08"PFMT64x"\n", core->offset); } break; } break; case 'f': // "@f:" // slurp file in block f = r_file_slurp (ptr + 2, &sz); if (f) { { RBuffer *b = r_buf_new_with_bytes ((const ut8*)f, sz); RIODesc *d = r_io_open_buffer (core->io, b, R_PERM_RWX, 0); if (d) { if (tmpdesc) { r_io_desc_close (tmpdesc); } tmpdesc = d; if (pamode) { r_config_set_i (core->config, "io.va", 1); } r_io_map_new (core->io, d->fd, d->perm, 0, core->offset, r_buf_size (b)); } } #if 0 buf = malloc (sz); if (buf) { free (core->block); core->block = buf; core->blocksize = sz; memcpy (core->block, f, sz); usemyblock = true; } else { eprintf ("cannot alloc %d", sz); } free (f); #endif } else { eprintf ("cannot open '%s'\n", ptr + 3); } break; case 'r': // "@r:" // regname if (ptr[1] == ':') { ut64 regval; char *mander = strdup (ptr + 2); char *sep = findSeparator (mander); if (sep) { char ch = *sep; *sep = 0; regval = r_debug_reg_get (core->dbg, mander); *sep = ch; char *numexpr = r_str_newf ("0x%"PFMT64x"%s", regval, sep); regval = r_num_math (core->num, numexpr); free (numexpr); } else { regval = r_debug_reg_get (core->dbg, ptr + 2); } r_core_seek (core, regval, 1); cmd_tmpseek = core->tmpseek = true; free (mander); } break; case 'b': // "@b:" // bits is_bits_set = set_tmp_bits (core, r_num_math (core->num, ptr + 2), &tmpbits); cmd_ignbithints = r_config_get_i (core->config, "anal.ignbithints"); r_config_set_i (core->config, "anal.ignbithints", 1); break; case 'i': // "@i:" { ut64 addr = r_num_math (core->num, ptr + 2); if (addr) { r_core_cmdf (core, "so %s", ptr + 2); // r_core_seek (core, core->offset, 1); cmd_tmpseek = core->tmpseek = true; } } break; case 'e': // "@e:" { char *cmd = parse_tmp_evals (core, ptr + 2); if (!tmpeval) { tmpeval = cmd; } else { tmpeval = r_str_prepend (tmpeval, cmd); free (cmd); } } break; case 'x': // "@x:" // hexpairs if (ptr[1] == ':') { buf = malloc (strlen (ptr + 2) + 1); if (buf) { len = r_hex_str2bin (ptr + 2, buf); r_core_block_size (core, R_ABS (len)); if (len > 0) { RBuffer *b = r_buf_new_with_bytes (buf, len); RIODesc *d = r_io_open_buffer (core->io, b, R_PERM_RWX, 0); if (d) { if (tmpdesc) { r_io_desc_close (tmpdesc); } tmpdesc = d; if (pamode) { r_config_set_i (core->config, "io.va", 1); } r_io_map_new (core->io, d->fd, d->perm, 0, core->offset, r_buf_size (b)); r_core_block_size (core, len); r_core_block_read (core); } } else { eprintf ("Error: Invalid hexpairs for @x:\n"); } free (buf); } else { eprintf ("cannot allocate\n"); } } else { eprintf ("Invalid @x: syntax\n"); } break; case 'k': // "@k" { char *out = sdb_querys (core->sdb, NULL, 0, ptr + ((ptr[1])? 2: 1)); if (out) { r_core_seek (core, r_num_math (core->num, out), 1); free (out); usemyblock = true; } } break; case 'o': // "@o:3" if (ptr[1] == ':') { tmpfd = core->io->desc ? core->io->desc->fd : -1; r_io_use_fd (core->io, atoi (ptr + 2)); } break; case 'a': // "@a:" if (ptr[1] == ':') { char *q = strchr (ptr + 2, ':'); if (q) { *q++ = 0; int bits = r_num_math (core->num, q); is_bits_set = set_tmp_bits (core, bits, &tmpbits); } is_arch_set = set_tmp_arch (core, ptr + 2, &tmpasm); } else { eprintf ("Usage: pd 10 @a:arm:32\n"); } break; case 's': // "@s:" // wtf syntax { len = strlen (ptr + 2); r_core_block_size (core, len); const ut8 *buf = (const ut8*)r_str_trim_ro (ptr + 2); if (len > 0) { RBuffer *b = r_buf_new_with_bytes (buf, len); RIODesc *d = r_io_open_buffer (core->io, b, R_PERM_RWX, 0); if (!core->io->va) { r_config_set_i (core->config, "io.va", 1); } if (d) { if (tmpdesc) { r_io_desc_close (tmpdesc); } tmpdesc = d; if (pamode) { r_config_set_i (core->config, "io.va", 1); } r_io_map_new (core->io, d->fd, d->perm, 0, core->offset, r_buf_size (b)); r_core_block_size (core, len); // r_core_block_read (core); } } } break; default: goto ignore; } *ptr = '@'; /* trim whitespaces before the @ */ /* Fixes pd @x:9090 */ char *trim = ptr - 2; while (trim > cmd) { if (!IS_WHITESPACE (*trim)) { break; } *trim = 0; trim--; } goto next_arroba; } ignore: ptr = r_str_trim_head (ptr + 1) - 1; cmd = r_str_trim_nc (cmd); if (ptr2) { if (strlen (ptr + 1) == 13 && strlen (ptr2 + 1) == 6 && !memcmp (ptr + 1, "0x", 2) && !memcmp (ptr2 + 1, "0x", 2)) { /* 0xXXXX:0xYYYY */ } else if (strlen (ptr + 1) == 9 && strlen (ptr2 + 1) == 4) { /* XXXX:YYYY */ } else { *ptr2 = '\0'; if (!ptr2[1]) { goto fail; } r_core_block_size ( core, r_num_math (core->num, ptr2 + 1)); } } offstr = r_str_trim_head (ptr + 1); addr = r_num_math (core->num, offstr); addr_is_set = true; if (isalpha ((ut8)ptr[1]) && !addr) { if (!r_flag_get (core->flags, ptr + 1)) { eprintf ("Invalid address (%s)\n", ptr + 1); goto fail; } } else { char ch = *offstr; if (ch == '-' || ch == '+') { addr = core->offset + addr; } } // remap thhe tmpdesc if any if (addr) { RIODesc *d = tmpdesc; if (d) { r_io_map_new (core->io, d->fd, d->perm, 0, addr, r_io_desc_size (d)); } } next_arroba: if (arroba) { ptr = arroba + 1; *arroba = '@'; arroba = NULL; goto repeat_arroba; } core->fixedblock = !!tmpdesc; if (core->fixedblock) { r_core_block_read (core); } if (ptr[1] == '@') { if (ptr[2] == '@') { char *rule = ptr + 3; while (*rule && *rule == ' ') { rule++; } ret = r_core_cmd_foreach3 (core, cmd, rule); } else { ret = r_core_cmd_foreach (core, cmd, ptr + 2); } } else { bool tmpseek = false; const char *fromvars[] = { "anal.from", "diff.from", "graph.from", "io.buffer.from", "lines.from", "search.from", "zoom.from", NULL }; const char *tovars[] = { "anal.to", "diff.to", "graph.to", "io.buffer.to", "lines.to", "search.to", "zoom.to", NULL }; ut64 curfrom[R_ARRAY_SIZE (fromvars) - 1], curto[R_ARRAY_SIZE (tovars) - 1]; // "@(A B)" if (ptr[1] == '(') { char *range = ptr + 3; char *p = strchr (range, ' '); if (!p) { eprintf ("Usage: / ABCD @..0x1000 0x3000\n"); free (tmpeval); free (tmpasm); free (tmpbits); goto fail; } *p = '\x00'; ut64 from = r_num_math (core->num, range); ut64 to = r_num_math (core->num, p + 1); // save current ranges for (i = 0; fromvars[i]; i++) { curfrom[i] = r_config_get_i (core->config, fromvars[i]); } for (i = 0; tovars[i]; i++) { curto[i] = r_config_get_i (core->config, tovars[i]); } // set new ranges for (i = 0; fromvars[i]; i++) { r_config_set_i (core->config, fromvars[i], from); } for (i = 0; tovars[i]; i++) { r_config_set_i (core->config, tovars[i], to); } tmpseek = true; } if (usemyblock) { if (addr_is_set) { core->offset = addr; } ret = r_cmd_call (core->rcmd, r_str_trim_head (cmd)); } else { if (addr_is_set) { if (ptr[1]) { r_core_seek (core, addr, 1); r_core_block_read (core); } } ret = r_cmd_call (core->rcmd, r_str_trim_head (cmd)); } if (tmpseek) { // restore ranges for (i = 0; fromvars[i]; i++) { r_config_set_i (core->config, fromvars[i], curfrom[i]); } for (i = 0; tovars[i]; i++) { r_config_set_i (core->config, tovars[i], curto[i]); } } } if (ptr2) { *ptr2 = '!'; r_core_block_size (core, tmpbsz); } if (is_arch_set) { core->fixedarch = oldfixedarch; r_config_set (core->config, "asm.arch", tmpasm); R_FREE (tmpasm); } if (tmpfd != -1) { // TODO: reuse tmpfd instead of r_io_use_fd (core->io, tmpfd); } if (tmpdesc) { if (pamode) { r_config_set_i (core->config, "io.va", 0); } r_io_desc_close (tmpdesc); tmpdesc = NULL; } if (is_bits_set) { r_config_set (core->config, "asm.bits", tmpbits); core->fixedbits = oldfixedbits; } if (tmpbsz != core->blocksize) { r_core_block_size (core, tmpbsz); } if (tmpeval) { r_core_cmd0 (core, tmpeval); R_FREE (tmpeval); } if (flgspc_changed) { r_flag_space_pop (core->flags); } *ptr = '@'; rc = ret; goto beach; } fuji: rc = cmd? r_cmd_call (core->rcmd, r_str_trim_head (cmd)): false; beach: r_cons_grep_process (grep); if (scr_html != -1) { r_cons_flush (); r_config_set_i (core->config, "scr.html", scr_html); } if (scr_color != -1) { r_config_set_i (core->config, "scr.color", scr_color); } r_list_free (tmpenvs); if (tmpdesc) { r_io_desc_close (tmpdesc); tmpdesc = NULL; } core->fixedarch = oldfixedarch; core->fixedbits = oldfixedbits; if (tmpseek) { *tmpseek = cmd_tmpseek; } if (cmd_ignbithints != -1) { r_config_set_i (core->config, "anal.ignbithints", cmd_ignbithints); } return rc; fail: rc = -1; goto beach; }
6240
True
1
CVE-2020-27793
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
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': 'https://github.com/radareorg/radare2/commit/ced0223c7a1b3b5344af315715cd28fe7c0d9ebc', 'name': 'https://github.com/radareorg/radare2/commit/ced0223c7a1b3b5344af315715cd28fe7c0d9ebc', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/issues/16304', 'name': 'https://github.com/radareorg/radare2/issues/16304', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-193'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.4.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An off-by-one overflow flaw was found in radare2 due to mismatched array length in core_java.c. This could allow an attacker to cause a crash, and perform a denail of service attack.'}]
2022-08-22T19:45Z
2022-08-19T23:15Z
Off-by-one Error
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
https://cwe.mitre.org/data/definitions/193.html
0
philoinovsky
2020-03-26 19:02:43+08:00
Fix unmatched array length in core_java.c (issue #16304) (#16313)
ced0223c7a1b3b5344af315715cd28fe7c0d9ebc
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_cmd_java_call
r_cmd_java_call( void * user , const char * input)
['user', 'input']
static int r_cmd_java_call(void *user, const char *input) { RCore *core = (RCore *) user; int res = false; ut32 i = 0; if (strncmp (input, "java", 4)) { return false; } if (input[4] != ' ') { return r_cmd_java_handle_help (core, input); } for (; i < END_CMDS; i++) { //IFDBG r_cons_printf ("Checking cmd: %s %d %s\n", JAVA_CMDS[i].name, JAVA_CMDS[i].name_len, p); IFDBG r_cons_printf ("Checking cmd: %s %d\n", JAVA_CMDS[i].name, strncmp (input+5, JAVA_CMDS[i].name, JAVA_CMDS[i].name_len)); if (!strncmp (input + 5, JAVA_CMDS[i].name, JAVA_CMDS[i].name_len)) { const char *cmd = input + 5 + JAVA_CMDS[i].name_len; if (*cmd && *cmd == ' ') { cmd++; } //IFDBG r_cons_printf ("Executing cmd: %s (%s)\n", JAVA_CMDS[i].name, cmd+5+JAVA_CMDS[i].name_len ); res = JAVA_CMDS[i].handler (core, cmd); break; } } if (!res) { return r_cmd_java_handle_help (core, input); } return true; }
205
True
1
CVE-2020-27794
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
HIGH
9.1
CRITICAL
3.9
5.2
nan
[{'url': 'https://github.com/radareorg/radare2/issues/16303', 'name': 'https://github.com/radareorg/radare2/issues/16303', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/cb8b683758edddae2d2f62e8e63a738c39f92683', 'name': 'https://github.com/radareorg/radare2/commit/cb8b683758edddae2d2f62e8e63a738c39f92683', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-415'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.4.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'A double free issue was discovered in radare2 in cmd_info.c:cmd_info(). Successful exploitation could lead to modification of unexpected memory locations and potentially causing a crash.'}]
2022-08-22T13:47Z
2022-08-19T23:15Z
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
aar0nge
2020-03-26 19:28:50+08:00
Fix #16303 - c->table_query double free (#16318)
cb8b683758edddae2d2f62e8e63a738c39f92683
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_core_fini
r_core_fini( RCore * c)
['c']
R_API void r_core_fini(RCore *c) { if (!c) { return; } r_core_task_break_all (&c->tasks); r_core_task_join (&c->tasks, NULL, -1); r_core_wait (c); /* TODO: it leaks as shit */ //update_sdb (c); // avoid double free r_list_free (c->ropchain); r_event_free (c->ev); free (c->cmdlog); free (c->lastsearch); R_FREE (c->cons->pager); free (c->cmdqueue); free (c->lastcmd); free (c->stkcmd); r_list_free (c->visual.tabs); free (c->block); r_core_autocomplete_free (c->autocomplete); r_list_free (c->gadgets); r_list_free (c->undos); r_num_free (c->num); // TODO: sync or not? sdb_sync (c->sdb); // TODO: sync all dbs? //r_core_file_free (c->file); //c->file = NULL; free (c->table_query); r_list_free (c->files); r_list_free (c->watchers); r_list_free (c->scriptstack); r_core_task_scheduler_fini (&c->tasks); c->rcmd = r_cmd_free (c->rcmd); r_list_free (c->cmd_descriptors); c->anal = r_anal_free (c->anal); r_asm_free (c->assembler); c->assembler = NULL; c->print = r_print_free (c->print); c->bin = (r_bin_free (c->bin), NULL); c->lang = (r_lang_free (c->lang), NULL); c->dbg = (r_debug_free (c->dbg), NULL); r_io_free (c->io); r_config_free (c->config); /* after r_config_free, the value of I.teefile is trashed */ /* rconfig doesnt knows how to deinitialize vars, so we should probably need to add a r_config_free_payload callback */ r_cons_free (); r_cons_singleton ()->teefile = NULL; // HACK r_search_free (c->search); r_flag_free (c->flags); r_fs_free (c->fs); r_egg_free (c->egg); r_lib_free (c->lib); r_buf_free (c->yank_buf); r_agraph_free (c->graph); free (c->asmqjmps); sdb_free (c->sdb); r_core_log_free (c->log); r_parse_free (c->parser); free (c->times); }
389
True
1
CVE-2018-14017
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://github.com/radare/radare2/issues/10498', 'name': 'https://github.com/radare/radare2/issues/10498', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'name': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:2.7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The r_bin_java_annotation_new function in shlr/java/class.c in radare2 2.7.0 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted .class file because of missing input validation in r_bin_java_line_number_table_attr_new.'}]
2020-10-15T13:39Z
2018-07-12T20:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-06-27 13:56:59+02:00
Fix #10498 - Fix crash in fuzzed java files (#10511)
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_code_attr_new
r_bin_java_code_attr_new( ut8 * buffer , ut64 sz , ut64 buf_offset)
['buffer', 'sz', 'buf_offset']
R_API RBinJavaAttrInfo *r_bin_java_code_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { RBinJavaAttrInfo *attr = NULL, *_attr = NULL; ut32 k = 0, curpos; ut64 offset = 0; attr = r_bin_java_default_attr_new (buffer, sz, buf_offset); if (!attr) { return NULL; } if (sz < 16 || sz > buf_offset) {// sz > buf_offset) { free (attr); return NULL; } offset += 6; attr->type = R_BIN_JAVA_ATTR_TYPE_CODE_ATTR; attr->info.code_attr.max_stack = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.code_attr.max_locals = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.code_attr.code_length = R_BIN_JAVA_UINT (buffer, offset); offset += 4; // BUG: possible unsigned integer overflow here attr->info.code_attr.code_offset = buf_offset + offset; attr->info.code_attr.code = (ut8 *) malloc (attr->info.code_attr.code_length); if (attr->info.code_attr.code == NULL) { eprintf ("Handling Code Attributes: Unable to allocate memory " "(%u bytes) for a code.\n", attr->info.code_attr.code_length); return attr; } R_BIN_JAVA_GLOBAL_BIN->current_code_attr = attr; { int len = attr->info.code_attr.code_length; memset (attr->info.code_attr.code, 0, len); if (offset + len >= sz) { len = sz; return attr; } memcpy (attr->info.code_attr.code, buffer + offset, len); offset += len; } attr->info.code_attr.exception_table_length = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.code_attr.exception_table = r_list_newf (free); for (k = 0; k < attr->info.code_attr.exception_table_length; k++) { curpos = buf_offset + offset; if (curpos + 8 > sz) { return attr; } RBinJavaExceptionEntry *e = R_NEW0 (RBinJavaExceptionEntry); if (!e) { free (attr); return NULL; } e->file_offset = curpos; e->start_pc = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; e->end_pc = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; e->handler_pc = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; e->catch_type = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; r_list_append (attr->info.code_attr.exception_table, e); e->size = 8; } attr->info.code_attr.attributes_count = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; // IFDBG eprintf (" code Attributes_count: %d\n", attr->info.code_attr.attributes_count); // XXX - attr->info.code_attr.attributes is not freed because one of the code attributes is improperly parsed. attr->info.code_attr.attributes = r_list_newf (r_bin_java_attribute_free); if (attr->info.code_attr.attributes_count > 0) { for (k = 0; k < attr->info.code_attr.attributes_count; k++) { int size = (offset < sz) ? sz - offset : 0; if (size > sz || size <= 0) { break; } _attr = r_bin_java_read_next_attr_from_buffer (buffer + offset, size, buf_offset + offset); if (!_attr) { eprintf ("[X] r_bin_java_code_attr_new: Error unable to parse remainder of classfile after Method's Code Attribute: %d.\n", k); break; } IFDBG eprintf("Parsing @ 0x%"PFMT64x " (%s) = 0x%"PFMT64x " bytes, %p\n", _attr->file_offset, _attr->name, _attr->size, _attr); offset += _attr->size; r_list_append (attr->info.code_attr.attributes, _attr); if (_attr->type == R_BIN_JAVA_ATTR_TYPE_LOCAL_VARIABLE_TABLE_ATTR) { IFDBG eprintf("Parsed the LocalVariableTable, preparing the implicit mthod frame.\n"); // r_bin_java_print_attr_summary(_attr); attr->info.code_attr.implicit_frame = r_bin_java_build_stack_frame_from_local_variable_table (R_BIN_JAVA_GLOBAL_BIN, _attr); attr->info.code_attr.implicit_frame->file_offset = buf_offset; IFDBG r_bin_java_print_stack_map_frame_summary(attr->info.code_attr.implicit_frame); // r_list_append (attr->info.code_attr.attributes, attr->info.code_attr.implicit_frame); } // if (offset > sz) { // eprintf ("[X] r_bin_java: Error unable to parse remainder of classfile after Attribute: %d.\n", k); // break; // } } } if (attr->info.code_attr.implicit_frame == NULL) { // build a default implicit_frame attr->info.code_attr.implicit_frame = r_bin_java_default_stack_frame (); // r_list_append (attr->info.code_attr.attributes, attr->info.code_attr.implicit_frame); } attr->size = offset; return attr; }
724
True
1
CVE-2018-14017
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://github.com/radare/radare2/issues/10498', 'name': 'https://github.com/radare/radare2/issues/10498', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'name': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:2.7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The r_bin_java_annotation_new function in shlr/java/class.c in radare2 2.7.0 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted .class file because of missing input validation in r_bin_java_line_number_table_attr_new.'}]
2020-10-15T13:39Z
2018-07-12T20:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-06-27 13:56:59+02:00
Fix #10498 - Fix crash in fuzzed java files (#10511)
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_line_number_table_attr_new
r_bin_java_line_number_table_attr_new( ut8 * buffer , ut64 sz , ut64 buf_offset)
['buffer', 'sz', 'buf_offset']
R_API RBinJavaAttrInfo *r_bin_java_line_number_table_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { ut32 i = 0; ut64 curpos, offset = 0; RBinJavaLineNumberAttribute *lnattr; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, buf_offset); if (!attr) { return NULL; } offset += 6; attr->type = R_BIN_JAVA_ATTR_TYPE_LINE_NUMBER_TABLE_ATTR; attr->info.line_number_table_attr.line_number_table_length = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; attr->info.line_number_table_attr.line_number_table = r_list_newf (free); ut32 linenum_len = attr->info.line_number_table_attr.line_number_table_length; RList *linenum_list = attr->info.line_number_table_attr.line_number_table; if (linenum_len > sz) { free (attr); return NULL; } for (i = 0; i < linenum_len; i++) { curpos = buf_offset + offset; // printf ("%llx %llx \n", curpos, sz); // XXX if (curpos + 8 >= sz) break; lnattr = R_NEW0 (RBinJavaLineNumberAttribute); if (!lnattr) { break; } lnattr->start_pc = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; lnattr->line_number = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; lnattr->file_offset = curpos; lnattr->size = 4; r_list_append (linenum_list, lnattr); } attr->size = offset; return attr; }
229
True
1
CVE-2018-14017
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://github.com/radare/radare2/issues/10498', 'name': 'https://github.com/radare/radare2/issues/10498', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'name': 'https://github.com/radareorg/radare2/commit/e9ce0d64faf19fa4e9c260250fbdf25e3c11e152', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:2.7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The r_bin_java_annotation_new function in shlr/java/class.c in radare2 2.7.0 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted .class file because of missing input validation in r_bin_java_line_number_table_attr_new.'}]
2020-10-15T13:39Z
2018-07-12T20:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-06-27 13:56:59+02:00
Fix #10498 - Fix crash in fuzzed java files (#10511)
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_java_read_next_attr_from_buffer
r_bin_java_read_next_attr_from_buffer( ut8 * buffer , st64 sz , st64 buf_offset)
['buffer', 'sz', 'buf_offset']
R_API RBinJavaAttrInfo *r_bin_java_read_next_attr_from_buffer(ut8 *buffer, st64 sz, st64 buf_offset) { RBinJavaAttrInfo *attr = NULL; char *name = NULL; ut64 offset = 0; ut16 name_idx; st64 nsz; RBinJavaAttrMetas *type_info = NULL; if (!buffer || ((int) sz) < 4 || buf_offset < 0) { eprintf ("r_bin_Java_read_next_attr_from_buffer: invalid buffer size %d\n", (int) sz); return NULL; } name_idx = R_BIN_JAVA_USHORT (buffer, offset); offset += 2; nsz = R_BIN_JAVA_UINT (buffer, offset); offset += 4; name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, name_idx); if (!name) { name = strdup ("unknown"); } IFDBG eprintf("r_bin_java_read_next_attr: name_idx = %d is %s\n", name_idx, name); type_info = r_bin_java_get_attr_type_by_name (name); if (type_info) { IFDBG eprintf("Typeinfo: %s, was %s\n", type_info->name, name); // printf ("SZ %d %d %d\n", nsz, sz, buf_offset); if (nsz > sz) { free (name); return NULL; } if ((attr = type_info->allocs->new_obj (buffer, nsz, buf_offset))) { attr->metas->ord = (R_BIN_JAVA_GLOBAL_BIN->attr_idx++); } } else { eprintf ("r_bin_java_read_next_attr_from_buffer: Cannot find type_info for %s\n", name); } free (name); return attr; }
228
True
1
CVE-2018-14016
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://github.com/radare/radare2/issues/10464', 'name': 'https://github.com/radare/radare2/issues/10464', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/eb7deb281df54771fb8ecf5890dc325a7d22d3e2', 'name': 'https://github.com/radareorg/radare2/commit/eb7deb281df54771fb8ecf5890dc325a7d22d3e2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:2.7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The r_bin_mdmp_init_directory_entry function in mdmp.c in radare2 2.7.0 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted Mini Crash Dump file.'}]
2020-10-15T13:38Z
2018-07-12T20:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-07-09 13:55:45+02:00
Fix #10464 - oobread crash in mdmp (#10683)
eb7deb281df54771fb8ecf5890dc325a7d22d3e2
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_mdmp_init_directory
r_bin_mdmp_init_directory( struct r_bin_mdmp_obj * obj)
['obj']
static bool r_bin_mdmp_init_directory(struct r_bin_mdmp_obj *obj) { int i; ut8 *directory_base; struct minidump_directory *entry; directory_base = obj->b->buf + obj->hdr->stream_directory_rva; sdb_num_set (obj->kv, "mdmp_directory.offset", obj->hdr->stream_directory_rva, 0); sdb_set (obj->kv, "mdmp_directory.format", "[4]E? " "(mdmp_stream_type)StreamType " "(mdmp_location_descriptor)Location", 0); /* Parse each entry in the directory */ for (i = 0; i < (int)obj->hdr->number_of_streams; i++) { entry = (struct minidump_directory *)(directory_base + (i * sizeof (struct minidump_directory))); r_bin_mdmp_init_directory_entry (obj, entry); } return true; }
120
True
1
CVE-2018-14016
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://github.com/radare/radare2/issues/10464', 'name': 'https://github.com/radare/radare2/issues/10464', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/radareorg/radare2/commit/eb7deb281df54771fb8ecf5890dc325a7d22d3e2', 'name': 'https://github.com/radareorg/radare2/commit/eb7deb281df54771fb8ecf5890dc325a7d22d3e2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:radare:radare2:2.7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The r_bin_mdmp_init_directory_entry function in mdmp.c in radare2 2.7.0 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted Mini Crash Dump file.'}]
2020-10-15T13:38Z
2018-07-12T20:29Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
radare
2018-07-09 13:55:45+02:00
Fix #10464 - oobread crash in mdmp (#10683)
eb7deb281df54771fb8ecf5890dc325a7d22d3e2
False
radareorg/radare2
UNIX-like reverse engineering framework and command-line toolset
2012-07-03 07:42:26
2022-08-24 23:09:24
https://www.radare.org/
radareorg
16739.0
2722.0
r_bin_mdmp_init_directory_entry
r_bin_mdmp_init_directory_entry( struct r_bin_mdmp_obj * obj , struct minidump_directory * entry)
['obj', 'entry']
static bool r_bin_mdmp_init_directory_entry(struct r_bin_mdmp_obj *obj, struct minidump_directory *entry) { int i; struct minidump_handle_operation_list *handle_operation_list; struct minidump_memory_list *memory_list; struct minidump_memory64_list *memory64_list; struct minidump_memory_info_list *memory_info_list; struct minidump_module_list *module_list; struct minidump_thread_list *thread_list; struct minidump_thread_ex_list *thread_ex_list; struct minidump_thread_info_list *thread_info_list; struct minidump_unloaded_module_list *unloaded_module_list; struct avrf_handle_operation *handle_operations; struct minidump_memory_descriptor *memories; struct minidump_memory_descriptor64 *memories64; struct minidump_memory_info *memory_infos; struct minidump_module *modules; struct minidump_thread *threads; struct minidump_thread_ex *ex_threads; struct minidump_thread_info *thread_infos; struct minidump_unloaded_module *unloaded_modules; /* We could confirm data sizes but a malcious MDMP will always get around ** this! But we can ensure that the data is not outside of the file */ if (entry->location.rva + entry->location.data_size > obj->b->length) { eprintf("[ERROR] Size Mismatch - Stream data is larger than file size!\n"); return false; } switch (entry->stream_type) { case THREAD_LIST_STREAM: thread_list = (struct minidump_thread_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_thread.format", "ddddq?? " "ThreadId SuspendCount PriorityClass Priority " "Teb (mdmp_memory_descriptor)Stack " "(mdmp_location_descriptor)ThreadContext", 0); sdb_num_set (obj->kv, "mdmp_thread_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_thread_list.format", sdb_fmt ("d[%i]? " "NumberOfThreads (mdmp_thread)Threads", thread_list->number_of_threads), 0); /* TODO: Not yet fully parsed or utilised */ for (i = 0; i < thread_list->number_of_threads; i++) { threads = (struct minidump_thread *)(&(thread_list->threads)); r_list_append (obj->streams.threads, &(threads[i])); } break; case MODULE_LIST_STREAM: module_list = (struct minidump_module_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_module.format", "qddtd???qq " "BaseOfImage SizeOfImage CheckSum " "TimeDateStamp ModuleNameRVA " "(mdmp_vs_fixedfileinfo)VersionInfo " "(mdmp_location_descriptor)CvRecord " "(mdmp_location_descriptor)MiscRecord " "Reserved0 Reserved1", 0); sdb_num_set (obj->kv, "mdmp_module_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_module_list.format", sdb_fmt ("d[%i]? " "NumberOfModule (mdmp_module)Modules", module_list->number_of_modules, 0), 0); for (i = 0; i < module_list->number_of_modules; i++) { modules = (struct minidump_module *)(&(module_list->modules)); r_list_append(obj->streams.modules, &(modules[i])); } break; case MEMORY_LIST_STREAM: memory_list = (struct minidump_memory_list *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_memory_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_memory_list.format", sdb_fmt ("d[%i]? " "NumberOfMemoryRanges " "(mdmp_memory_descriptor)MemoryRanges ", memory_list->number_of_memory_ranges, 0), 0); for (i = 0; i < memory_list->number_of_memory_ranges; i++) { memories = (struct minidump_memory_descriptor *)(&(memory_list->memory_ranges)); r_list_append (obj->streams.memories, &(memories[i])); } break; case EXCEPTION_STREAM: /* TODO: Not yet fully parsed or utilised */ obj->streams.exception = (struct minidump_exception_stream *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_exception.format", "[4]E[4]Eqqdd[15]q " "(mdmp_exception_code)ExceptionCode " "(mdmp_exception_flags)ExceptionFlags " "ExceptionRecord ExceptionAddress " "NumberParameters __UnusedAlignment " "ExceptionInformation", 0); sdb_num_set (obj->kv, "mdmp_exception_stream.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_exception_stream.format", "dd?? " "ThreadId __Alignment " "(mdmp_exception)ExceptionRecord " "(mdmp_location_descriptor)ThreadContext", 0); break; case SYSTEM_INFO_STREAM: obj->streams.system_info = (struct minidump_system_info *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_system_info.offset", entry->location.rva, 0); /* TODO: We need E as a byte! */ sdb_set (obj->kv, "mdmp_system_info.format", "[2]EwwbBddd[4]Ed[2]Ew[2]q " "(mdmp_processor_architecture)ProcessorArchitecture " "ProcessorLevel ProcessorRevision NumberOfProcessors " "(mdmp_product_type)ProductType " "MajorVersion MinorVersion BuildNumber (mdmp_platform_id)PlatformId " "CsdVersionRva (mdmp_suite_mask)SuiteMask Reserved2 ProcessorFeatures", 0); break; case THREAD_EX_LIST_STREAM: /* TODO: Not yet fully parsed or utilised */ thread_ex_list = (struct minidump_thread_ex_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_thread_ex.format", "ddddq??? " "ThreadId SuspendCount PriorityClass Priority " "Teb (mdmp_memory_descriptor)Stack " "(mdmp_location_descriptor)ThreadContext " "(mdmp_memory_descriptor)BackingStore", 0); sdb_num_set (obj->kv, "mdmp_thread_ex_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_thread_ex_list.format", sdb_fmt ("d[%i]? NumberOfThreads " "(mdmp_thread_ex)Threads", thread_ex_list->number_of_threads, 0), 0); for (i = 0; i < thread_ex_list->number_of_threads; i++) { ex_threads = (struct minidump_thread_ex *)(&(thread_ex_list->threads)); r_list_append (obj->streams.ex_threads, &(ex_threads[i])); } break; case MEMORY_64_LIST_STREAM: memory64_list = (struct minidump_memory64_list *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_memory64_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_memory64_list.format", sdb_fmt ("qq[%i]? NumberOfMemoryRanges " "BaseRva " "(mdmp_memory_descriptor64)MemoryRanges", memory64_list->number_of_memory_ranges), 0); obj->streams.memories64.base_rva = memory64_list->base_rva; for (i = 0; i < memory64_list->number_of_memory_ranges; i++) { memories64 = (struct minidump_memory_descriptor64 *)(&(memory64_list->memory_ranges)); r_list_append (obj->streams.memories64.memories, &(memories64[i])); } break; case COMMENT_STREAM_A: /* TODO: Not yet fully parsed or utilised */ obj->streams.comments_a = obj->b->buf + entry->location.rva; sdb_num_set (obj->kv, "mdmp_comment_stream_a.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_comment_stream_a.format", "s CommentA", 0); break; case COMMENT_STREAM_W: /* TODO: Not yet fully parsed or utilised */ obj->streams.comments_w = obj->b->buf + entry->location.rva; sdb_num_set (obj->kv, "mdmp_comment_stream_w.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_comment_stream_w.format", "s CommentW", 0); break; case HANDLE_DATA_STREAM: /* TODO: Not yet fully parsed or utilised */ obj->streams.handle_data = (struct minidump_handle_data_stream *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_handle_data_stream.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_handle_data_stream.format", "dddd " "SizeOfHeader SizeOfDescriptor " "NumberOfDescriptors Reserved", 0); break; case FUNCTION_TABLE_STREAM: /* TODO: Not yet fully parsed or utilised */ obj->streams.function_table = (struct minidump_function_table_stream *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_function_table_stream.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_function_table_stream.format", "dddddd " "SizeOfHeader SizeOfDescriptor SizeOfNativeDescriptor " "SizeOfFunctionEntry NumberOfDescriptors SizeOfAlignPad", 0); break; case UNLOADED_MODULE_LIST_STREAM: /* TODO: Not yet fully parsed or utilised */ unloaded_module_list = (struct minidump_unloaded_module_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_unloaded_module.format", "qddtd " "BaseOfImage SizeOfImage CheckSum TimeDateStamp " "ModuleNameRva", 0); sdb_num_set (obj->kv, "mdmp_unloaded_module_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_unloaded_module_list.format", "ddd " "SizeOfHeader SizeOfEntry NumberOfEntries", 0); for (i = 0; i < unloaded_module_list->number_of_entries; i++) { unloaded_modules = (struct minidump_unloaded_module *)((ut8 *)&unloaded_module_list + sizeof (struct minidump_unloaded_module_list)); r_list_append (obj->streams.unloaded_modules, &(unloaded_modules[i])); } break; case MISC_INFO_STREAM: /* TODO: Not yet fully parsed or utilised */ obj->streams.misc_info.misc_info_1 = (struct minidump_misc_info *)(obj->b->buf + entry->location.rva); /* TODO: Handle different sizes */ sdb_num_set (obj->kv, "mdmp_misc_info.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_misc_info.format", "d[4]Bdtttddddd " "SizeOfInfo (mdmp_misc1_flags)Flags1 ProcessId " "ProcessCreateTime ProcessUserTime ProcessKernelTime " "ProcessorMaxMhz ProcessorCurrentMhz " "ProcessorMhzLimit ProcessorMaxIdleState " "ProcessorCurrentIdleState", 0); break; case MEMORY_INFO_LIST_STREAM: memory_info_list = (struct minidump_memory_info_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_memory_info.format", "qq[4]Edq[4]E[4]E[4]Ed BaseAddress AllocationBase " "(mdmp_page_protect)AllocationProtect __Alignment1 RegionSize " "(mdmp_mem_state)State (mdmp_page_protect)Protect " "(mdmp_mem_type)Type __Alignment2", 0); sdb_num_set (obj->kv, "mdmp_memory_info_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_memory_info_list.format", sdb_fmt ("ddq[%i]? SizeOfHeader SizeOfEntry " "NumberOfEntries (mdmp_memory_info)MemoryInfo", memory_info_list->number_of_entries), 0); for (i = 0; i < memory_info_list->number_of_entries; i++) { memory_infos = (struct minidump_memory_info *)((ut8 *)memory_info_list + sizeof (struct minidump_memory_info_list)); r_list_append (obj->streams.memory_infos, &(memory_infos[i])); } break; case THREAD_INFO_LIST_STREAM: /* TODO: Not yet fully parsed or utilised */ thread_info_list = (struct minidump_thread_info_list *)(obj->b->buf + entry->location.rva); sdb_set (obj->kv, "mdmp_thread_info.format", "ddddttttqq " "ThreadId DumpFlags DumpError ExitStatus CreateTime " "ExitTime KernelTime UserTime StartAddress Affinity", 0); sdb_num_set (obj->kv, "mdmp_thread_info_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_thread_info_list.format", "ddd " "SizeOfHeader SizeOfEntry NumberOfEntries", 0); for (i = 0; i < thread_info_list->number_of_entries; i++) { thread_infos = (struct minidump_thread_info *)((ut8 *)thread_info_list + sizeof (struct minidump_thread_info_list)); r_list_append (obj->streams.thread_infos, &(thread_infos[i])); } break; case HANDLE_OPERATION_LIST_STREAM: /* TODO: Not yet fully parsed or utilised */ handle_operation_list = (struct minidump_handle_operation_list *)(obj->b->buf + entry->location.rva); sdb_num_set (obj->kv, "mdmp_handle_operation_list.offset", entry->location.rva, 0); sdb_set (obj->kv, "mdmp_handle_operation_list.format", "dddd " "SizeOfHeader SizeOfEntry NumberOfEntries Reserved", 0); for (i = 0; i < handle_operation_list->number_of_entries; i++) { handle_operations = (struct avrf_handle_operation *)((ut8 *)handle_operation_list + sizeof (struct minidump_handle_operation_list)); r_list_append (obj->streams.operations, &(handle_operations[i])); } break; case LAST_RESERVED_STREAM: /* TODO: Not yet fully parsed or utilised */ break; case UNUSED_STREAM: case RESERVED_STREAM_0: case RESERVED_STREAM_1: /* Silently ignore reserved streams */ break; default: eprintf ("[WARN] Invalid or unsupported enumeration encountered %i\n", entry->stream_type); return false; } return true; }
1767
True
1
CVE-2017-6429
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.1/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/appneta/tcpreplay/releases/tag/v4.2.0-beta1', 'name': 'https://github.com/appneta/tcpreplay/releases/tag/v4.2.0-beta1', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://github.com/appneta/tcpreplay/issues/278', 'name': 'https://github.com/appneta/tcpreplay/issues/278', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/appneta/tcpreplay/commit/d689d14dbcd768c028eab2fb378d849e543dcfe9', 'name': 'https://github.com/appneta/tcpreplay/commit/d689d14dbcd768c028eab2fb378d849e543dcfe9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96579', 'name': '96579', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/archive/1/540221/100/0/threaded', 'name': '20170306 CVE-2017-6429: Buffer overflow vulnerability in Tcpreplay tcpcapinfo utility', 'refsource': 'BUGTRAQ', 'tags': ['Third Party Advisory', 'VDB Entry']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:broadcom:tcpreplay:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Buffer overflow in the tcpcapinfo utility in Tcpreplay before 4.2.0 Beta 1 allows remote attackers to have unspecified impact via a pcap file with an over-size packet.'}]
2022-06-03T14:34Z
2017-03-15T15:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Fred Klassen
2017-02-26 20:45:59-08:00
#278 fail if capture has a packet that is too large (#286) * #278 fail if capture has a packet that is too large * Update CHANGELOG
d689d14dbcd768c028eab2fb378d849e543dcfe9
False
appneta/tcpreplay
Pcap editing and replay tools for *NIX and Windows - Users please download source from
2013-11-20 01:10:53
2022-08-26 22:10:17
http://tcpreplay.appneta.com/wiki/installation.html#downloads
appneta
912.0
240.0
main
main( int argc , char * argv [ ])
['argc']
main(int argc, char *argv[]) { int i, fd, swapped, pkthdrlen, ret, optct, backwards, caplentoobig; struct pcap_file_header pcap_fh; struct pcap_pkthdr pcap_ph; struct pcap_sf_patched_pkthdr pcap_patched_ph; /* Kuznetzov */ char buf[10000]; struct stat statinfo; uint64_t pktcnt; uint32_t readword; int32_t last_sec, last_usec, caplen; optct = optionProcess(&tcpcapinfoOptions, argc, argv); argc -= optct; argv += optct; #ifdef DEBUG if (HAVE_OPT(DBUG)) debug = OPT_VALUE_DBUG; #endif for (i = 0; i < argc; i++) { dbgx(1, "processing: %s\n", argv[i]); if ((fd = open(argv[i], O_RDONLY)) < 0) errx(-1, "Error opening file %s: %s", argv[i], strerror(errno)); if (fstat(fd, &statinfo) < 0) errx(-1, "Error getting file stat info %s: %s", argv[i], strerror(errno)); printf("file size = %"PRIu64" bytes\n", (uint64_t)statinfo.st_size); if ((ret = read(fd, &buf, sizeof(pcap_fh))) != sizeof(pcap_fh)) errx(-1, "File too small. Unable to read pcap_file_header from %s", argv[i]); dbgx(3, "Read %d bytes for file header", ret); swapped = 0; memcpy(&pcap_fh, &buf, sizeof(pcap_fh)); pkthdrlen = 16; /* pcap_pkthdr isn't the actual on-disk format for 64bit systems! */ switch (pcap_fh.magic) { case TCPDUMP_MAGIC: printf("magic = 0x%08"PRIx32" (tcpdump) (%s)\n", pcap_fh.magic, is_not_swapped); break; case SWAPLONG(TCPDUMP_MAGIC): printf("magic = 0x%08"PRIx32" (tcpdump/swapped) (%s)\n", pcap_fh.magic, is_swapped); swapped = 1; break; case KUZNETZOV_TCPDUMP_MAGIC: pkthdrlen = sizeof(pcap_patched_ph); printf("magic = 0x%08"PRIx32" (Kuznetzov) (%s)\n", pcap_fh.magic, is_not_swapped); break; case SWAPLONG(KUZNETZOV_TCPDUMP_MAGIC): pkthdrlen = sizeof(pcap_patched_ph); printf("magic = 0x%08"PRIx32" (Kuznetzov/swapped) (%s)\n", pcap_fh.magic, is_swapped); swapped = 1; break; case FMESQUITA_TCPDUMP_MAGIC: printf("magic = 0x%08"PRIx32" (Fmesquita) (%s)\n", pcap_fh.magic, is_not_swapped); break; case SWAPLONG(FMESQUITA_TCPDUMP_MAGIC): printf("magic = 0x%08"PRIx32" (Fmesquita) (%s)\n", pcap_fh.magic, is_swapped); swapped = 1; break; case NAVTEL_TCPDUMP_MAGIC: printf("magic = 0x%08"PRIx32" (Navtel) (%s)\n", pcap_fh.magic, is_not_swapped); break; case SWAPLONG(NAVTEL_TCPDUMP_MAGIC): printf("magic = 0x%08"PRIx32" (Navtel/swapped) (%s)\n", pcap_fh.magic, is_swapped); swapped = 1; break; case NSEC_TCPDUMP_MAGIC: printf("magic = 0x%08"PRIx32" (Nsec) (%s)\n", pcap_fh.magic, is_not_swapped); break; case SWAPLONG(NSEC_TCPDUMP_MAGIC): printf("magic = 0x%08"PRIx32" (Nsec/swapped) (%s)\n", pcap_fh.magic, is_swapped); swapped = 1; break; default: printf("magic = 0x%08"PRIx32" (unknown)\n", pcap_fh.magic); } if (swapped == 1) { pcap_fh.version_major = SWAPSHORT(pcap_fh.version_major); pcap_fh.version_minor = SWAPSHORT(pcap_fh.version_minor); pcap_fh.thiszone = SWAPLONG(pcap_fh.thiszone); pcap_fh.sigfigs = SWAPLONG(pcap_fh.sigfigs); pcap_fh.snaplen = SWAPLONG(pcap_fh.snaplen); pcap_fh.linktype = SWAPLONG(pcap_fh.linktype); } printf("version = %hu.%hu\n", pcap_fh.version_major, pcap_fh.version_minor); printf("thiszone = 0x%08"PRIx32"\n", pcap_fh.thiszone); printf("sigfigs = 0x%08"PRIx32"\n", pcap_fh.sigfigs); printf("snaplen = %"PRIu32"\n", pcap_fh.snaplen); printf("linktype = 0x%08"PRIx32"\n", pcap_fh.linktype); if (pcap_fh.version_major != 2 && pcap_fh.version_minor != 4) { printf("Sorry, we only support file format version 2.4\n"); close(fd); continue; } dbgx(5, "Packet header len: %d", pkthdrlen); if (pkthdrlen == 24) { printf("Packet\tOrigLen\t\tCaplen\t\tTimestamp\t\tIndex\tProto\tPktType\tPktCsum\tNote\n"); } else { printf("Packet\tOrigLen\t\tCaplen\t\tTimestamp\tCsum\tNote\n"); } pktcnt = 0; last_sec = 0; last_usec = 0; while ((ret = read(fd, &buf, pkthdrlen)) == pkthdrlen) { pktcnt ++; backwards = 0; caplentoobig = 0; dbgx(3, "Read %d bytes for packet %"PRIu64" header", ret, pktcnt); memset(&pcap_ph, 0, sizeof(pcap_ph)); /* see what packet header we're using */ if (pkthdrlen == sizeof(pcap_patched_ph)) { memcpy(&pcap_patched_ph, &buf, sizeof(pcap_patched_ph)); if (swapped == 1) { dbg(3, "Swapping packet header bytes..."); pcap_patched_ph.caplen = SWAPLONG(pcap_patched_ph.caplen); pcap_patched_ph.len = SWAPLONG(pcap_patched_ph.len); pcap_patched_ph.ts.tv_sec = SWAPLONG(pcap_patched_ph.ts.tv_sec); pcap_patched_ph.ts.tv_usec = SWAPLONG(pcap_patched_ph.ts.tv_usec); pcap_patched_ph.index = SWAPLONG(pcap_patched_ph.index); pcap_patched_ph.protocol = SWAPSHORT(pcap_patched_ph.protocol); } printf("%"PRIu64"\t%4"PRIu32"\t\t%4"PRIu32"\t\t%" PRIx32".%"PRIx32"\t\t%4"PRIu32"\t%4hu\t%4hhu", pktcnt, pcap_patched_ph.len, pcap_patched_ph.caplen, pcap_patched_ph.ts.tv_sec, pcap_patched_ph.ts.tv_usec, pcap_patched_ph.index, pcap_patched_ph.protocol, pcap_patched_ph.pkt_type); if (pcap_fh.snaplen < pcap_patched_ph.caplen) { caplentoobig = 1; } caplen = pcap_patched_ph.caplen; } else { /* manually map on-disk bytes to our memory structure */ memcpy(&readword, buf, 4); pcap_ph.ts.tv_sec = readword; memcpy(&readword, &buf[4], 4); pcap_ph.ts.tv_usec = readword; memcpy(&pcap_ph.caplen, &buf[8], 4); memcpy(&pcap_ph.len, &buf[12], 4); if (swapped == 1) { dbg(3, "Swapping packet header bytes..."); pcap_ph.caplen = SWAPLONG(pcap_ph.caplen); pcap_ph.len = SWAPLONG(pcap_ph.len); pcap_ph.ts.tv_sec = SWAPLONG(pcap_ph.ts.tv_sec); pcap_ph.ts.tv_usec = SWAPLONG(pcap_ph.ts.tv_usec); } printf("%"PRIu64"\t%4"PRIu32"\t\t%4"PRIu32"\t\t%" PRIx32".%"PRIx32, pktcnt, pcap_ph.len, pcap_ph.caplen, (unsigned int)pcap_ph.ts.tv_sec, (unsigned int)pcap_ph.ts.tv_usec); if (pcap_fh.snaplen < pcap_ph.caplen) { caplentoobig = 1; } caplen = pcap_ph.caplen; } /* check to make sure timestamps don't go backwards */ if (last_sec > 0 && last_usec > 0) { if ((pcap_ph.ts.tv_sec == last_sec) ? (pcap_ph.ts.tv_usec < last_usec) : (pcap_ph.ts.tv_sec < last_sec)) { backwards = 1; } } if (pkthdrlen == sizeof(pcap_patched_ph)) { last_sec = pcap_patched_ph.ts.tv_sec; last_usec = pcap_patched_ph.ts.tv_usec; } else { last_sec = pcap_ph.ts.tv_sec; last_usec = pcap_ph.ts.tv_usec; } /* read the frame */ if ((ret = read(fd, &buf, caplen)) != caplen) { if (ret < 0) { printf("Error reading file: %s: %s\n", argv[i], strerror(errno)); } else { printf("File truncated! Unable to jump to next packet.\n"); } close(fd); continue; } /* print the frame checksum */ printf("\t%x\t", do_checksum_math((u_int16_t *)buf, caplen)); /* print the Note */ if (! backwards && ! caplentoobig) { printf("OK\n"); } else if (backwards && ! caplentoobig) { printf("BAD_TS\n"); } else if (caplentoobig && ! backwards) { printf("TOOBIG\n"); } else if (backwards && caplentoobig) { printf("BAD_TS|TOOBIG"); } } } exit(0); }
1408
True
1
CVE-2017-6430
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/LocutusOfBorg/ettercap/commit/626dc56686f15f2dda13c48f78c2a666cb6d8506', 'name': 'https://github.com/LocutusOfBorg/ettercap/commit/626dc56686f15f2dda13c48f78c2a666cb6d8506', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/Ettercap/ettercap/issues/782', 'name': 'https://github.com/Ettercap/ettercap/issues/782', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96582', 'name': '96582', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1038057', 'name': '1038057', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3874', 'name': 'DSA-3874', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.securityfocus.com/archive/1/540223/100/0/threaded', 'name': '20170306 CVE-2017-6430: Out-of-Bounds Read (DOS) Vulnerability in Ettercap Etterfilter utility', 'refsource': 'BUGTRAQ', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ettercap-project:ettercap:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The compile_tree function in ef_compiler.c in the Etterfilter utility in Ettercap 0.8.2 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted filter.'}]
2020-02-26T13:35Z
2017-03-15T15:59Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Gianfranco Costamagna
2017-02-09 16:01:30+01:00
Exit gracefully in case of corrupted filters (Closes issue #782)
626dc56686f15f2dda13c48f78c2a666cb6d8506
False
LocutusOfBorg/ettercap
Ettercap Project
2013-03-27 08:23:41
2022-04-28 09:19:01
http://www.ettercap-project.org
LocutusOfBorg
3.0
1.0
compile_tree
compile_tree( struct filter_op ** fop)
['fop']
size_t compile_tree(struct filter_op **fop) { int i = 1; struct filter_op *array = NULL; struct unfold_elm *ue; BUG_IF(tree_root == NULL); fprintf(stdout, " Unfolding the meta-tree "); fflush(stdout); /* start the recursion on the tree */ unfold_blk(&tree_root); fprintf(stdout, " done.\n\n"); /* substitute the virtual labels with real offsets */ labels_to_offsets(); /* convert the tailq into an array */ TAILQ_FOREACH(ue, &unfolded_tree, next) { /* label == 0 means a real instruction */ if (ue->label == 0) { SAFE_REALLOC(array, i * sizeof(struct filter_op)); memcpy(&array[i - 1], &ue->fop, sizeof(struct filter_op)); i++; } } /* always append the exit function to a script */ SAFE_REALLOC(array, i * sizeof(struct filter_op)); array[i - 1].opcode = FOP_EXIT; /* return the pointer to the array */ *fop = array; return (i); }
155
True
1
CVE-2017-6430
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/LocutusOfBorg/ettercap/commit/626dc56686f15f2dda13c48f78c2a666cb6d8506', 'name': 'https://github.com/LocutusOfBorg/ettercap/commit/626dc56686f15f2dda13c48f78c2a666cb6d8506', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/Ettercap/ettercap/issues/782', 'name': 'https://github.com/Ettercap/ettercap/issues/782', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/96582', 'name': '96582', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1038057', 'name': '1038057', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3874', 'name': 'DSA-3874', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.securityfocus.com/archive/1/540223/100/0/threaded', 'name': '20170306 CVE-2017-6430: Out-of-Bounds Read (DOS) Vulnerability in Ettercap Etterfilter utility', 'refsource': 'BUGTRAQ', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ettercap-project:ettercap:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The compile_tree function in ef_compiler.c in the Etterfilter utility in Ettercap 0.8.2 and earlier allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted filter.'}]
2020-02-26T13:35Z
2017-03-15T15:59Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Gianfranco Costamagna
2017-02-09 16:01:30+01:00
Exit gracefully in case of corrupted filters (Closes issue #782)
626dc56686f15f2dda13c48f78c2a666cb6d8506
False
LocutusOfBorg/ettercap
Ettercap Project
2013-03-27 08:23:41
2022-04-28 09:19:01
http://www.ettercap-project.org
LocutusOfBorg
3.0
1.0
main
main( int argc , char * argv [ ])
['argc']
int main(int argc, char *argv[]) { libettercap_init(); ef_globals_alloc(); select_text_interface(); libettercap_ui_init(); /* etterfilter copyright */ fprintf(stdout, "\n" EC_COLOR_BOLD "%s %s" EC_COLOR_END " copyright %s %s\n\n", PROGRAM, EC_VERSION, EC_COPYRIGHT, EC_AUTHORS); /* initialize the line number */ EF_GBL->lineno = 1; /* getopt related parsing... */ parse_options(argc, argv); /* set the input for source file */ if (EF_GBL_OPTIONS->source_file) { yyin = fopen(EF_GBL_OPTIONS->source_file, "r"); if (yyin == NULL) FATAL_ERROR("Input file not found !"); } else { FATAL_ERROR("No source file."); } /* no buffering */ setbuf(yyin, NULL); setbuf(stdout, NULL); setbuf(stderr, NULL); /* load the tables in etterfilter.tbl */ load_tables(); /* load the constants in etterfilter.cnt */ load_constants(); /* print the message */ fprintf(stdout, "\n Parsing source file \'%s\' ", EF_GBL_OPTIONS->source_file); fflush(stdout); ef_debug(1, "\n"); /* begin the parsing */ if (yyparse() == 0) fprintf(stdout, " done.\n\n"); else fprintf(stdout, "\n\nThe script contains errors...\n\n"); /* write to file */ if (write_output() != E_SUCCESS) FATAL_ERROR("Cannot write output file (%s)", EF_GBL_OPTIONS->output_file); ef_globals_free(); return 0; }
198
True
1
CVE-2017-6504
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/f5ad04766f4abaa78374ff03704316f8ce04627d', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/f5ad04766f4abaa78374ff03704316f8ce04627d', 'refsource': 'CONFIRM', 'tags': ['Patch']}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not set the X-Frame-Options header, which could potentially lead to clickjacking.'}]
2017-03-07T12:39Z
2017-03-06T02: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
ngosang
2017-02-06 20:44:57+01:00
[WebUI] Avoid clickjacking attacks
f5ad04766f4abaa78374ff03704316f8ce04627d
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
AbstractWebApplication::processRequest
AbstractWebApplication::processRequest( const Http :: Request & request , const Http :: Environment & env)
['request', 'env']
Http::Response AbstractWebApplication::processRequest(const Http::Request &request, const Http::Environment &env) { session_ = 0; request_ = request; env_ = env; clear(); // clear response sessionInitialize(); if (!sessionActive() && !isAuthNeeded()) sessionStart(); if (isBanned()) { status(403, "Forbidden"); print(QObject::tr("Your IP address has been banned after too many failed authentication attempts."), Http::CONTENT_TYPE_TXT); } else { processRequest(); } return response(); }
97
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
Logger::addMessage
Logger::addMessage( const QString & message , const Log :: MsgType & type)
['message', 'type']
void Logger::addMessage(const QString &message, const Log::MsgType &type) { QWriteLocker locker(&lock); Log::Msg temp = { msgCounter++, QDateTime::currentMSecsSinceEpoch(), type, message }; m_messages.push_back(temp); if (m_messages.size() >= MAX_LOG_MESSAGES) m_messages.pop_front(); emit newLogMessage(temp); }
74
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
Logger::addPeer
Logger::addPeer( const QString & ip , bool blocked , const QString & reason)
['ip', 'blocked', 'reason']
void Logger::addPeer(const QString &ip, bool blocked, const QString &reason) { QWriteLocker locker(&lock); Log::Peer temp = { peerCounter++, QDateTime::currentMSecsSinceEpoch(), ip, blocked, reason }; m_peers.push_back(temp); if (m_peers.size() >= MAX_LOG_MESSAGES) m_peers.pop_front(); emit newLogPeer(temp); }
77
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
DeletionConfirmationDlg::DeletionConfirmationDlg
DeletionConfirmationDlg::DeletionConfirmationDlg( QWidget * parent , const int & size , const QString & name , bool defaultDeleteFiles)
['parent', 'size', 'name', 'defaultDeleteFiles']
DeletionConfirmationDlg(QWidget *parent, const int &size, const QString &name, bool defaultDeleteFiles): QDialog(parent) { setupUi(this); if (size == 1) label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from the transfer list?").arg(name)); else label->setText(tr("Are you sure you want to delete these %1 torrents from the transfer list?", "Are you sure you want to delete these 5 torrents from the transfer list?").arg(QString::number(size))); // Icons lbl_warn->setPixmap(GuiIconProvider::instance()->getIcon("dialog-warning").pixmap(lbl_warn->height())); lbl_warn->setFixedWidth(lbl_warn->height()); rememberBtn->setIcon(GuiIconProvider::instance()->getIcon("object-locked")); move(Utils::Misc::screenCenter(this)); checkPermDelete->setChecked(defaultDeleteFiles || Preferences::instance()->deleteTorrentFilesAsDefault()); connect(checkPermDelete, SIGNAL(clicked()), this, SLOT(updateRememberButtonState())); buttonBox->button(QDialogButtonBox::Cancel)->setFocus(); }
192
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
PeerListWidget::addPeer
PeerListWidget::addPeer( const QString & ip , BitTorrent :: TorrentHandle * const torrent , const BitTorrent :: PeerInfo & peer)
['ip', 'torrent', 'peer']
QStandardItem* PeerListWidget::addPeer(const QString& ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer) { int row = m_listModel->rowCount(); // Adding Peer to peer list m_listModel->insertRow(row); m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip); m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip, Qt::ToolTipRole); m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), peer.address().port); m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP_HIDDEN), ip); if (m_resolveCountries) { const QIcon ico = GuiIconProvider::instance()->getFlagIcon(peer.country()); if (!ico.isNull()) { m_listModel->setData(m_listModel->index(row, PeerListDelegate::COUNTRY), ico, Qt::DecorationRole); const QString countryName = Net::GeoIPManager::CountryName(peer.country()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::COUNTRY), countryName, Qt::ToolTipRole); } else { m_missingFlags.insert(ip); } } m_listModel->setData(m_listModel->index(row, PeerListDelegate::CONNECTION), peer.connectionType()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), peer.flags()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), peer.flagsDescription(), Qt::ToolTipRole); m_listModel->setData(m_listModel->index(row, PeerListDelegate::CLIENT), peer.client()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::PROGRESS), peer.progress()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWN_SPEED), peer.payloadDownSpeed()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::UP_SPEED), peer.payloadUpSpeed()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::TOT_DOWN), peer.totalDownload()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::TOT_UP), peer.totalUpload()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::RELEVANCE), peer.relevance()); QStringList downloadingFiles(torrent->info().filesForPiece(peer.downloadingPieceIndex())); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWNLOADING_PIECE), downloadingFiles.join(QLatin1String(";"))); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWNLOADING_PIECE), downloadingFiles.join(QLatin1String("\n")), Qt::ToolTipRole); return m_listModel->item(row, PeerListDelegate::IP); }
541
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
PeerListWidget::updatePeer
PeerListWidget::updatePeer( const QString & ip , BitTorrent :: TorrentHandle * const torrent , const BitTorrent :: PeerInfo & peer)
['ip', 'torrent', 'peer']
void PeerListWidget::updatePeer(const QString &ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer) { QStandardItem *item = m_peerItems.value(ip); int row = item->row(); if (m_resolveCountries) { const QIcon ico = GuiIconProvider::instance()->getFlagIcon(peer.country()); if (!ico.isNull()) { m_listModel->setData(m_listModel->index(row, PeerListDelegate::COUNTRY), ico, Qt::DecorationRole); const QString countryName = Net::GeoIPManager::CountryName(peer.country()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::COUNTRY), countryName, Qt::ToolTipRole); m_missingFlags.remove(ip); } } m_listModel->setData(m_listModel->index(row, PeerListDelegate::CONNECTION), peer.connectionType()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), peer.address().port); m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), peer.flags()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), peer.flagsDescription(), Qt::ToolTipRole); m_listModel->setData(m_listModel->index(row, PeerListDelegate::CLIENT), peer.client()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::PROGRESS), peer.progress()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWN_SPEED), peer.payloadDownSpeed()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::UP_SPEED), peer.payloadUpSpeed()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::TOT_DOWN), peer.totalDownload()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::TOT_UP), peer.totalUpload()); m_listModel->setData(m_listModel->index(row, PeerListDelegate::RELEVANCE), peer.relevance()); QStringList downloadingFiles(torrent->info().filesForPiece(peer.downloadingPieceIndex())); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWNLOADING_PIECE), downloadingFiles.join(QLatin1String(";"))); m_listModel->setData(m_listModel->index(row, PeerListDelegate::DOWNLOADING_PIECE), downloadingFiles.join(QLatin1String("\n")), Qt::ToolTipRole); }
472
True
1
CVE-2017-6503
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:P/A:N
NETWORK
MEDIUM
NONE
NONE
PARTIAL
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NETWORK
LOW
NONE
REQUIRED
CHANGED
LOW
LOW
NONE
6.1
MEDIUM
2.8
2.7
nan
[{'url': 'https://www.qbittorrent.org/news.php', 'name': 'https://www.qbittorrent.org/news.php', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Release Notes']}, {'url': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'name': 'https://github.com/qbittorrent/qBittorrent/commit/6ca3e4f094da0a0017cb2d483ec1db6176bb0b16', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/96758', 'name': '96758', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:qbittorrent:qbittorrent:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.3.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'WebUI in qBittorrent before 3.3.11 did not escape many values, which could potentially lead to XSS.'}]
2017-03-14T01:59Z
2017-03-06T02:59Z
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Cross-site scripting (XSS) vulnerabilities occur when: Untrusted data enters a web application, typically from a web request. The web application dynamically generates a web page that contains this untrusted data. During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc. A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data. Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain. This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain. There are three main kinds of XSS: Type 1: Reflected XSS (or Non-Persistent) - The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser. Type 2: Stored XSS (or Persistent) - The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs. Type 0: DOM-Based XSS - In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible. Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as "drive-by hacking." In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.
https://cwe.mitre.org/data/definitions/79.html
0
Chocobo1
2017-02-11 14:04:06+08:00
Add Utils::String::toHtmlEscaped
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
False
qbittorrent/qBittorrent
qBittorrent BitTorrent client
2012-02-04 09:37:46
2022-08-27 09:17:03
https://www.qbittorrent.org
qbittorrent
16919.0
2901.0
PropertiesWidget::loadTorrentInfos
PropertiesWidget::loadTorrentInfos( BitTorrent :: TorrentHandle * const torrent)
['torrent']
void PropertiesWidget::loadTorrentInfos(BitTorrent::TorrentHandle *const torrent) { clear(); m_torrent = torrent; downloaded_pieces->setTorrent(m_torrent); pieces_availability->setTorrent(m_torrent); if (!m_torrent) return; // Save path updateSavePath(m_torrent); // Hash hash_lbl->setText(m_torrent->hash()); PropListModel->model()->clear(); if (m_torrent->hasMetadata()) { // Creation date lbl_creationDate->setText(m_torrent->creationDate().toString(Qt::DefaultLocaleShortDate)); label_total_size_val->setText(Utils::Misc::friendlyUnit(m_torrent->totalSize())); // Comment comment_text->setText(Utils::Misc::parseHtmlLinks(m_torrent->comment())); // URL seeds loadUrlSeeds(); label_created_by_val->setText(m_torrent->creator()); // List files in torrent PropListModel->model()->setupModelData(m_torrent->info()); filesList->setExpanded(PropListModel->index(0, 0), true); // Load file priorities PropListModel->model()->updateFilesPriorities(m_torrent->filePriorities()); } // Load dynamic data loadDynamicData(); }
197
True
1
CVE-2017-6800
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
False
[{'url': 'https://github.com/Yeraze/ytnef/issues/28', 'name': 'https://github.com/Yeraze/ytnef/issues/28', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/Yeraze/ytnef/commit/f98f5d4adc1c4bd4033638f6167c1bb95d642f89', 'name': 'https://github.com/Yeraze/ytnef/commit/f98f5d4adc1c4bd4033638f6167c1bb95d642f89', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.debian.org/security/2017/dsa-3846', 'name': 'DSA-3846', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/LFJWMUEUC4ILH2HEOCYVVLQT654ZMCGQ/', 'name': 'FEDORA-2019-7d7083b8be', 'refsource': 'FEDORA', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ytnef_project:ytnef:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.9.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An issue was discovered in ytnef before 1.9.2. An invalid memory access (heap-based buffer over-read) can occur during handling of LONG data types, related to MAPIPrint() in libytnef.'}]
2019-05-18T03:29Z
2017-03-10T10:59Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Randall Hand
2017-02-23 14:26:49-05:00
BugFix - data length Even tho this is a "LONG" type, it's actually only 4 bytes. Typecasting it to a long* caused a dereference beyond the end of the allocated region. issues#28
f98f5d4adc1c4bd4033638f6167c1bb95d642f89
False
Yeraze/ytnef
Yeraze's TNEF Stream Reader - for winmail.dat files
2014-05-22 13:25:37
2022-04-27 18:34:21
null
Yeraze
27.0
17.0
MAPIPrint
MAPIPrint(MAPIProps*p)
[]
void MAPIPrint(MAPIProps *p) { int j, i, index, h, x; DDWORD *ddword_ptr; DDWORD ddword_tmp; dtr thedate; MAPIProperty *mapi; variableLength *mapidata; variableLength vlTemp; int found; for (j = 0; j < p->count; j++) { mapi = &(p->properties[j]); printf(" #%i: Type: [", j); switch (PROP_TYPE(mapi->id)) { case PT_UNSPECIFIED: printf(" NONE "); break; case PT_NULL: printf(" NULL "); break; case PT_I2: printf(" I2 "); break; case PT_LONG: printf(" LONG "); break; case PT_R4: printf(" R4 "); break; case PT_DOUBLE: printf(" DOUBLE "); break; case PT_CURRENCY: printf("CURRENCY "); break; case PT_APPTIME: printf("APP TIME "); break; case PT_ERROR: printf(" ERROR "); break; case PT_BOOLEAN: printf(" BOOLEAN "); break; case PT_OBJECT: printf(" OBJECT "); break; case PT_I8: printf(" I8 "); break; case PT_STRING8: printf(" STRING8 "); break; case PT_UNICODE: printf(" UNICODE "); break; case PT_SYSTIME: printf("SYS TIME "); break; case PT_CLSID: printf("OLE GUID "); break; case PT_BINARY: printf(" BINARY "); break; default: printf("<%x>", PROP_TYPE(mapi->id)); break; } printf("] Code: ["); if (mapi->custom == 1) { printf("UD:x%04x", PROP_ID(mapi->id)); } else { found = 0; for (index = 0; index < sizeof(MPList) / sizeof(MAPIPropertyTagList); index++) { if ((MPList[index].id == PROP_ID(mapi->id)) && (found == 0)) { printf("%s", MPList[index].name); found = 1; } } if (found == 0) { printf("0x%04x", PROP_ID(mapi->id)); } } printf("]\n"); if (mapi->namedproperty > 0) { for (i = 0; i < mapi->namedproperty; i++) { printf(" Name: %s\n", mapi->propnames[i].data); } } for (i = 0; i < mapi->count; i++) { mapidata = &(mapi->data[i]); if (mapi->count > 1) { printf(" [%i/%u] ", i, mapi->count); } else { printf(" "); } printf("Size: %i", mapidata->size); switch (PROP_TYPE(mapi->id)) { case PT_SYSTIME: MAPISysTimetoDTR(mapidata->data, &thedate); printf(" Value: "); ddword_tmp = *((DDWORD *)mapidata->data); TNEFPrintDate(thedate); printf(" [HEX: "); for (x = 0; x < sizeof(ddword_tmp); x++) { printf(" %02x", (BYTE)mapidata->data[x]); } printf("] (%llu)\n", ddword_tmp); break; case PT_LONG: printf(" Value: %li\n", *((long*)mapidata->data)); break; case PT_I2: printf(" Value: %hi\n", *((short int*)mapidata->data)); break; case PT_BOOLEAN: if (mapi->data->data[0] != 0) { printf(" Value: True\n"); } else { printf(" Value: False\n"); } break; case PT_OBJECT: printf("\n"); break; case PT_BINARY: if (IsCompressedRTF(mapidata) == 1) { printf(" Detected Compressed RTF. "); printf("Decompressed text follows\n"); printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"); if ((vlTemp.data = (BYTE*)DecompressRTF(mapidata, &(vlTemp.size))) != NULL) { printf("%s\n", vlTemp.data); free(vlTemp.data); } printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"); } else { printf(" Value: ["); for (h = 0; h < mapidata->size; h++) { if (isprint(mapidata->data[h])) { printf("%c", mapidata->data[h]); } else { printf("."); } } printf("]\n"); } break; case PT_STRING8: printf(" Value: [%s]\n", mapidata->data); if (strlen((char*)mapidata->data) != mapidata->size - 1) { printf("Detected Hidden data: ["); for (h = 0; h < mapidata->size; h++) { if (isprint(mapidata->data[h])) { printf("%c", mapidata->data[h]); } else { printf("."); } } printf("]\n"); } break; case PT_CLSID: printf(" Value: "); printf("[HEX: "); for(x=0; x< 16; x++) { printf(" %02x", (BYTE)mapidata->data[x]); } printf("]\n"); break; default: printf(" Value: [%s]\n", mapidata->data); } } } }
989
True
1
CVE-2017-6802
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
False
[{'url': 'https://github.com/Yeraze/ytnef/issues/34', 'name': 'https://github.com/Yeraze/ytnef/issues/34', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/Yeraze/ytnef/commit/22f8346c8d4f0020a40d9f258fdb3bfc097359cc', 'name': 'https://github.com/Yeraze/ytnef/commit/22f8346c8d4f0020a40d9f258fdb3bfc097359cc', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.debian.org/security/2017/dsa-3846', 'name': 'DSA-3846', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/LFJWMUEUC4ILH2HEOCYVVLQT654ZMCGQ/', 'name': 'FEDORA-2019-7d7083b8be', 'refsource': 'FEDORA', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ytnef_project:ytnef:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.9.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An issue was discovered in ytnef before 1.9.2. There is a potential heap-based buffer over-read on incoming Compressed RTF Streams, related to DecompressRTF() in libytnef.'}]
2019-05-18T03:29Z
2017-03-10T10:59Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Randall Hand
2017-02-25 07:41:45-05:00
Added safety check for Compressed RTF Streams You could potentially overflow the input pointer. in response to #34
22f8346c8d4f0020a40d9f258fdb3bfc097359cc
False
Yeraze/ytnef
Yeraze's TNEF Stream Reader - for winmail.dat files
2014-05-22 13:25:37
2022-04-27 18:34:21
null
Yeraze
27.0
17.0
DecompressRTF
DecompressRTF(variableLength*p,int*size)
[]
BYTE *DecompressRTF(variableLength *p, int *size) { BYTE *dst; // destination for uncompressed bytes BYTE *src; unsigned int in; unsigned int out; variableLength comp_Prebuf; ULONG compressedSize, uncompressedSize, magic; comp_Prebuf.size = strlen(RTF_PREBUF); comp_Prebuf.data = calloc(comp_Prebuf.size+1, 1); ALLOCCHECK_CHAR(comp_Prebuf.data); memcpy(comp_Prebuf.data, RTF_PREBUF, comp_Prebuf.size); src = p->data; in = 0; if (p->size < 20) { printf("File too small\n"); return(NULL); } compressedSize = (ULONG)SwapDWord((BYTE*)src + in, 4); in += 4; uncompressedSize = (ULONG)SwapDWord((BYTE*)src + in, 4); in += 4; magic = SwapDWord((BYTE*)src + in, 4); in += 4; in += 4; // check size excluding the size field itself if (compressedSize != p->size - 4) { printf(" Size Mismatch: %u != %i\n", compressedSize, p->size - 4); free(comp_Prebuf.data); return NULL; } // process the data if (magic == 0x414c454d) { // magic number that identifies the stream as a uncompressed stream dst = calloc(uncompressedSize, 1); ALLOCCHECK_CHAR(dst); memcpy(dst, src + 4, uncompressedSize); } else if (magic == 0x75465a4c) { // magic number that identifies the stream as a compressed stream int flagCount = 0; int flags = 0; // Prevent overflow on 32 Bit Systems if (comp_Prebuf.size >= INT_MAX - uncompressedSize) { printf("Corrupted file\n"); exit(-1); } dst = calloc(comp_Prebuf.size + uncompressedSize, 1); ALLOCCHECK_CHAR(dst); memcpy(dst, comp_Prebuf.data, comp_Prebuf.size); out = comp_Prebuf.size; while (out < (comp_Prebuf.size + uncompressedSize)) { // each flag byte flags 8 literals/references, 1 per bit flags = (flagCount++ % 8 == 0) ? src[in++] : flags >> 1; if ((flags & 1) == 1) { // each flag bit is 1 for reference, 0 for literal unsigned int offset = src[in++]; unsigned int length = src[in++]; unsigned int end; offset = (offset << 4) | (length >> 4); // the offset relative to block start length = (length & 0xF) + 2; // the number of bytes to copy // the decompression buffer is supposed to wrap around back // to the beginning when the end is reached. we save the // need for such a buffer by pointing straight into the data // buffer, and simulating this behaviour by modifying the // pointers appropriately. offset = (out / 4096) * 4096 + offset; if (offset >= out) // take from previous block offset -= 4096; // note: can't use System.arraycopy, because the referenced // bytes can cross through the current out position. end = offset + length; while ((offset < end) && (out < (comp_Prebuf.size + uncompressedSize)) && (offset < (comp_Prebuf.size + uncompressedSize))) dst[out++] = dst[offset++]; } else { // literal if ((out >= (comp_Prebuf.size + uncompressedSize)) || (in >= p->size)) { printf("Corrupted stream\n"); exit(-1); } dst[out++] = src[in++]; } } // copy it back without the prebuffered data src = dst; dst = calloc(uncompressedSize, 1); ALLOCCHECK_CHAR(dst); memcpy(dst, src + comp_Prebuf.size, uncompressedSize); free(src); *size = uncompressedSize; free(comp_Prebuf.data); return dst; } else { // unknown magic number printf("Unknown compression type (magic number %x)\n", magic); } free(comp_Prebuf.data); return NULL; }
617
True
1
CVE-2017-6839
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/mpruett/audiofile/issues/41', 'name': 'https://github.com/mpruett/audiofile/issues/41', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'name': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'name': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/03/13/9', 'name': '[oss-security] 20170313 Re: audiofile: multiple ubsan crashes', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3814', 'name': 'DSA-3814', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:audiofile:audiofile:0.3.6:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in modules/MSADPCM.cpp in Audio File Library (aka audiofile) 0.3.6 allows remote attackers to cause a denial of service (crash) via a crafted file.'}]
2017-11-04T01:29Z
2017-03-20T16: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
Antonio Larrosa
2017-03-06 13:43:53+01:00
Check for multiplication overflow in MSADPCM decodeSample Check for multiplication overflow (using __builtin_mul_overflow if available) in MSADPCM.cpp decodeSample and return an empty decoded block if an error occurs. This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41
beacc44eb8cdf6d58717ec1a5103c5141f1b37f9
False
antlarr/audiofile
Audio File Library
2017-03-06 11:45:21
2017-03-10 14:40:59
https://audiofile.68k.org/
antlarr
0.0
0.0
BlockCodec::runPull
BlockCodec::runPull()
[]
void BlockCodec::runPull() { AFframecount framesToRead = m_outChunk->frameCount; AFframecount framesRead = 0; assert(framesToRead % m_framesPerPacket == 0); int blockCount = framesToRead / m_framesPerPacket; // Read the compressed data. ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; // Decompress into m_outChunk. for (int i=0; i<blocksRead; i++) { decodeBlock(static_cast<const uint8_t *>(m_inChunk->buffer) + i * m_bytesPerPacket, static_cast<int16_t *>(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); framesRead += m_framesPerPacket; } m_track->nextfframe += framesRead; assert(tell() == m_track->fpos_next_frame); if (framesRead < framesToRead) reportReadError(framesRead, framesToRead); m_outChunk->frameCount = framesRead; }
158
True
1
CVE-2017-6839
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/mpruett/audiofile/issues/41', 'name': 'https://github.com/mpruett/audiofile/issues/41', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'name': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'name': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/03/13/9', 'name': '[oss-security] 20170313 Re: audiofile: multiple ubsan crashes', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3814', 'name': 'DSA-3814', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:audiofile:audiofile:0.3.6:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in modules/MSADPCM.cpp in Audio File Library (aka audiofile) 0.3.6 allows remote attackers to cause a denial of service (crash) via a crafted file.'}]
2017-11-04T01:29Z
2017-03-20T16: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
Antonio Larrosa
2017-03-06 13:43:53+01:00
Check for multiplication overflow in MSADPCM decodeSample Check for multiplication overflow (using __builtin_mul_overflow if available) in MSADPCM.cpp decodeSample and return an empty decoded block if an error occurs. This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41
beacc44eb8cdf6d58717ec1a5103c5141f1b37f9
False
antlarr/audiofile
Audio File Library
2017-03-06 11:45:21
2017-03-10 14:40:59
https://audiofile.68k.org/
antlarr
0.0
0.0
MSADPCM::decodeBlock
MSADPCM::decodeBlock( const uint8_t * encoded , int16_t * decoded)
['encoded', 'decoded']
int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) { ms_adpcm_state decoderState[2]; ms_adpcm_state *state[2]; int channelCount = m_track->f.channelCount; // Calculate the number of bytes needed for decoded data. int outputLength = m_framesPerPacket * sizeof (int16_t) * channelCount; state[0] = &decoderState[0]; if (channelCount == 2) state[1] = &decoderState[1]; else state[1] = &decoderState[0]; // Initialize block predictor. for (int i=0; i<channelCount; i++) { state[i]->predictorIndex = *encoded++; assert(state[i]->predictorIndex < m_numCoefficients); } // Initialize delta. for (int i=0; i<channelCount; i++) { state[i]->delta = (encoded[1]<<8) | encoded[0]; encoded += sizeof (uint16_t); } // Initialize first two samples. for (int i=0; i<channelCount; i++) { state[i]->sample1 = (encoded[1]<<8) | encoded[0]; encoded += sizeof (uint16_t); } for (int i=0; i<channelCount; i++) { state[i]->sample2 = (encoded[1]<<8) | encoded[0]; encoded += sizeof (uint16_t); } const int16_t *coefficient[2] = { m_coefficients[state[0]->predictorIndex], m_coefficients[state[1]->predictorIndex] }; for (int i=0; i<channelCount; i++) *decoded++ = state[i]->sample2; for (int i=0; i<channelCount; i++) *decoded++ = state[i]->sample1; /* The first two samples have already been 'decoded' in the block header. */ int samplesRemaining = (m_framesPerPacket - 2) * m_track->f.channelCount; while (samplesRemaining > 0) { uint8_t code; int16_t newSample; code = *encoded >> 4; newSample = decodeSample(*state[0], code, coefficient[0]); *decoded++ = newSample; code = *encoded & 0x0f; newSample = decodeSample(*state[1], code, coefficient[1]); *decoded++ = newSample; encoded++; samplesRemaining -= 2; } return outputLength; }
445
True
1
CVE-2017-6839
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/mpruett/audiofile/issues/41', 'name': 'https://github.com/mpruett/audiofile/issues/41', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'name': 'https://github.com/antlarr/audiofile/commit/beacc44eb8cdf6d58717ec1a5103c5141f1b37f9', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'name': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/03/13/9', 'name': '[oss-security] 20170313 Re: audiofile: multiple ubsan crashes', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3814', 'name': 'DSA-3814', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:audiofile:audiofile:0.3.6:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in modules/MSADPCM.cpp in Audio File Library (aka audiofile) 0.3.6 allows remote attackers to cause a denial of service (crash) via a crafted file.'}]
2017-11-04T01:29Z
2017-03-20T16: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
Antonio Larrosa
2017-03-06 13:43:53+01:00
Check for multiplication overflow in MSADPCM decodeSample Check for multiplication overflow (using __builtin_mul_overflow if available) in MSADPCM.cpp decodeSample and return an empty decoded block if an error occurs. This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41
beacc44eb8cdf6d58717ec1a5103c5141f1b37f9
False
antlarr/audiofile
Audio File Library
2017-03-06 11:45:21
2017-03-10 14:40:59
https://audiofile.68k.org/
antlarr
0.0
0.0
decodeSample
decodeSample( ms_adpcm_state & state , uint8_t code , const int16_t * coefficient)
['state', 'code', 'coefficient']
static int16_t decodeSample(ms_adpcm_state &state, uint8_t code, const int16_t *coefficient) { int linearSample = (state.sample1 * coefficient[0] + state.sample2 * coefficient[1]) >> 8; linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); int delta = (state.delta * adaptationTable[code]) >> 8; if (delta < 16) delta = 16; state.delta = delta; state.sample2 = state.sample1; state.sample1 = linearSample; return static_cast<int16_t>(linearSample); }
131
True
1
CVE-2017-6838
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/mpruett/audiofile/issues/41', 'name': 'https://github.com/mpruett/audiofile/issues/41', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/antlarr/audiofile/commit/7d65f89defb092b63bcbc5d98349fb222ca73b3c', 'name': 'https://github.com/antlarr/audiofile/commit/7d65f89defb092b63bcbc5d98349fb222ca73b3c', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'name': 'https://blogs.gentoo.org/ago/2017/02/20/audiofile-multiple-ubsan-crashes/', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.openwall.com/lists/oss-security/2017/03/13/9', 'name': '[oss-security] 20170313 Re: audiofile: multiple ubsan crashes', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3814', 'name': 'DSA-3814', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:audiofile:audiofile:0.3.6:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in sfcommands/sfconvert.c in Audio File Library (aka audiofile) 0.3.6 allows remote attackers to cause a denial of service (crash) via a crafted file.'}]
2017-11-04T01:29Z
2017-03-20T16: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
Antonio Larrosa
2017-03-06 13:54:52+01:00
Check for multiplication overflow in sfconvert Checks that a multiplication doesn't overflow when calculating the buffer size, and if it overflows, reduce the buffer size instead of failing. This fixes the 00192-audiofile-signintoverflow-sfconvert case in #41
7d65f89defb092b63bcbc5d98349fb222ca73b3c
False
antlarr/audiofile
Audio File Library
2017-03-06 11:45:21
2017-03-10 14:40:59
https://audiofile.68k.org/
antlarr
0.0
0.0
copyaudiodata
copyaudiodata( AFfilehandle infile , AFfilehandle outfile , int trackid)
['infile', 'outfile', 'trackid']
bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) { int frameSize = afGetVirtualFrameSize(infile, trackid, 1); const int kBufferFrameCount = 65536; void *buffer = malloc(kBufferFrameCount * frameSize); AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); AFframecount totalFramesWritten = 0; bool success = true; while (totalFramesWritten < totalFrames) { AFframecount framesToRead = totalFrames - totalFramesWritten; if (framesToRead > kBufferFrameCount) framesToRead = kBufferFrameCount; AFframecount framesRead = afReadFrames(infile, trackid, buffer, framesToRead); if (framesRead < framesToRead) { fprintf(stderr, "Bad read of audio track data.\n"); success = false; break; } AFframecount framesWritten = afWriteFrames(outfile, trackid, buffer, framesRead); if (framesWritten < framesRead) { fprintf(stderr, "Bad write of audio track data.\n"); success = false; break; } totalFramesWritten += framesWritten; } free(buffer); return success; }
169
True
1
CVE-2017-6889
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
True
[{'url': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'name': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'name': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libraw:libraw-demosaic-pack-gpl2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.18.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An integer overflow error within the "foveon_load_camf()" function (dcraw_foveon.c) in LibRaw-demosaic-pack-GPL2 before 0.18.2 can be exploited to cause a heap-based buffer overflow.'}]
2017-05-24T14:04Z
2017-05-15T18:29Z
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
Alex Tutubalin
2017-03-04 19:55:24+03:00
Fixed possible foveon buffer overrun (Secunia SA750000)
194f592e205990ea8fce72b6c571c14350aca716
False
LibRaw/LibRaw-demosaic-pack-GPL2
Demosaic methods for LibRaw distributed under the terms of GPL2+
2010-11-15 15:43:13
2018-03-26 08:33:53
www.libraw.org
LibRaw
10.0
5.0
foveon_dp_load_raw
foveon_dp_load_raw()
[]
void CLASS foveon_dp_load_raw() { unsigned c, roff[4], row, col, diff; ushort huff[512], vpred[2][2], hpred[2]; fseek (ifp, 8, SEEK_CUR); foveon_huff (huff); roff[0] = 48; FORC3 roff[c+1] = -(-(roff[c] + get4()) & -16); FORC3 { fseek (ifp, data_offset+roff[c], SEEK_SET); getbits(-1); vpred[0][0] = vpred[0][1] = vpred[1][0] = vpred[1][1] = 512; for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col=0; col < width; col++) { diff = ljpeg_diff(huff); if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; image[row*width+col][c] = hpred[col & 1]; } } } }
235
True
1
CVE-2017-6890
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
True
[{'url': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'name': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'name': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libraw:libraw-demosaic-pack-gpl2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.18.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'A boundary error within the "foveon_load_camf()" function (dcraw_foveon.c) when initializing a huffman table in LibRaw-demosaic-pack-GPL2 before 0.18.2 can be exploited to cause a stack-based buffer overflow.'}]
2017-05-25T15:38Z
2017-05-15T18:29Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Alex Tutubalin
2017-03-04 19:55:24+03:00
Fixed possible foveon buffer overrun (Secunia SA750000)
194f592e205990ea8fce72b6c571c14350aca716
False
LibRaw/LibRaw-demosaic-pack-GPL2
Demosaic methods for LibRaw distributed under the terms of GPL2+
2010-11-15 15:43:13
2018-03-26 08:33:53
www.libraw.org
LibRaw
10.0
5.0
foveon_dp_load_raw
foveon_dp_load_raw()
[]
void CLASS foveon_dp_load_raw() { unsigned c, roff[4], row, col, diff; ushort huff[512], vpred[2][2], hpred[2]; fseek (ifp, 8, SEEK_CUR); foveon_huff (huff); roff[0] = 48; FORC3 roff[c+1] = -(-(roff[c] + get4()) & -16); FORC3 { fseek (ifp, data_offset+roff[c], SEEK_SET); getbits(-1); vpred[0][0] = vpred[0][1] = vpred[1][0] = vpred[1][1] = 512; for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col=0; col < width; col++) { diff = ljpeg_diff(huff); if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; image[row*width+col][c] = hpred[col & 1]; } } } }
235
True
1
CVE-2017-6889
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
True
[{'url': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'name': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'name': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libraw:libraw-demosaic-pack-gpl2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.18.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An integer overflow error within the "foveon_load_camf()" function (dcraw_foveon.c) in LibRaw-demosaic-pack-GPL2 before 0.18.2 can be exploited to cause a heap-based buffer overflow.'}]
2017-05-24T14:04Z
2017-05-15T18:29Z
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
Alex Tutubalin
2017-03-04 19:55:24+03:00
Fixed possible foveon buffer overrun (Secunia SA750000)
194f592e205990ea8fce72b6c571c14350aca716
False
LibRaw/LibRaw-demosaic-pack-GPL2
Demosaic methods for LibRaw distributed under the terms of GPL2+
2010-11-15 15:43:13
2018-03-26 08:33:53
www.libraw.org
LibRaw
10.0
5.0
foveon_load_camf
foveon_load_camf()
[]
void CLASS foveon_load_camf() { unsigned type, wide, high, i, j, row, col, diff; ushort huff[258], vpred[2][2] = {{512,512},{512,512}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); type = get4(); get4(); get4(); wide = get4(); high = get4(); if (type == 2) { fread (meta_data, 1, meta_length, ifp); for (i=0; i < meta_length; i++) { high = (high * 1597 + 51749) % 244944; wide = high * (INT64) 301593171 >> 24; meta_data[i] ^= ((((high << 8) - wide) >> 1) + wide) >> 17; } } else if (type == 4) { free (meta_data); meta_data = (char *) malloc (meta_length = wide*high*3/2); merror (meta_data, "foveon_load_camf()"); foveon_huff (huff); get4(); getbits(-1); for (j=row=0; row < high; row++) { for (col=0; col < wide; col++) { diff = ljpeg_diff(huff); if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; if (col & 1) { meta_data[j++] = hpred[0] >> 4; meta_data[j++] = hpred[0] << 4 | hpred[1] >> 8; meta_data[j++] = hpred[1]; } } } } else fprintf (stderr,_("%s has unknown CAMF type %d.\n"), ifname, type); }
373
True
1
CVE-2017-6890
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
True
[{'url': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'name': 'https://secuniaresearch.flexerasoftware.com/advisories/75000/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'name': 'https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libraw:libraw-demosaic-pack-gpl2:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.18.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'A boundary error within the "foveon_load_camf()" function (dcraw_foveon.c) when initializing a huffman table in LibRaw-demosaic-pack-GPL2 before 0.18.2 can be exploited to cause a stack-based buffer overflow.'}]
2017-05-25T15:38Z
2017-05-15T18:29Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Alex Tutubalin
2017-03-04 19:55:24+03:00
Fixed possible foveon buffer overrun (Secunia SA750000)
194f592e205990ea8fce72b6c571c14350aca716
False
LibRaw/LibRaw-demosaic-pack-GPL2
Demosaic methods for LibRaw distributed under the terms of GPL2+
2010-11-15 15:43:13
2018-03-26 08:33:53
www.libraw.org
LibRaw
10.0
5.0
foveon_load_camf
foveon_load_camf()
[]
void CLASS foveon_load_camf() { unsigned type, wide, high, i, j, row, col, diff; ushort huff[258], vpred[2][2] = {{512,512},{512,512}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); type = get4(); get4(); get4(); wide = get4(); high = get4(); if (type == 2) { fread (meta_data, 1, meta_length, ifp); for (i=0; i < meta_length; i++) { high = (high * 1597 + 51749) % 244944; wide = high * (INT64) 301593171 >> 24; meta_data[i] ^= ((((high << 8) - wide) >> 1) + wide) >> 17; } } else if (type == 4) { free (meta_data); meta_data = (char *) malloc (meta_length = wide*high*3/2); merror (meta_data, "foveon_load_camf()"); foveon_huff (huff); get4(); getbits(-1); for (j=row=0; row < high; row++) { for (col=0; col < wide; col++) { diff = ljpeg_diff(huff); if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; if (col & 1) { meta_data[j++] = hpred[0] >> 4; meta_data[j++] = hpred[0] << 4 | hpred[1] >> 8; meta_data[j++] = hpred[1]; } } } } else fprintf (stderr,_("%s has unknown CAMF type %d.\n"), ifname, type); }
373
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Ensiform
2017-03-13 22:20:58-05:00
Shared: Merge ioquake/ioq3@376267d534476a875d8b9228149c4ee18b74a4fd Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7
False
JACoders/OpenJK
Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
2013-04-04 09:12:04
2022-08-19 19:23:06
JACoders
1717.0
547.0
CL_InitRef
CL_InitRef( void)
['void']
void CL_InitRef( void ) { refexport_t *ret; static refimport_t rit; char dllName[MAX_OSPATH]; GetRefAPI_t GetRefAPI; Com_Printf( "----- Initializing Renderer ----\n" ); cl_renderer = Cvar_Get( "cl_renderer", DEFAULT_RENDER_LIBRARY, CVAR_ARCHIVE|CVAR_LATCH ); Com_sprintf( dllName, sizeof( dllName ), "%s_" ARCH_STRING DLL_EXT, cl_renderer->string ); if( !(rendererLib = Sys_LoadDll( dllName, qfalse )) && strcmp( cl_renderer->string, cl_renderer->resetString ) ) { Com_Printf( "failed: trying to load fallback renderer\n" ); Cvar_ForceReset( "cl_renderer" ); Com_sprintf( dllName, sizeof( dllName ), DEFAULT_RENDER_LIBRARY "_" ARCH_STRING DLL_EXT ); rendererLib = Sys_LoadDll( dllName, qfalse ); } if ( !rendererLib ) { Com_Error( ERR_FATAL, "Failed to load renderer\n" ); } memset( &rit, 0, sizeof( rit ) ); GetRefAPI = (GetRefAPI_t)Sys_LoadFunction( rendererLib, "GetRefAPI" ); if ( !GetRefAPI ) Com_Error( ERR_FATAL, "Can't load symbol GetRefAPI: '%s'", Sys_LibraryError() ); #define RIT(y) rit.y = y RIT(CIN_PlayCinematic); RIT(CIN_RunCinematic); RIT(CIN_UploadCinematic); RIT(CL_IsRunningInGameCinematic); RIT(Cmd_AddCommand); RIT(Cmd_Argc); RIT(Cmd_ArgsBuffer); RIT(Cmd_Argv); RIT(Cmd_ExecuteString); RIT(Cmd_RemoveCommand); RIT(CM_ClusterPVS); RIT(CM_CullWorldBox); RIT(CM_DeleteCachedMap); RIT(CM_DrawDebugSurface); RIT(CM_PointContents); RIT(Cvar_Get); RIT(Cvar_Set); RIT(Cvar_SetValue); RIT(Cvar_CheckRange); RIT(Cvar_VariableIntegerValue); RIT(Cvar_VariableString); RIT(Cvar_VariableStringBuffer); RIT(Cvar_VariableValue); RIT(FS_FCloseFile); RIT(FS_FileIsInPAK); RIT(FS_FOpenFileByMode); RIT(FS_FOpenFileRead); RIT(FS_FOpenFileWrite); RIT(FS_FreeFile); RIT(FS_FreeFileList); RIT(FS_ListFiles); RIT(FS_Read); RIT(FS_ReadFile); RIT(FS_Write); RIT(FS_WriteFile); RIT(Hunk_ClearToMark); RIT(SND_RegisterAudio_LevelLoadEnd); //RIT(SV_PointContents); RIT(SV_Trace); RIT(S_RestartMusic); RIT(Z_Free); rit.Malloc=CL_Malloc; RIT(Z_MemSize); RIT(Z_MorphMallocTag); RIT(Hunk_ClearToMark); rit.WIN_Init = WIN_Init; rit.WIN_SetGamma = WIN_SetGamma; rit.WIN_Shutdown = WIN_Shutdown; rit.WIN_Present = WIN_Present; rit.GL_GetProcAddress = WIN_GL_GetProcAddress; rit.GL_ExtensionSupported = WIN_GL_ExtensionSupported; rit.PD_Load = PD_Load; rit.PD_Store = PD_Store; rit.Error = Com_Error; rit.FS_FileExists = S_FileExists; rit.GetG2VertSpaceServer = GetG2VertSpaceServer; rit.LowPhysicalMemory = Sys_LowPhysicalMemory; rit.Milliseconds = Sys_Milliseconds2; rit.Printf = CL_RefPrintf; rit.SE_GetString = String_GetStringValue; rit.SV_Trace = SV_Trace; rit.gpvCachedMapDiskImage = get_gpvCachedMapDiskImage; rit.gsCachedMapDiskImage = get_gsCachedMapDiskImage; rit.gbUsingCachedMapDataRightNow = get_gbUsingCachedMapDataRightNow; rit.gbAlreadyDoingLoad = get_gbAlreadyDoingLoad; rit.com_frameTime = get_com_frameTime; rit.SV_PointContents = SV_PointContents; rit.saved_game = &ojk::SavedGame::get_instance(); ret = GetRefAPI( REF_API_VERSION, &rit ); if ( !ret ) { Com_Error (ERR_FATAL, "Couldn't initialize refresh" ); } re = *ret; Com_Printf( "-------------------------------\n"); // unpause so the cgame definately gets a snapshot and renders a frame Cvar_Set( "cl_paused", "0" ); }
582
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Ensiform
2017-03-13 22:20:58-05:00
Shared: Merge ioquake/ioq3@376267d534476a875d8b9228149c4ee18b74a4fd Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7
False
JACoders/OpenJK
Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
2013-04-04 09:12:04
2022-08-19 19:23:06
JACoders
1717.0
547.0
CL_InitRef
CL_InitRef( void)
['void']
void CL_InitRef( void ) { static refimport_t ri; refexport_t *ret; GetRefAPI_t GetRefAPI; char dllName[MAX_OSPATH]; Com_Printf( "----- Initializing Renderer ----\n" ); cl_renderer = Cvar_Get( "cl_renderer", DEFAULT_RENDER_LIBRARY, CVAR_ARCHIVE|CVAR_LATCH, "Which renderer library to use" ); Com_sprintf( dllName, sizeof( dllName ), "%s_" ARCH_STRING DLL_EXT, cl_renderer->string ); if( !(rendererLib = Sys_LoadDll( dllName, qfalse )) && strcmp( cl_renderer->string, cl_renderer->resetString ) ) { Com_Printf( "failed: trying to load fallback renderer\n" ); Cvar_ForceReset( "cl_renderer" ); Com_sprintf( dllName, sizeof( dllName ), DEFAULT_RENDER_LIBRARY "_" ARCH_STRING DLL_EXT ); rendererLib = Sys_LoadDll( dllName, qfalse ); } if ( !rendererLib ) { Com_Error( ERR_FATAL, "Failed to load renderer\n" ); } memset( &ri, 0, sizeof( ri ) ); GetRefAPI = (GetRefAPI_t)Sys_LoadFunction( rendererLib, "GetRefAPI" ); if ( !GetRefAPI ) Com_Error( ERR_FATAL, "Can't load symbol GetRefAPI: '%s'", Sys_LibraryError() ); //set up the import table ri.Printf = CL_RefPrintf; ri.Error = Com_Error; ri.OPrintf = Com_OPrintf; ri.Milliseconds = Sys_Milliseconds2; //FIXME: unix+mac need this ri.Hunk_AllocateTempMemory = Hunk_AllocateTempMemory; ri.Hunk_FreeTempMemory = Hunk_FreeTempMemory; ri.Hunk_Alloc = Hunk_Alloc; ri.Hunk_MemoryRemaining = Hunk_MemoryRemaining; ri.Z_Malloc = Z_Malloc; ri.Z_Free = Z_Free; ri.Z_MemSize = Z_MemSize; ri.Z_MorphMallocTag = Z_MorphMallocTag; ri.Cmd_ExecuteString = Cmd_ExecuteString; ri.Cmd_Argc = Cmd_Argc; ri.Cmd_Argv = Cmd_Argv; ri.Cmd_ArgsBuffer = Cmd_ArgsBuffer; ri.Cmd_AddCommand = Cmd_AddCommand; ri.Cmd_RemoveCommand = Cmd_RemoveCommand; ri.Cvar_Set = Cvar_Set; ri.Cvar_Get = Cvar_Get; ri.Cvar_SetValue = Cvar_SetValue; ri.Cvar_CheckRange = Cvar_CheckRange; ri.Cvar_VariableStringBuffer = Cvar_VariableStringBuffer; ri.Cvar_VariableString = Cvar_VariableString; ri.Cvar_VariableValue = Cvar_VariableValue; ri.Cvar_VariableIntegerValue = Cvar_VariableIntegerValue; ri.Sys_LowPhysicalMemory = Sys_LowPhysicalMemory; ri.SE_GetString = SE_GetString; ri.FS_FreeFile = FS_FreeFile; ri.FS_FreeFileList = FS_FreeFileList; ri.FS_Read = FS_Read; ri.FS_ReadFile = FS_ReadFile; ri.FS_FCloseFile = FS_FCloseFile; ri.FS_FOpenFileRead = FS_FOpenFileRead; ri.FS_FOpenFileWrite = FS_FOpenFileWrite; ri.FS_FOpenFileByMode = FS_FOpenFileByMode; ri.FS_FileExists = FS_FileExists; ri.FS_FileIsInPAK = FS_FileIsInPAK; ri.FS_ListFiles = FS_ListFiles; ri.FS_Write = FS_Write; ri.FS_WriteFile = FS_WriteFile; ri.CM_BoxTrace = CM_BoxTrace; ri.CM_DrawDebugSurface = CM_DrawDebugSurface; ri.CM_CullWorldBox = CM_CullWorldBox; ri.CM_ClusterPVS = CM_ClusterPVS; ri.CM_LeafArea = CM_LeafArea; ri.CM_LeafCluster = CM_LeafCluster; ri.CM_PointLeafnum = CM_PointLeafnum; ri.CM_PointContents = CM_PointContents; ri.Com_TheHunkMarkHasBeenMade = Com_TheHunkMarkHasBeenMade; ri.S_RestartMusic = S_RestartMusic; ri.SND_RegisterAudio_LevelLoadEnd = SND_RegisterAudio_LevelLoadEnd; ri.CIN_RunCinematic = CIN_RunCinematic; ri.CIN_PlayCinematic = CIN_PlayCinematic; ri.CIN_UploadCinematic = CIN_UploadCinematic; ri.CL_WriteAVIVideoFrame = CL_WriteAVIVideoFrame; // g2 data access ri.GetSharedMemory = GetSharedMemory; // (c)g vm callbacks ri.GetCurrentVM = GetCurrentVM; ri.CGVMLoaded = CGVMLoaded; ri.CGVM_RagCallback = CGVM_RagCallback; ri.WIN_Init = WIN_Init; ri.WIN_SetGamma = WIN_SetGamma; ri.WIN_Shutdown = WIN_Shutdown; ri.WIN_Present = WIN_Present; ri.GL_GetProcAddress = WIN_GL_GetProcAddress; ri.GL_ExtensionSupported = WIN_GL_ExtensionSupported; ri.CM_GetCachedMapDiskImage = CM_GetCachedMapDiskImage; ri.CM_SetCachedMapDiskImage = CM_SetCachedMapDiskImage; ri.CM_SetUsingCache = CM_SetUsingCache; //FIXME: Might have to do something about this... ri.GetG2VertSpaceServer = GetG2VertSpaceServer; G2VertSpaceServer = &IHeapAllocator_singleton; ri.PD_Store = PD_Store; ri.PD_Load = PD_Load; ret = GetRefAPI( REF_API_VERSION, &ri ); // Com_Printf( "-------------------------------\n"); if ( !ret ) { Com_Error (ERR_FATAL, "Couldn't initialize refresh" ); } re = ret; // unpause so the cgame definately gets a snapshot and renders a frame Cvar_Set( "cl_paused", "0" ); }
649
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
MAN-AT-ARMS
2017-03-13 19:37:39-04:00
All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
False
iortcw/iortcw
Merge of ioquake3 features and fixes into RTCW code bases
2015-03-12 20:00:35
2022-08-18 19:29:22
iortcw
457.0
68.0
CL_Init
CL_Init( void)
['void']
void CL_Init( void ) { Com_Printf( "----- Client Initialization -----\n" ); Con_Init(); if(!com_fullyInitialized) { CL_ClearState(); clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED cl_oldGameSet = qfalse; } cls.realtime = 0; CL_InitInput(); // // register our variables // cl_noprint = Cvar_Get( "cl_noprint", "0", 0 ); #ifdef UPDATE_SERVER_NAME cl_motd = Cvar_Get( "cl_motd", "1", 0 ); #endif cl_autoupdate = Cvar_Get( "cl_autoupdate", "0", CVAR_ARCHIVE ); cl_timeout = Cvar_Get( "cl_timeout", "200", 0 ); cl_wavefilerecord = Cvar_Get( "cl_wavefilerecord", "0", CVAR_TEMP ); cl_timeNudge = Cvar_Get( "cl_timeNudge", "0", CVAR_TEMP ); cl_shownet = Cvar_Get( "cl_shownet", "0", CVAR_TEMP ); cl_shownuments = Cvar_Get( "cl_shownuments", "0", CVAR_TEMP ); cl_visibleClients = Cvar_Get( "cl_visibleClients", "0", CVAR_TEMP ); cl_showServerCommands = Cvar_Get( "cl_showServerCommands", "0", 0 ); cl_showSend = Cvar_Get( "cl_showSend", "0", CVAR_TEMP ); cl_showTimeDelta = Cvar_Get( "cl_showTimeDelta", "0", CVAR_TEMP ); cl_freezeDemo = Cvar_Get( "cl_freezeDemo", "0", CVAR_TEMP ); rcon_client_password = Cvar_Get( "rconPassword", "", CVAR_TEMP ); cl_activeAction = Cvar_Get( "activeAction", "", CVAR_TEMP ); cl_timedemo = Cvar_Get( "timedemo", "0", 0 ); cl_timedemoLog = Cvar_Get ("cl_timedemoLog", "", CVAR_ARCHIVE); cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE); cl_aviFrameRate = Cvar_Get ("cl_aviFrameRate", "25", CVAR_ARCHIVE); cl_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE); cl_avidemo = Cvar_Get( "cl_avidemo", "0", 0 ); cl_forceavidemo = Cvar_Get( "cl_forceavidemo", "0", 0 ); rconAddress = Cvar_Get( "rconAddress", "", 0 ); cl_yawspeed = Cvar_Get( "cl_yawspeed", "140", CVAR_ARCHIVE ); cl_pitchspeed = Cvar_Get( "cl_pitchspeed", "140", CVAR_ARCHIVE ); cl_anglespeedkey = Cvar_Get( "cl_anglespeedkey", "1.5", 0 ); cl_maxpackets = Cvar_Get( "cl_maxpackets", "38", CVAR_ARCHIVE ); cl_packetdup = Cvar_Get( "cl_packetdup", "1", CVAR_ARCHIVE ); cl_showPing = Cvar_Get( "cl_showPing", "0", CVAR_ARCHIVE ); cl_run = Cvar_Get( "cl_run", "1", CVAR_ARCHIVE ); cl_sensitivity = Cvar_Get( "sensitivity", "5", CVAR_ARCHIVE ); cl_mouseAccel = Cvar_Get( "cl_mouseAccel", "0", CVAR_ARCHIVE ); cl_freelook = Cvar_Get( "cl_freelook", "1", CVAR_ARCHIVE ); // 0: legacy mouse acceleration // 1: new implementation cl_mouseAccelStyle = Cvar_Get( "cl_mouseAccelStyle", "0", CVAR_ARCHIVE ); // offset for the power function (for style 1, ignored otherwise) // this should be set to the max rate value cl_mouseAccelOffset = Cvar_Get( "cl_mouseAccelOffset", "5", CVAR_ARCHIVE ); Cvar_CheckRange(cl_mouseAccelOffset, 0.001f, 50000.0f, qfalse); cl_showMouseRate = Cvar_Get( "cl_showmouserate", "0", 0 ); cl_allowDownload = Cvar_Get( "cl_allowDownload", "1", CVAR_ARCHIVE ); #ifdef USE_CURL_DLOPEN cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE); #endif // init autoswitch so the ui will have it correctly even // if the cgame hasn't been started // -NERVE - SMF - disabled autoswitch by default Cvar_Get( "cg_autoswitch", "0", CVAR_ARCHIVE ); // Rafael - particle switch Cvar_Get( "cg_wolfparticles", "1", CVAR_ARCHIVE ); // done cl_conXOffset = Cvar_Get( "cl_conXOffset", "0", 0 ); cl_inGameVideo = Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE ); cl_serverStatusResendTime = Cvar_Get( "cl_serverStatusResendTime", "750", 0 ); // RF cl_recoilPitch = Cvar_Get( "cg_recoilPitch", "0", CVAR_ROM ); cl_bypassMouseInput = Cvar_Get( "cl_bypassMouseInput", "0", 0 ); //CVAR_ROM ); // NERVE - SMF m_pitch = Cvar_Get( "m_pitch", "0.022", CVAR_ARCHIVE ); m_yaw = Cvar_Get( "m_yaw", "0.022", CVAR_ARCHIVE ); m_forward = Cvar_Get( "m_forward", "0.25", CVAR_ARCHIVE ); m_side = Cvar_Get( "m_side", "0.25", CVAR_ARCHIVE ); m_filter = Cvar_Get( "m_filter", "0", CVAR_ARCHIVE ); j_pitch = Cvar_Get ("j_pitch", "0.022", CVAR_ARCHIVE); j_yaw = Cvar_Get ("j_yaw", "-0.022", CVAR_ARCHIVE); j_forward = Cvar_Get ("j_forward", "-0.25", CVAR_ARCHIVE); j_side = Cvar_Get ("j_side", "0.25", CVAR_ARCHIVE); j_up = Cvar_Get ("j_up", "0", CVAR_ARCHIVE); j_pitch_axis = Cvar_Get ("j_pitch_axis", "3", CVAR_ARCHIVE); j_yaw_axis = Cvar_Get ("j_yaw_axis", "2", CVAR_ARCHIVE); j_forward_axis = Cvar_Get ("j_forward_axis", "1", CVAR_ARCHIVE); j_side_axis = Cvar_Get ("j_side_axis", "0", CVAR_ARCHIVE); j_up_axis = Cvar_Get ("j_up_axis", "4", CVAR_ARCHIVE); Cvar_CheckRange(j_pitch_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_yaw_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_forward_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_side_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_up_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); cl_motdString = Cvar_Get( "cl_motdString", "", CVAR_ROM ); Cvar_Get( "cl_maxPing", "800", CVAR_ARCHIVE ); cl_lanForcePackets = Cvar_Get ("cl_lanForcePackets", "1", CVAR_ARCHIVE); cl_guid = Cvar_Get( "cl_guid", "unknown", CVAR_USERINFO | CVAR_ROM ); cl_guidServerUniq = Cvar_Get ("cl_guidServerUniq", "1", CVAR_ARCHIVE); // ~ and `, as keys and characters cl_consoleKeys = Cvar_Get( "cl_consoleKeys", "~ ` 0x7e 0x60", CVAR_ARCHIVE); // NERVE - SMF Cvar_Get( "cg_drawCompass", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_drawNotifyText", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_quickMessageAlt", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_popupLimboMenu", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_descriptiveText", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_drawTeamOverlay", "2", CVAR_ARCHIVE ); Cvar_Get( "cg_uselessNostalgia", "0", CVAR_ARCHIVE ); // JPW NERVE Cvar_Get( "cg_drawGun", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_cursorHints", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_voiceSpriteTime", "6000", CVAR_ARCHIVE ); Cvar_Get( "cg_teamChatsOnly", "0", CVAR_ARCHIVE ); Cvar_Get( "cg_noVoiceChats", "0", CVAR_ARCHIVE ); Cvar_Get( "cg_noVoiceText", "0", CVAR_ARCHIVE ); Cvar_Get( "cg_crosshairSize", "48", CVAR_ARCHIVE ); Cvar_Get( "cg_drawCrosshair", "1", CVAR_ARCHIVE ); Cvar_Get( "cg_zoomDefaultSniper", "20", CVAR_ARCHIVE ); Cvar_Get( "cg_zoomstepsniper", "2", CVAR_ARCHIVE ); Cvar_Get( "mp_playerType", "0", 0 ); Cvar_Get( "mp_currentPlayerType", "0", 0 ); Cvar_Get( "mp_weapon", "0", 0 ); Cvar_Get( "mp_team", "0", 0 ); Cvar_Get( "mp_currentTeam", "0", 0 ); // -NERVE - SMF // userinfo Cvar_Get( "name", "WolfPlayer", CVAR_USERINFO | CVAR_ARCHIVE ); cl_rate = Cvar_Get( "rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE ); // NERVE - SMF - changed from 3000 Cvar_Get( "snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "model", "multi", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "head", "default", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "color", "4", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "handicap", "100", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "sex", "male", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "cl_anonymous", "0", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "password", "", CVAR_USERINFO ); Cvar_Get( "cg_predictItems", "1", CVAR_USERINFO | CVAR_ARCHIVE ); #ifdef USE_MUMBLE cl_useMumble = Cvar_Get ("cl_useMumble", "0", CVAR_ARCHIVE | CVAR_LATCH); cl_mumbleScale = Cvar_Get ("cl_mumbleScale", "0.0254", CVAR_ARCHIVE); #endif #ifdef USE_VOIP cl_voipSend = Cvar_Get ("cl_voipSend", "0", 0); cl_voipSendTarget = Cvar_Get ("cl_voipSendTarget", "spatial", 0); cl_voipGainDuringCapture = Cvar_Get ("cl_voipGainDuringCapture", "0.2", CVAR_ARCHIVE); cl_voipCaptureMult = Cvar_Get ("cl_voipCaptureMult", "2.0", CVAR_ARCHIVE); cl_voipUseVAD = Cvar_Get ("cl_voipUseVAD", "0", CVAR_ARCHIVE); cl_voipVADThreshold = Cvar_Get ("cl_voipVADThreshold", "0.25", CVAR_ARCHIVE); cl_voipShowMeter = Cvar_Get ("cl_voipShowMeter", "1", CVAR_ARCHIVE); cl_voip = Cvar_Get ("cl_voip", "1", CVAR_ARCHIVE); Cvar_CheckRange( cl_voip, 0, 1, qtrue ); cl_voipProtocol = Cvar_Get ("cl_voipProtocol", cl_voip->integer ? "opus" : "", CVAR_USERINFO | CVAR_ROM); #endif //----(SA) added Cvar_Get( "cg_autoactivate", "1", CVAR_USERINFO | CVAR_ARCHIVE ); //----(SA) end // cgame might not be initialized before menu is used Cvar_Get( "cg_viewsize", "100", CVAR_ARCHIVE ); // Make sure cg_stereoSeparation is zero as that variable is deprecated and should not be used anymore. Cvar_Get ("cg_stereoSeparation", "0", CVAR_ROM); Cvar_Get( "cg_autoReload", "1", CVAR_ARCHIVE | CVAR_USERINFO ); cl_missionStats = Cvar_Get( "g_missionStats", "0", CVAR_ROM ); cl_waitForFire = Cvar_Get( "cl_waitForFire", "0", CVAR_ROM ); // NERVE - SMF - localization cl_language = Cvar_Get( "cl_language", "0", CVAR_ARCHIVE ); cl_debugTranslation = Cvar_Get( "cl_debugTranslation", "0", 0 ); // -NERVE - SMF // DHM - Nerve :: Auto-update cl_updateavailable = Cvar_Get( "cl_updateavailable", "0", CVAR_ROM ); cl_updatefiles = Cvar_Get( "cl_updatefiles", "", CVAR_ROM ); Q_strncpyz( cls.autoupdateServerNames[0], AUTOUPDATE_SERVER1_NAME, MAX_QPATH ); Q_strncpyz( cls.autoupdateServerNames[1], AUTOUPDATE_SERVER2_NAME, MAX_QPATH ); Q_strncpyz( cls.autoupdateServerNames[2], AUTOUPDATE_SERVER3_NAME, MAX_QPATH ); Q_strncpyz( cls.autoupdateServerNames[3], AUTOUPDATE_SERVER4_NAME, MAX_QPATH ); Q_strncpyz( cls.autoupdateServerNames[4], AUTOUPDATE_SERVER5_NAME, MAX_QPATH ); // DHM - Nerve // // register our commands // Cmd_AddCommand( "cmd", CL_ForwardToServer_f ); Cmd_AddCommand( "configstrings", CL_Configstrings_f ); Cmd_AddCommand( "clientinfo", CL_Clientinfo_f ); Cmd_AddCommand( "snd_restart", CL_Snd_Restart_f ); Cmd_AddCommand( "vid_restart", CL_Vid_Restart_f ); Cmd_AddCommand( "ui_restart", CL_UI_Restart_f ); // NERVE - SMF Cmd_AddCommand( "disconnect", CL_Disconnect_f ); Cmd_AddCommand( "record", CL_Record_f ); Cmd_AddCommand( "demo", CL_PlayDemo_f ); Cmd_SetCommandCompletionFunc( "demo", CL_CompleteDemoName ); Cmd_AddCommand( "cinematic", CL_PlayCinematic_f ); Cmd_AddCommand( "stoprecord", CL_StopRecord_f ); Cmd_AddCommand( "connect", CL_Connect_f ); Cmd_AddCommand( "reconnect", CL_Reconnect_f ); Cmd_AddCommand( "localservers", CL_LocalServers_f ); Cmd_AddCommand( "globalservers", CL_GlobalServers_f ); Cmd_AddCommand( "rcon", CL_Rcon_f ); Cmd_SetCommandCompletionFunc( "rcon", CL_CompleteRcon ); Cmd_AddCommand( "ping", CL_Ping_f ); Cmd_AddCommand( "serverstatus", CL_ServerStatus_f ); Cmd_AddCommand( "showip", CL_ShowIP_f ); Cmd_AddCommand( "fs_openedList", CL_OpenedPK3List_f ); Cmd_AddCommand( "fs_referencedList", CL_ReferencedPK3List_f ); Cmd_AddCommand ("video", CL_Video_f ); Cmd_AddCommand ("stopvideo", CL_StopVideo_f ); // Ridah, startup-caching system Cmd_AddCommand( "cache_startgather", CL_Cache_StartGather_f ); Cmd_AddCommand( "cache_usedfile", CL_Cache_UsedFile_f ); Cmd_AddCommand( "cache_setindex", CL_Cache_SetIndex_f ); Cmd_AddCommand( "cache_mapchange", CL_Cache_MapChange_f ); Cmd_AddCommand( "cache_endgather", CL_Cache_EndGather_f ); Cmd_AddCommand( "updatehunkusage", CL_UpdateLevelHunkUsage ); Cmd_AddCommand( "updatescreen", SCR_UpdateScreen ); // done. Cmd_AddCommand( "SaveTranslations", CL_SaveTranslations_f ); // NERVE - SMF - localization Cmd_AddCommand( "SaveNewTranslations", CL_SaveNewTranslations_f ); // NERVE - SMF - localization Cmd_AddCommand( "LoadTranslations", CL_LoadTranslations_f ); // NERVE - SMF - localization // NERVE - SMF - don't do this in multiplayer // RF, add this command so clients can't bind a key to send client damage commands to the server // Cmd_AddCommand( "cld", CL_ClientDamageCommand ); Cmd_AddCommand( "startSingleplayer", CL_startSingleplayer_f ); // NERVE - SMF Cmd_AddCommand( "setRecommended", CL_SetRecommended_f ); CL_InitRef(); SCR_Init(); // Cbuf_Execute(); Cvar_Set( "cl_running", "1" ); // DHM - Nerve autoupdateChecked = qfalse; autoupdateStarted = qfalse; CL_InitTranslation(); // NERVE - SMF - localization CL_GenerateQKey(); CL_UpdateGUID( NULL, 0 ); Com_Printf( "----- Client Initialization Complete -----\n" ); }
1787
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
MAN-AT-ARMS
2017-03-13 19:37:39-04:00
All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
False
iortcw/iortcw
Merge of ioquake3 features and fixes into RTCW code bases
2015-03-12 20:00:35
2022-08-18 19:29:22
iortcw
457.0
68.0
CL_InitRef
CL_InitRef( void)
['void']
void CL_InitRef( void ) { refimport_t ri; refexport_t *ret; #ifdef USE_RENDERER_DLOPEN GetRefAPI_t GetRefAPI; char dllName[MAX_OSPATH]; #endif Com_Printf( "----- Initializing Renderer ----\n" ); #ifdef USE_RENDERER_DLOPEN cl_renderer = Cvar_Get("cl_renderer", "opengl1", CVAR_ARCHIVE | CVAR_LATCH); Com_sprintf(dllName, sizeof(dllName), "renderer_mp_%s_" ARCH_STRING DLL_EXT, cl_renderer->string); if(!(rendererLib = Sys_LoadDll(dllName, qfalse)) && strcmp(cl_renderer->string, cl_renderer->resetString)) { Com_Printf("failed:\n\"%s\"\n", Sys_LibraryError()); Cvar_ForceReset("cl_renderer"); Com_sprintf(dllName, sizeof(dllName), "renderer_mp_opengl1_" ARCH_STRING DLL_EXT); rendererLib = Sys_LoadDll(dllName, qfalse); } if(!rendererLib) { Com_Printf("failed:\n\"%s\"\n", Sys_LibraryError()); Com_Error(ERR_FATAL, "Failed to load renderer"); } GetRefAPI = Sys_LoadFunction(rendererLib, "GetRefAPI"); if(!GetRefAPI) { Com_Error(ERR_FATAL, "Can't load symbol GetRefAPI: '%s'", Sys_LibraryError()); } #endif ri.Cmd_AddCommand = Cmd_AddCommand; ri.Cmd_RemoveCommand = Cmd_RemoveCommand; ri.Cmd_Argc = Cmd_Argc; ri.Cmd_Argv = Cmd_Argv; ri.Cmd_ExecuteText = Cbuf_ExecuteText; ri.Printf = CL_RefPrintf; ri.Error = Com_Error; ri.Milliseconds = CL_ScaledMilliseconds; #ifdef ZONE_DEBUG ri.Z_MallocDebug = CL_RefMallocDebug; #else ri.Z_Malloc = CL_RefMalloc; #endif ri.Free = Z_Free; ri.Tag_Free = CL_RefTagFree; ri.Hunk_Clear = Hunk_ClearToMark; #ifdef HUNK_DEBUG ri.Hunk_AllocDebug = Hunk_AllocDebug; #else ri.Hunk_Alloc = Hunk_Alloc; #endif ri.Hunk_AllocateTempMemory = Hunk_AllocateTempMemory; ri.Hunk_FreeTempMemory = Hunk_FreeTempMemory; ri.CM_ClusterPVS = CM_ClusterPVS; ri.CM_DrawDebugSurface = CM_DrawDebugSurface; ri.FS_ReadFile = FS_ReadFile; ri.FS_FreeFile = FS_FreeFile; ri.FS_WriteFile = FS_WriteFile; ri.FS_FreeFileList = FS_FreeFileList; ri.FS_ListFiles = FS_ListFiles; ri.FS_FileIsInPAK = FS_FileIsInPAK; ri.FS_FileExists = FS_FileExists; ri.Cvar_Get = Cvar_Get; ri.Cvar_Set = Cvar_Set; ri.Cvar_SetValue = Cvar_SetValue; ri.Cvar_CheckRange = Cvar_CheckRange; ri.Cvar_VariableIntegerValue = Cvar_VariableIntegerValue; // cinematic stuff ri.CIN_UploadCinematic = CIN_UploadCinematic; ri.CIN_PlayCinematic = CIN_PlayCinematic; ri.CIN_RunCinematic = CIN_RunCinematic; ri.CL_WriteAVIVideoFrame = CL_WriteAVIVideoFrame; ri.IN_Init = IN_Init; ri.IN_Shutdown = IN_Shutdown; ri.IN_Restart = IN_Restart; ri.ftol = Q_ftol; ri.Sys_SetEnv = Sys_SetEnv; ri.Sys_GLimpSafeInit = Sys_GLimpSafeInit; ri.Sys_GLimpInit = Sys_GLimpInit; ri.Sys_LowPhysicalMemory = Sys_LowPhysicalMemory; ret = GetRefAPI( REF_API_VERSION, &ri ); if ( !ret ) { Com_Error( ERR_FATAL, "Couldn't initialize refresh" ); } re = *ret; Com_Printf( "---- Renderer Initialization Complete ----\n" ); // unpause so the cgame definately gets a snapshot and renders a frame Cvar_Set( "cl_paused", "0" ); }
471
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
MAN-AT-ARMS
2017-03-13 19:37:39-04:00
All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
False
iortcw/iortcw
Merge of ioquake3 features and fixes into RTCW code bases
2015-03-12 20:00:35
2022-08-18 19:29:22
iortcw
457.0
68.0
CL_Init
CL_Init( void)
['void']
void CL_Init( void ) { Com_Printf( "----- Client Initialization -----\n" ); Con_Init(); if(!com_fullyInitialized) { CL_ClearState(); clc.state = CA_DISCONNECTED; // no longer CA_UNINITIALIZED cl_oldGameSet = qfalse; } cls.realtime = 0; CL_InitInput(); // // register our variables // cl_noprint = Cvar_Get( "cl_noprint", "0", 0 ); #ifdef UPDATE_SERVER_NAME cl_motd = Cvar_Get( "cl_motd", "1", 0 ); #endif cl_timeout = Cvar_Get( "cl_timeout", "200", 0 ); cl_timeNudge = Cvar_Get( "cl_timeNudge", "0", CVAR_TEMP ); cl_shownet = Cvar_Get( "cl_shownet", "0", CVAR_TEMP ); cl_showSend = Cvar_Get( "cl_showSend", "0", CVAR_TEMP ); cl_showTimeDelta = Cvar_Get( "cl_showTimeDelta", "0", CVAR_TEMP ); cl_freezeDemo = Cvar_Get( "cl_freezeDemo", "0", CVAR_TEMP ); rcon_client_password = Cvar_Get( "rconPassword", "", CVAR_TEMP ); cl_activeAction = Cvar_Get( "activeAction", "", CVAR_TEMP ); cl_timedemo = Cvar_Get( "timedemo", "0", 0 ); cl_timedemoLog = Cvar_Get ("cl_timedemoLog", "", CVAR_ARCHIVE); cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE); cl_aviFrameRate = Cvar_Get ("cl_aviFrameRate", "25", CVAR_ARCHIVE); cl_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE); cl_avidemo = Cvar_Get( "cl_avidemo", "0", 0 ); cl_forceavidemo = Cvar_Get( "cl_forceavidemo", "0", 0 ); rconAddress = Cvar_Get( "rconAddress", "", 0 ); cl_yawspeed = Cvar_Get( "cl_yawspeed", "140", CVAR_ARCHIVE ); cl_pitchspeed = Cvar_Get( "cl_pitchspeed", "140", CVAR_ARCHIVE ); cl_anglespeedkey = Cvar_Get( "cl_anglespeedkey", "1.5", 0 ); cl_maxpackets = Cvar_Get( "cl_maxpackets", "38", CVAR_ARCHIVE ); cl_packetdup = Cvar_Get( "cl_packetdup", "1", CVAR_ARCHIVE ); cl_run = Cvar_Get( "cl_run", "1", CVAR_ARCHIVE ); cl_sensitivity = Cvar_Get( "sensitivity", "5", CVAR_ARCHIVE ); cl_mouseAccel = Cvar_Get( "cl_mouseAccel", "0", CVAR_ARCHIVE ); cl_freelook = Cvar_Get( "cl_freelook", "1", CVAR_ARCHIVE ); // 0: legacy mouse acceleration // 1: new implementation cl_mouseAccelStyle = Cvar_Get( "cl_mouseAccelStyle", "0", CVAR_ARCHIVE ); // offset for the power function (for style 1, ignored otherwise) // this should be set to the max rate value cl_mouseAccelOffset = Cvar_Get( "cl_mouseAccelOffset", "5", CVAR_ARCHIVE ); Cvar_CheckRange(cl_mouseAccelOffset, 0.001f, 50000.0f, qfalse); cl_showMouseRate = Cvar_Get( "cl_showmouserate", "0", 0 ); cl_allowDownload = Cvar_Get( "cl_allowDownload", "0", CVAR_ARCHIVE ); #ifdef USE_CURL_DLOPEN cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE); #endif // init autoswitch so the ui will have it correctly even // if the cgame hasn't been started Cvar_Get( "cg_autoswitch", "2", CVAR_ARCHIVE ); // Rafael - particle switch Cvar_Get( "cg_wolfparticles", "1", CVAR_ARCHIVE ); // done cl_conXOffset = Cvar_Get( "cl_conXOffset", "0", 0 ); cl_inGameVideo = Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE ); cl_serverStatusResendTime = Cvar_Get( "cl_serverStatusResendTime", "750", 0 ); // RF cl_recoilPitch = Cvar_Get( "cg_recoilPitch", "0", CVAR_ROM ); m_pitch = Cvar_Get( "m_pitch", "0.022", CVAR_ARCHIVE ); m_yaw = Cvar_Get( "m_yaw", "0.022", CVAR_ARCHIVE ); m_forward = Cvar_Get( "m_forward", "0.25", CVAR_ARCHIVE ); m_side = Cvar_Get( "m_side", "0.25", CVAR_ARCHIVE ); m_filter = Cvar_Get( "m_filter", "0", CVAR_ARCHIVE ); j_pitch = Cvar_Get ("j_pitch", "0.022", CVAR_ARCHIVE); j_yaw = Cvar_Get ("j_yaw", "-0.022", CVAR_ARCHIVE); j_forward = Cvar_Get ("j_forward", "-0.25", CVAR_ARCHIVE); j_side = Cvar_Get ("j_side", "0.25", CVAR_ARCHIVE); j_up = Cvar_Get ("j_up", "0", CVAR_ARCHIVE); j_pitch_axis = Cvar_Get ("j_pitch_axis", "3", CVAR_ARCHIVE); j_yaw_axis = Cvar_Get ("j_yaw_axis", "2", CVAR_ARCHIVE); j_forward_axis = Cvar_Get ("j_forward_axis", "1", CVAR_ARCHIVE); j_side_axis = Cvar_Get ("j_side_axis", "0", CVAR_ARCHIVE); j_up_axis = Cvar_Get ("j_up_axis", "4", CVAR_ARCHIVE); Cvar_CheckRange(j_pitch_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_yaw_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_forward_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_side_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); Cvar_CheckRange(j_up_axis, 0, MAX_JOYSTICK_AXIS-1, qtrue); cl_motdString = Cvar_Get( "cl_motdString", "", CVAR_ROM ); Cvar_Get( "cl_maxPing", "800", CVAR_ARCHIVE ); cl_lanForcePackets = Cvar_Get ("cl_lanForcePackets", "1", CVAR_ARCHIVE); cl_guidServerUniq = Cvar_Get ("cl_guidServerUniq", "1", CVAR_ARCHIVE); // ~ and `, as keys and characters cl_consoleKeys = Cvar_Get( "cl_consoleKeys", "~ ` 0x7e 0x60", CVAR_ARCHIVE); // userinfo Cvar_Get( "name", "WolfPlayer", CVAR_USERINFO | CVAR_ARCHIVE ); cl_rate = Cvar_Get( "rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE ); // NERVE - SMF - changed from 3000 Cvar_Get( "snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "model", "bj2", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "head", "default", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "color", "4", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "handicap", "100", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "sex", "male", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "cl_anonymous", "0", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "password", "", CVAR_USERINFO ); Cvar_Get( "cg_predictItems", "1", CVAR_USERINFO | CVAR_ARCHIVE ); #ifdef USE_MUMBLE cl_useMumble = Cvar_Get ("cl_useMumble", "0", CVAR_ARCHIVE | CVAR_LATCH); cl_mumbleScale = Cvar_Get ("cl_mumbleScale", "0.0254", CVAR_ARCHIVE); #endif #ifdef USE_VOIP cl_voipSend = Cvar_Get ("cl_voipSend", "0", 0); cl_voipSendTarget = Cvar_Get ("cl_voipSendTarget", "spatial", 0); cl_voipGainDuringCapture = Cvar_Get ("cl_voipGainDuringCapture", "0.2", CVAR_ARCHIVE); cl_voipCaptureMult = Cvar_Get ("cl_voipCaptureMult", "2.0", CVAR_ARCHIVE); cl_voipUseVAD = Cvar_Get ("cl_voipUseVAD", "0", CVAR_ARCHIVE); cl_voipVADThreshold = Cvar_Get ("cl_voipVADThreshold", "0.25", CVAR_ARCHIVE); cl_voipShowMeter = Cvar_Get ("cl_voipShowMeter", "1", CVAR_ARCHIVE); cl_voip = Cvar_Get ("cl_voip", "1", CVAR_ARCHIVE); Cvar_CheckRange( cl_voip, 0, 1, qtrue ); cl_voipProtocol = Cvar_Get ("cl_voipProtocol", cl_voip->integer ? "opus" : "", CVAR_USERINFO | CVAR_ROM); #endif //----(SA) added Cvar_Get( "cg_autoactivate", "1", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get( "cg_emptyswitch", "0", CVAR_USERINFO | CVAR_ARCHIVE ); //----(SA) end // cgame might not be initialized before menu is used Cvar_Get( "cg_viewsize", "100", CVAR_ARCHIVE ); // Make sure cg_stereoSeparation is zero as that variable is deprecated and should not be used anymore. Cvar_Get ("cg_stereoSeparation", "0", CVAR_ROM); cl_missionStats = Cvar_Get( "g_missionStats", "0", CVAR_ROM ); cl_waitForFire = Cvar_Get( "cl_waitForFire", "0", CVAR_ROM ); // NERVE - SMF - localization cl_language = Cvar_Get( "cl_language", "0", CVAR_ARCHIVE ); cl_debugTranslation = Cvar_Get( "cl_debugTranslation", "0", 0 ); // -NERVE - SMF // // register our commands // Cmd_AddCommand( "cmd", CL_ForwardToServer_f ); Cmd_AddCommand( "configstrings", CL_Configstrings_f ); Cmd_AddCommand( "clientinfo", CL_Clientinfo_f ); Cmd_AddCommand( "snd_restart", CL_Snd_Restart_f ); Cmd_AddCommand( "vid_restart", CL_Vid_Restart_f ); Cmd_AddCommand( "disconnect", CL_Disconnect_f ); Cmd_AddCommand( "record", CL_Record_f ); Cmd_AddCommand( "demo", CL_PlayDemo_f ); Cmd_SetCommandCompletionFunc( "demo", CL_CompleteDemoName ); Cmd_AddCommand( "cinematic", CL_PlayCinematic_f ); Cmd_AddCommand( "stoprecord", CL_StopRecord_f ); Cmd_AddCommand( "connect", CL_Connect_f ); Cmd_AddCommand( "reconnect", CL_Reconnect_f ); Cmd_AddCommand( "localservers", CL_LocalServers_f ); Cmd_AddCommand( "globalservers", CL_GlobalServers_f ); Cmd_AddCommand( "rcon", CL_Rcon_f ); Cmd_SetCommandCompletionFunc( "rcon", CL_CompleteRcon ); Cmd_AddCommand( "ping", CL_Ping_f ); Cmd_AddCommand( "serverstatus", CL_ServerStatus_f ); Cmd_AddCommand( "showip", CL_ShowIP_f ); Cmd_AddCommand( "fs_openedList", CL_OpenedPK3List_f ); Cmd_AddCommand( "fs_referencedList", CL_ReferencedPK3List_f ); Cmd_AddCommand ("video", CL_Video_f ); Cmd_AddCommand ("stopvideo", CL_StopVideo_f ); // Ridah, startup-caching system Cmd_AddCommand( "cache_startgather", CL_Cache_StartGather_f ); Cmd_AddCommand( "cache_usedfile", CL_Cache_UsedFile_f ); Cmd_AddCommand( "cache_setindex", CL_Cache_SetIndex_f ); Cmd_AddCommand( "cache_mapchange", CL_Cache_MapChange_f ); Cmd_AddCommand( "cache_endgather", CL_Cache_EndGather_f ); Cmd_AddCommand( "updatehunkusage", CL_UpdateLevelHunkUsage ); Cmd_AddCommand( "updatescreen", SCR_UpdateScreen ); // done. // RF, add this command so clients can't bind a key to send client damage commands to the server Cmd_AddCommand( "cld", CL_ClientDamageCommand ); Cmd_AddCommand( "startMultiplayer", CL_startMultiplayer_f ); // NERVE - SMF Cmd_AddCommand( "shellExecute", CL_ShellExecute_URL_f ); // RF, prevent users from issuing a map_restart manually Cmd_AddCommand( "map_restart", CL_MapRestart_f ); Cmd_AddCommand( "setRecommended", CL_SetRecommended_f ); CL_InitRef(); SCR_Init(); // Cbuf_Execute(); Cvar_Set( "cl_running", "1" ); CL_GenerateQKey(); Cvar_Get( "cl_guid", "", CVAR_USERINFO | CVAR_ROM ); CL_UpdateGUID( NULL, 0 ); Com_Printf( "----- Client Initialization Complete -----\n" ); }
1399
True
1
CVE-2017-6903
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
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://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'name': 'https://ioquake3.org/2017/03/13/important-security-update-please-update-ioquake3-immediately/', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'name': 'https://github.com/JACoders/OpenJK/commit/8956a35e7b91c4a0dd1fa6db1d28c7f0efbab2d7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'name': 'https://github.com/iortcw/iortcw/commit/b6ff2bcb1e4e6976d61e316175c6d7c99860fe20', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'name': 'https://github.com/iortcw/iortcw/commit/b248763e4878ef12d5835ece6600be8334f67da1', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'name': 'https://github.com/iortcw/iortcw/commit/11a83410153756ae350a82ed41b08d128ff7f998', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'name': 'https://github.com/ioquake/ioq3/commit/f61fe5f6a0419ef4a88d46a128052f2e8352e85d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'name': 'https://github.com/ioquake/ioq3/commit/b173ac05993f634a42be3d3535e1b158de0c3372', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'name': 'https://github.com/ioquake/ioq3/commit/376267d534476a875d8b9228149c4ee18b74a4fd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'name': 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857699', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2017/dsa-3812', 'name': 'DSA-3812', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ioquake3:ioquake3:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2017-02-27', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "In ioquake3 before 2017-03-14, the auto-downloading feature has insufficient content restrictions. This also affects Quake III Arena, OpenArena, OpenJK, iortcw, and other id Tech 3 (aka Quake 3 engine) forks. A malicious auto-downloaded file can trigger loading of crafted auto-downloaded files as native code DLLs. A malicious auto-downloaded file can contain configuration defaults that override the user's. Executable bytecode in a malicious auto-downloaded file can set configuration variables to values that will result in unwanted native code DLLs being loaded, resulting in sandbox escape."}]
2020-08-24T17:37Z
2017-03-14T22:59Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
MAN-AT-ARMS
2017-03-13 19:37:39-04:00
All: Don't load .pk3s as .dlls, and don't load user config files from .pk3s
b6ff2bcb1e4e6976d61e316175c6d7c99860fe20
False
iortcw/iortcw
Merge of ioquake3 features and fixes into RTCW code bases
2015-03-12 20:00:35
2022-08-18 19:29:22
iortcw
457.0
68.0
CL_InitRef
CL_InitRef( void)
['void']
void CL_InitRef( void ) { refimport_t ri; refexport_t *ret; #ifdef USE_RENDERER_DLOPEN GetRefAPI_t GetRefAPI; char dllName[MAX_OSPATH]; #endif Com_Printf( "----- Initializing Renderer ----\n" ); #ifdef USE_RENDERER_DLOPEN cl_renderer = Cvar_Get("cl_renderer", "opengl1", CVAR_ARCHIVE | CVAR_LATCH); Com_sprintf(dllName, sizeof(dllName), "renderer_sp_%s_" ARCH_STRING DLL_EXT, cl_renderer->string); if(!(rendererLib = Sys_LoadDll(dllName, qfalse)) && strcmp(cl_renderer->string, cl_renderer->resetString)) { Com_Printf("failed:\n\"%s\"\n", Sys_LibraryError()); Cvar_ForceReset("cl_renderer"); Com_sprintf(dllName, sizeof(dllName), "renderer_sp_opengl1_" ARCH_STRING DLL_EXT); rendererLib = Sys_LoadDll(dllName, qfalse); } if(!rendererLib) { Com_Printf("failed:\n\"%s\"\n", Sys_LibraryError()); Com_Error(ERR_FATAL, "Failed to load renderer"); } GetRefAPI = Sys_LoadFunction(rendererLib, "GetRefAPI"); if(!GetRefAPI) { Com_Error(ERR_FATAL, "Can't load symbol GetRefAPI: '%s'", Sys_LibraryError()); } #endif ri.Cmd_AddCommand = Cmd_AddCommand; ri.Cmd_RemoveCommand = Cmd_RemoveCommand; ri.Cmd_Argc = Cmd_Argc; ri.Cmd_Argv = Cmd_Argv; ri.Cmd_ExecuteText = Cbuf_ExecuteText; ri.Printf = CL_RefPrintf; ri.Error = Com_Error; ri.Milliseconds = CL_ScaledMilliseconds; ri.Z_Malloc = Z_Malloc; ri.Free = Z_Free; ri.Hunk_Clear = Hunk_ClearToMark; #ifdef HUNK_DEBUG ri.Hunk_AllocDebug = Hunk_AllocDebug; #else ri.Hunk_Alloc = Hunk_Alloc; #endif ri.Hunk_AllocateTempMemory = Hunk_AllocateTempMemory; ri.Hunk_FreeTempMemory = Hunk_FreeTempMemory; ri.CM_ClusterPVS = CM_ClusterPVS; ri.CM_DrawDebugSurface = CM_DrawDebugSurface; ri.FS_ReadFile = FS_ReadFile; ri.FS_FreeFile = FS_FreeFile; ri.FS_WriteFile = FS_WriteFile; ri.FS_FreeFileList = FS_FreeFileList; ri.FS_ListFiles = FS_ListFiles; ri.FS_FileIsInPAK = FS_FileIsInPAK; ri.FS_FileExists = FS_FileExists; ri.Cvar_Get = Cvar_Get; ri.Cvar_Set = Cvar_Set; ri.Cvar_SetValue = Cvar_SetValue; ri.Cvar_CheckRange = Cvar_CheckRange; ri.Cvar_VariableIntegerValue = Cvar_VariableIntegerValue; // cinematic stuff ri.CIN_UploadCinematic = CIN_UploadCinematic; ri.CIN_PlayCinematic = CIN_PlayCinematic; ri.CIN_RunCinematic = CIN_RunCinematic; ri.CL_WriteAVIVideoFrame = CL_WriteAVIVideoFrame; ri.IN_Init = IN_Init; ri.IN_Shutdown = IN_Shutdown; ri.IN_Restart = IN_Restart; ri.ftol = Q_ftol; ri.Sys_SetEnv = Sys_SetEnv; ri.Sys_GLimpSafeInit = Sys_GLimpSafeInit; ri.Sys_GLimpInit = Sys_GLimpInit; ri.Sys_LowPhysicalMemory = Sys_LowPhysicalMemory; ret = GetRefAPI( REF_API_VERSION, &ri ); if ( !ret ) { Com_Error( ERR_FATAL, "Couldn't initialize refresh" ); } re = *ret; Com_Printf( "---- Renderer Initialization Complete ----\n" ); // unpause so the cgame definately gets a snapshot and renders a frame Cvar_Set( "cl_paused", "0" ); }
459
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
BuildTestPacket
BuildTestPacket( uint16_t id , uint16_t off , int mf , const char content , int content_len)
['id', 'off', 'mf', 'content', 'content_len']
BuildTestPacket(uint16_t id, uint16_t off, int mf, const char content, int content_len) { Packet *p = NULL; int hlen = 20; int ttl = 64; uint8_t *pcontent; IPV4Hdr ip4h; p = SCCalloc(1, sizeof(*p) + default_packet_size); if (unlikely(p == NULL)) return NULL; PACKET_INITIALIZE(p); gettimeofday(&p->ts, NULL); //p->ip4h = (IPV4Hdr *)GET_PKT_DATA(p); ip4h.ip_verhl = 4 << 4; ip4h.ip_verhl |= hlen >> 2; ip4h.ip_len = htons(hlen + content_len); ip4h.ip_id = htons(id); ip4h.ip_off = htons(off); if (mf) ip4h.ip_off = htons(IP_MF | off); else ip4h.ip_off = htons(off); ip4h.ip_ttl = ttl; ip4h.ip_proto = IPPROTO_ICMP; ip4h.s_ip_src.s_addr = 0x01010101; /* 1.1.1.1 */ ip4h.s_ip_dst.s_addr = 0x02020202; /* 2.2.2.2 */ /* copy content_len crap, we need full length */ PacketCopyData(p, (uint8_t *)&ip4h, sizeof(ip4h)); p->ip4h = (IPV4Hdr *)GET_PKT_DATA(p); SET_IPV4_SRC_ADDR(p, &p->src); SET_IPV4_DST_ADDR(p, &p->dst); pcontent = SCCalloc(1, content_len); if (unlikely(pcontent == NULL)) return NULL; memset(pcontent, content, content_len); PacketCopyDataOffset(p, hlen, pcontent, content_len); SET_PKT_LEN(p, hlen + content_len); SCFree(pcontent); p->ip4h->ip_csum = IPV4CalculateChecksum((uint16_t *)GET_PKT_DATA(p), hlen); /* Self test. */ if (IPV4_GET_VER(p) != 4) goto error; if (IPV4_GET_HLEN(p) != hlen) goto error; if (IPV4_GET_IPLEN(p) != hlen + content_len) goto error; if (IPV4_GET_IPID(p) != id) goto error; if (IPV4_GET_IPOFFSET(p) != off) goto error; if (IPV4_GET_MF(p) != mf) goto error; if (IPV4_GET_IPTTL(p) != ttl) goto error; if (IPV4_GET_IPPROTO(p) != IPPROTO_ICMP) goto error; return p; error: if (p != NULL) SCFree(p); return NULL; }
427
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragDoSturgesNovakTest
DefragDoSturgesNovakTest( int policy , u_char * expected , size_t expected_len)
['policy', 'expected', 'expected_len']
DefragDoSturgesNovakTest(int policy, u_char *expected, size_t expected_len) { int i; int ret = 0; DefragInit(); /* * Build the packets. */ int id = 1; Packet *packets[17]; memset(packets, 0x00, sizeof(packets)); /* * Original fragments. */ /* A*24 at 0. */ packets[0] = BuildTestPacket(id, 0, 1, 'A', 24); /* B*15 at 32. */ packets[1] = BuildTestPacket(id, 32 >> 3, 1, 'B', 16); /* C*24 at 48. */ packets[2] = BuildTestPacket(id, 48 >> 3, 1, 'C', 24); /* D*8 at 80. */ packets[3] = BuildTestPacket(id, 80 >> 3, 1, 'D', 8); /* E*16 at 104. */ packets[4] = BuildTestPacket(id, 104 >> 3, 1, 'E', 16); /* F*24 at 120. */ packets[5] = BuildTestPacket(id, 120 >> 3, 1, 'F', 24); /* G*16 at 144. */ packets[6] = BuildTestPacket(id, 144 >> 3, 1, 'G', 16); /* H*16 at 160. */ packets[7] = BuildTestPacket(id, 160 >> 3, 1, 'H', 16); /* I*8 at 176. */ packets[8] = BuildTestPacket(id, 176 >> 3, 1, 'I', 8); /* * Overlapping subsequent fragments. */ /* J*32 at 8. */ packets[9] = BuildTestPacket(id, 8 >> 3, 1, 'J', 32); /* K*24 at 48. */ packets[10] = BuildTestPacket(id, 48 >> 3, 1, 'K', 24); /* L*24 at 72. */ packets[11] = BuildTestPacket(id, 72 >> 3, 1, 'L', 24); /* M*24 at 96. */ packets[12] = BuildTestPacket(id, 96 >> 3, 1, 'M', 24); /* N*8 at 128. */ packets[13] = BuildTestPacket(id, 128 >> 3, 1, 'N', 8); /* O*8 at 152. */ packets[14] = BuildTestPacket(id, 152 >> 3, 1, 'O', 8); /* P*8 at 160. */ packets[15] = BuildTestPacket(id, 160 >> 3, 1, 'P', 8); /* Q*16 at 176. */ packets[16] = BuildTestPacket(id, 176 >> 3, 0, 'Q', 16); default_policy = policy; /* Send all but the last. */ for (i = 0; i < 9; i++) { Packet *tp = Defrag(NULL, NULL, packets[i], NULL); if (tp != NULL) { SCFree(tp); goto end; } if (ENGINE_ISSET_EVENT(packets[i], IPV4_FRAG_OVERLAP)) { goto end; } } int overlap = 0; for (; i < 16; i++) { Packet *tp = Defrag(NULL, NULL, packets[i], NULL); if (tp != NULL) { SCFree(tp); goto end; } if (ENGINE_ISSET_EVENT(packets[i], IPV4_FRAG_OVERLAP)) { overlap++; } } if (!overlap) { goto end; } /* And now the last one. */ Packet *reassembled = Defrag(NULL, NULL, packets[16], NULL); if (reassembled == NULL) { goto end; } if (IPV4_GET_HLEN(reassembled) != 20) { goto end; } if (IPV4_GET_IPLEN(reassembled) != 20 + 192) { goto end; } if (memcmp(GET_PKT_DATA(reassembled) + 20, expected, expected_len) != 0) { goto end; } SCFree(reassembled); /* Make sure all frags were returned back to the pool. */ if (defrag_context->frag_pool->outstanding != 0) { goto end; } ret = 1; end: for (i = 0; i < 17; i++) { SCFree(packets[i]); } DefragDestroy(); return ret; }
690
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragIPv4NoDataTest
DefragIPv4NoDataTest( void)
['void']
DefragIPv4NoDataTest(void) { DefragContext *dc = NULL; Packet *p = NULL; int id = 12; int ret = 0; DefragInit(); dc = DefragContextNew(); if (dc == NULL) goto end; /* This packet has an offset > 0, more frags set to 0 and no data. */ p = BuildTestPacket(id, 1, 0, 'A', 0); if (p == NULL) goto end; /* We do not expect a packet returned. */ if (Defrag(NULL, NULL, p, NULL) != NULL) goto end; /* The fragment should have been ignored so no fragments should * have been allocated from the pool. */ if (dc->frag_pool->outstanding != 0) return 0; ret = 1; end: if (dc != NULL) DefragContextDestroy(dc); if (p != NULL) SCFree(p); DefragDestroy(); return ret; }
137
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragIPv4TooLargeTest
DefragIPv4TooLargeTest( void)
['void']
DefragIPv4TooLargeTest(void) { DefragContext *dc = NULL; Packet *p = NULL; int ret = 0; DefragInit(); dc = DefragContextNew(); if (dc == NULL) goto end; /* Create a fragment that would extend past the max allowable size * for an IPv4 packet. */ p = BuildTestPacket(1, 8183, 0, 'A', 71); if (p == NULL) goto end; /* We do not expect a packet returned. */ if (Defrag(NULL, NULL, p, NULL) != NULL) goto end; if (!ENGINE_ISSET_EVENT(p, IPV4_FRAG_PKT_TOO_LARGE)) goto end; /* The fragment should have been ignored so no fragments should have * been allocated from the pool. */ if (dc->frag_pool->outstanding != 0) return 0; ret = 1; end: if (dc != NULL) DefragContextDestroy(dc); if (p != NULL) SCFree(p); DefragDestroy(); return ret; }
145
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragInOrderSimpleTest
DefragInOrderSimpleTest( void)
['void']
DefragInOrderSimpleTest(void) { Packet *p1 = NULL, *p2 = NULL, *p3 = NULL; Packet *reassembled = NULL; int id = 12; int i; int ret = 0; DefragInit(); p1 = BuildTestPacket(id, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = BuildTestPacket(id, 1, 1, 'B', 8); if (p2 == NULL) goto end; p3 = BuildTestPacket(id, 2, 0, 'C', 3); if (p3 == NULL) goto end; if (Defrag(NULL, NULL, p1, NULL) != NULL) goto end; if (Defrag(NULL, NULL, p2, NULL) != NULL) goto end; reassembled = Defrag(NULL, NULL, p3, NULL); if (reassembled == NULL) { goto end; } if (IPV4_GET_HLEN(reassembled) != 20) { goto end; } if (IPV4_GET_IPLEN(reassembled) != 39) { goto end; } /* 20 bytes in we should find 8 bytes of A. */ for (i = 20; i < 20 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'A') { goto end; } } /* 28 bytes in we should find 8 bytes of B. */ for (i = 28; i < 28 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'B') { goto end; } } /* And 36 bytes in we should find 3 bytes of C. */ for (i = 36; i < 36 + 3; i++) { if (GET_PKT_DATA(reassembled)[i] != 'C') goto end; } ret = 1; end: if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); if (p3 != NULL) SCFree(p3); if (reassembled != NULL) SCFree(reassembled); DefragDestroy(); return ret; }
362
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragMfIpv4Test
DefragMfIpv4Test( void)
['void']
static int DefragMfIpv4Test(void) { int retval = 0; int ip_id = 9; Packet *p = NULL; DefragInit(); Packet *p1 = BuildTestPacket(ip_id, 2, 1, 'C', 8); Packet *p2 = BuildTestPacket(ip_id, 0, 1, 'A', 8); Packet *p3 = BuildTestPacket(ip_id, 1, 0, 'B', 8); if (p1 == NULL || p2 == NULL || p3 == NULL) { goto end; } p = Defrag(NULL, NULL, p1, NULL); if (p != NULL) { goto end; } p = Defrag(NULL, NULL, p2, NULL); if (p != NULL) { goto end; } /* This should return a packet as MF=0. */ p = Defrag(NULL, NULL, p3, NULL); if (p == NULL) { goto end; } /* Expected IP length is 20 + 8 + 8 = 36 as only 2 of the * fragments should be in the re-assembled packet. */ if (IPV4_GET_IPLEN(p) != 36) { goto end; } retval = 1; end: if (p1 != NULL) { SCFree(p1); } if (p2 != NULL) { SCFree(p2); } if (p3 != NULL) { SCFree(p3); } if (p != NULL) { SCFree(p); } DefragDestroy(); return retval; }
247
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragMfIpv6Test
DefragMfIpv6Test( void)
['void']
static int DefragMfIpv6Test(void) { int retval = 0; int ip_id = 9; Packet *p = NULL; DefragInit(); Packet *p1 = IPV6BuildTestPacket(ip_id, 2, 1, 'C', 8); Packet *p2 = IPV6BuildTestPacket(ip_id, 0, 1, 'A', 8); Packet *p3 = IPV6BuildTestPacket(ip_id, 1, 0, 'B', 8); if (p1 == NULL || p2 == NULL || p3 == NULL) { goto end; } p = Defrag(NULL, NULL, p1, NULL); if (p != NULL) { goto end; } p = Defrag(NULL, NULL, p2, NULL); if (p != NULL) { goto end; } /* This should return a packet as MF=0. */ p = Defrag(NULL, NULL, p3, NULL); if (p == NULL) { goto end; } /* For IPv6 the expected length is just the length of the payload * of 2 fragments, so 16. */ if (IPV6_GET_PLEN(p) != 16) { goto end; } retval = 1; end: if (p1 != NULL) { SCFree(p1); } if (p2 != NULL) { SCFree(p2); } if (p3 != NULL) { SCFree(p3); } if (p != NULL) { SCFree(p); } DefragDestroy(); return retval; }
247
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragReverseSimpleTest
DefragReverseSimpleTest( void)
['void']
DefragReverseSimpleTest(void) { Packet *p1 = NULL, *p2 = NULL, *p3 = NULL; Packet *reassembled = NULL; int id = 12; int i; int ret = 0; DefragInit(); p1 = BuildTestPacket(id, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = BuildTestPacket(id, 1, 1, 'B', 8); if (p2 == NULL) goto end; p3 = BuildTestPacket(id, 2, 0, 'C', 3); if (p3 == NULL) goto end; if (Defrag(NULL, NULL, p3, NULL) != NULL) goto end; if (Defrag(NULL, NULL, p2, NULL) != NULL) goto end; reassembled = Defrag(NULL, NULL, p1, NULL); if (reassembled == NULL) goto end; if (IPV4_GET_HLEN(reassembled) != 20) goto end; if (IPV4_GET_IPLEN(reassembled) != 39) goto end; /* 20 bytes in we should find 8 bytes of A. */ for (i = 20; i < 20 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'A') goto end; } /* 28 bytes in we should find 8 bytes of B. */ for (i = 28; i < 28 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'B') goto end; } /* And 36 bytes in we should find 3 bytes of C. */ for (i = 36; i < 36 + 3; i++) { if (GET_PKT_DATA(reassembled)[i] != 'C') goto end; } ret = 1; end: if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); if (p3 != NULL) SCFree(p3); if (reassembled != NULL) SCFree(reassembled); DefragDestroy(); return ret; }
352
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragTimeoutTest
DefragTimeoutTest( void)
['void']
DefragTimeoutTest(void) { int i; int ret = 0; /* Setup a small numberr of trackers. */ if (ConfSet("defrag.trackers", "16") != 1) { printf("ConfSet failed: "); goto end; } DefragInit(); /* Load in 16 packets. */ for (i = 0; i < 16; i++) { Packet *p = BuildTestPacket(i, 0, 1, 'A' + i, 16); if (p == NULL) goto end; Packet *tp = Defrag(NULL, NULL, p, NULL); SCFree(p); if (tp != NULL) { SCFree(tp); goto end; } } /* Build a new packet but push the timestamp out by our timeout. * This should force our previous fragments to be timed out. */ Packet *p = BuildTestPacket(99, 0, 1, 'A' + i, 16); if (p == NULL) goto end; p->ts.tv_sec += (defrag_context->timeout + 1); Packet *tp = Defrag(NULL, NULL, p, NULL); if (tp != NULL) { SCFree(tp); goto end; } DefragTracker *tracker = DefragLookupTrackerFromHash(p); if (tracker == NULL) goto end; if (tracker->id != 99) goto end; SCFree(p); ret = 1; end: DefragDestroy(); return ret; }
238
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragTrackerReuseTest
DefragTrackerReuseTest( void)
['void']
static int DefragTrackerReuseTest(void) { int ret = 0; int id = 1; Packet *p1 = NULL; DefragTracker *tracker1 = NULL, *tracker2 = NULL; DefragInit(); /* Build a packet, its not a fragment but shouldn't matter for * this test. */ p1 = BuildTestPacket(id, 0, 0, 'A', 8); if (p1 == NULL) { goto end; } /* Get a tracker. It shouldn't look like its already in use. */ tracker1 = DefragGetTracker(NULL, NULL, p1); if (tracker1 == NULL) { goto end; } if (tracker1->seen_last) { goto end; } if (tracker1->remove) { goto end; } DefragTrackerRelease(tracker1); /* Get a tracker again, it should be the same one. */ tracker2 = DefragGetTracker(NULL, NULL, p1); if (tracker2 == NULL) { goto end; } if (tracker2 != tracker1) { goto end; } DefragTrackerRelease(tracker1); /* Now mark the tracker for removal. It should not be returned * when we get a tracker for a packet that may have the same * attributes. */ tracker1->remove = 1; tracker2 = DefragGetTracker(NULL, NULL, p1); if (tracker2 == NULL) { goto end; } if (tracker2 == tracker1) { goto end; } if (tracker2->remove) { goto end; } ret = 1; end: if (p1 != NULL) { SCFree(p1); } DefragDestroy(); return ret; }
226
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragVlanQinQTest
DefragVlanQinQTest( void)
['void']
DefragVlanQinQTest(void) { Packet *p1 = NULL, *p2 = NULL, *r = NULL; int ret = 0; DefragInit(); p1 = BuildTestPacket(1, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = BuildTestPacket(1, 1, 0, 'B', 8); if (p2 == NULL) goto end; /* With no VLAN IDs set, packets should re-assemble. */ if ((r = Defrag(NULL, NULL, p1, NULL)) != NULL) goto end; if ((r = Defrag(NULL, NULL, p2, NULL)) == NULL) goto end; SCFree(r); /* With mismatched VLANs, packets should not re-assemble. */ p1->vlan_id[0] = 1; p2->vlan_id[0] = 1; p1->vlan_id[1] = 1; p2->vlan_id[1] = 2; if ((r = Defrag(NULL, NULL, p1, NULL)) != NULL) goto end; if ((r = Defrag(NULL, NULL, p2, NULL)) != NULL) goto end; /* Pass. */ ret = 1; end: if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); DefragDestroy(); return ret; }
243
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
DefragVlanTest
DefragVlanTest( void)
['void']
DefragVlanTest(void) { Packet *p1 = NULL, *p2 = NULL, *r = NULL; int ret = 0; DefragInit(); p1 = BuildTestPacket(1, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = BuildTestPacket(1, 1, 0, 'B', 8); if (p2 == NULL) goto end; /* With no VLAN IDs set, packets should re-assemble. */ if ((r = Defrag(NULL, NULL, p1, NULL)) != NULL) goto end; if ((r = Defrag(NULL, NULL, p2, NULL)) == NULL) goto end; SCFree(r); /* With mismatched VLANs, packets should not re-assemble. */ p1->vlan_id[0] = 1; p2->vlan_id[0] = 2; if ((r = Defrag(NULL, NULL, p1, NULL)) != NULL) goto end; if ((r = Defrag(NULL, NULL, p2, NULL)) != NULL) goto end; /* Pass. */ ret = 1; end: if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); DefragDestroy(); return ret; }
225
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
IPV6BuildTestPacket
IPV6BuildTestPacket( uint32_t id , uint16_t off , int mf , const char content , int content_len)
['id', 'off', 'mf', 'content', 'content_len']
IPV6BuildTestPacket(uint32_t id, uint16_t off, int mf, const char content, int content_len) { Packet *p = NULL; uint8_t *pcontent; IPV6Hdr ip6h; p = SCCalloc(1, sizeof(*p) + default_packet_size); if (unlikely(p == NULL)) return NULL; PACKET_INITIALIZE(p); gettimeofday(&p->ts, NULL); ip6h.s_ip6_nxt = 44; ip6h.s_ip6_hlim = 2; /* Source and dest address - very bogus addresses. */ ip6h.s_ip6_src[0] = 0x01010101; ip6h.s_ip6_src[1] = 0x01010101; ip6h.s_ip6_src[2] = 0x01010101; ip6h.s_ip6_src[3] = 0x01010101; ip6h.s_ip6_dst[0] = 0x02020202; ip6h.s_ip6_dst[1] = 0x02020202; ip6h.s_ip6_dst[2] = 0x02020202; ip6h.s_ip6_dst[3] = 0x02020202; /* copy content_len crap, we need full length */ PacketCopyData(p, (uint8_t *)&ip6h, sizeof(IPV6Hdr)); p->ip6h = (IPV6Hdr *)GET_PKT_DATA(p); IPV6_SET_RAW_VER(p->ip6h, 6); /* Fragmentation header. */ IPV6FragHdr *fh = (IPV6FragHdr *)(GET_PKT_DATA(p) + sizeof(IPV6Hdr)); fh->ip6fh_nxt = IPPROTO_ICMP; fh->ip6fh_ident = htonl(id); fh->ip6fh_offlg = htons((off << 3) | mf); DecodeIPV6FragHeader(p, (uint8_t *)fh, 8, 8 + content_len, 0); pcontent = SCCalloc(1, content_len); if (unlikely(pcontent == NULL)) return NULL; memset(pcontent, content, content_len); PacketCopyDataOffset(p, sizeof(IPV6Hdr) + sizeof(IPV6FragHdr), pcontent, content_len); SET_PKT_LEN(p, sizeof(IPV6Hdr) + sizeof(IPV6FragHdr) + content_len); SCFree(pcontent); p->ip6h->s_ip6_plen = htons(sizeof(IPV6FragHdr) + content_len); SET_IPV6_SRC_ADDR(p, &p->src); SET_IPV6_DST_ADDR(p, &p->dst); /* Self test. */ if (IPV6_GET_VER(p) != 6) goto error; if (IPV6_GET_NH(p) != 44) goto error; if (IPV6_GET_PLEN(p) != sizeof(IPV6FragHdr) + content_len) goto error; return p; error: fprintf(stderr, "Error building test packet.\n"); if (p != NULL) SCFree(p); return NULL; }
442
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
IPV6DefragDoSturgesNovakTest
IPV6DefragDoSturgesNovakTest( int policy , u_char * expected , size_t expected_len)
['policy', 'expected', 'expected_len']
IPV6DefragDoSturgesNovakTest(int policy, u_char *expected, size_t expected_len) { int i; int ret = 0; DefragInit(); /* * Build the packets. */ int id = 1; Packet *packets[17]; memset(packets, 0x00, sizeof(packets)); /* * Original fragments. */ /* A*24 at 0. */ packets[0] = IPV6BuildTestPacket(id, 0, 1, 'A', 24); /* B*15 at 32. */ packets[1] = IPV6BuildTestPacket(id, 32 >> 3, 1, 'B', 16); /* C*24 at 48. */ packets[2] = IPV6BuildTestPacket(id, 48 >> 3, 1, 'C', 24); /* D*8 at 80. */ packets[3] = IPV6BuildTestPacket(id, 80 >> 3, 1, 'D', 8); /* E*16 at 104. */ packets[4] = IPV6BuildTestPacket(id, 104 >> 3, 1, 'E', 16); /* F*24 at 120. */ packets[5] = IPV6BuildTestPacket(id, 120 >> 3, 1, 'F', 24); /* G*16 at 144. */ packets[6] = IPV6BuildTestPacket(id, 144 >> 3, 1, 'G', 16); /* H*16 at 160. */ packets[7] = IPV6BuildTestPacket(id, 160 >> 3, 1, 'H', 16); /* I*8 at 176. */ packets[8] = IPV6BuildTestPacket(id, 176 >> 3, 1, 'I', 8); /* * Overlapping subsequent fragments. */ /* J*32 at 8. */ packets[9] = IPV6BuildTestPacket(id, 8 >> 3, 1, 'J', 32); /* K*24 at 48. */ packets[10] = IPV6BuildTestPacket(id, 48 >> 3, 1, 'K', 24); /* L*24 at 72. */ packets[11] = IPV6BuildTestPacket(id, 72 >> 3, 1, 'L', 24); /* M*24 at 96. */ packets[12] = IPV6BuildTestPacket(id, 96 >> 3, 1, 'M', 24); /* N*8 at 128. */ packets[13] = IPV6BuildTestPacket(id, 128 >> 3, 1, 'N', 8); /* O*8 at 152. */ packets[14] = IPV6BuildTestPacket(id, 152 >> 3, 1, 'O', 8); /* P*8 at 160. */ packets[15] = IPV6BuildTestPacket(id, 160 >> 3, 1, 'P', 8); /* Q*16 at 176. */ packets[16] = IPV6BuildTestPacket(id, 176 >> 3, 0, 'Q', 16); default_policy = policy; /* Send all but the last. */ for (i = 0; i < 9; i++) { Packet *tp = Defrag(NULL, NULL, packets[i], NULL); if (tp != NULL) { SCFree(tp); goto end; } if (ENGINE_ISSET_EVENT(packets[i], IPV6_FRAG_OVERLAP)) { goto end; } } int overlap = 0; for (; i < 16; i++) { Packet *tp = Defrag(NULL, NULL, packets[i], NULL); if (tp != NULL) { SCFree(tp); goto end; } if (ENGINE_ISSET_EVENT(packets[i], IPV6_FRAG_OVERLAP)) { overlap++; } } if (!overlap) goto end; /* And now the last one. */ Packet *reassembled = Defrag(NULL, NULL, packets[16], NULL); if (reassembled == NULL) goto end; if (memcmp(GET_PKT_DATA(reassembled) + 40, expected, expected_len) != 0) goto end; if (IPV6_GET_PLEN(reassembled) != 192) goto end; SCFree(reassembled); /* Make sure all frags were returned to the pool. */ if (defrag_context->frag_pool->outstanding != 0) { printf("defrag_context->frag_pool->outstanding %u: ", defrag_context->frag_pool->outstanding); goto end; } ret = 1; end: for (i = 0; i < 17; i++) { SCFree(packets[i]); } DefragDestroy(); return ret; }
677
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
IPV6DefragInOrderSimpleTest
IPV6DefragInOrderSimpleTest( void)
['void']
IPV6DefragInOrderSimpleTest(void) { Packet *p1 = NULL, *p2 = NULL, *p3 = NULL; Packet *reassembled = NULL; int id = 12; int i; int ret = 0; DefragInit(); p1 = IPV6BuildTestPacket(id, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = IPV6BuildTestPacket(id, 1, 1, 'B', 8); if (p2 == NULL) goto end; p3 = IPV6BuildTestPacket(id, 2, 0, 'C', 3); if (p3 == NULL) goto end; if (Defrag(NULL, NULL, p1, NULL) != NULL) goto end; if (Defrag(NULL, NULL, p2, NULL) != NULL) goto end; reassembled = Defrag(NULL, NULL, p3, NULL); if (reassembled == NULL) goto end; if (IPV6_GET_PLEN(reassembled) != 19) goto end; /* 40 bytes in we should find 8 bytes of A. */ for (i = 40; i < 40 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'A') goto end; } /* 28 bytes in we should find 8 bytes of B. */ for (i = 48; i < 48 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'B') goto end; } /* And 36 bytes in we should find 3 bytes of C. */ for (i = 56; i < 56 + 3; i++) { if (GET_PKT_DATA(reassembled)[i] != 'C') goto end; } ret = 1; end: if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); if (p3 != NULL) SCFree(p3); if (reassembled != NULL) SCFree(reassembled); DefragDestroy(); return ret; }
340
True
1
CVE-2017-7177
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://redmine.openinfosecfoundation.org/issues/2019', 'name': 'https://redmine.openinfosecfoundation.org/issues/2019', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'name': 'https://github.com/inliniac/suricata/commit/4a04f814b15762eb446a5ead4d69d021512df6f8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97047', 'name': '97047', 'refsource': 'BID', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/12/msg00000.html', 'name': '[debian-lts-announce] 20181204 [SECURITY] [DLA 1603-1] suricata security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-358'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openinfosecfoundation:suricata:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Suricata before 3.2.1 has an IPv4 defragmentation evasion issue caused by lack of a check for the IP protocol during fragment matching.'}]
2018-12-05T11:29Z
2017-03-18T20:59Z
Improperly Implemented Security Check for Standard
The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.
https://cwe.mitre.org/data/definitions/358.html
0
Jason Ish
2017-02-05 07:57:54-06:00
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
4a04f814b15762eb446a5ead4d69d021512df6f8
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
inliniac
visit repo url
visit repo url
IPV6DefragReverseSimpleTest
IPV6DefragReverseSimpleTest( void)
['void']
IPV6DefragReverseSimpleTest(void) { DefragContext *dc = NULL; Packet *p1 = NULL, *p2 = NULL, *p3 = NULL; Packet *reassembled = NULL; int id = 12; int i; int ret = 0; DefragInit(); dc = DefragContextNew(); if (dc == NULL) goto end; p1 = IPV6BuildTestPacket(id, 0, 1, 'A', 8); if (p1 == NULL) goto end; p2 = IPV6BuildTestPacket(id, 1, 1, 'B', 8); if (p2 == NULL) goto end; p3 = IPV6BuildTestPacket(id, 2, 0, 'C', 3); if (p3 == NULL) goto end; if (Defrag(NULL, NULL, p3, NULL) != NULL) goto end; if (Defrag(NULL, NULL, p2, NULL) != NULL) goto end; reassembled = Defrag(NULL, NULL, p1, NULL); if (reassembled == NULL) goto end; /* 40 bytes in we should find 8 bytes of A. */ for (i = 40; i < 40 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'A') goto end; } /* 28 bytes in we should find 8 bytes of B. */ for (i = 48; i < 48 + 8; i++) { if (GET_PKT_DATA(reassembled)[i] != 'B') goto end; } /* And 36 bytes in we should find 3 bytes of C. */ for (i = 56; i < 56 + 3; i++) { if (GET_PKT_DATA(reassembled)[i] != 'C') goto end; } ret = 1; end: if (dc != NULL) DefragContextDestroy(dc); if (p1 != NULL) SCFree(p1); if (p2 != NULL) SCFree(p2); if (p3 != NULL) SCFree(p3); if (reassembled != NULL) SCFree(reassembled); DefragDestroy(); return ret; }
360
True
1
CVE-2019-12951
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
False
[{'url': 'https://github.com/cesanta/mongoose/commit/b3e0f780c34cea88f057a62213c012aa88fe2deb', 'name': 'https://github.com/cesanta/mongoose/commit/b3e0f780c34cea88f057a62213c012aa88fe2deb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/cesanta/mongoose/releases/tag/6.15', 'name': 'https://github.com/cesanta/mongoose/releases/tag/6.15', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*', 'versionEndExcluding': '6.15', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'An issue was discovered in Mongoose before 6.15. The parse_mqtt() function in mg_mqtt.c has a critical heap-based buffer overflow.'}]
2020-08-24T17:37Z
2019-06-24T23:15Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
Sergey Lyubka
2019-06-13 08:58:26+01:00
Fix heap-based overflow in parse_mqtt PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
b3e0f780c34cea88f057a62213c012aa88fe2deb
False
cesanta/mongoose
Embedded Web Server
2012-08-14 15:09:51
2022-08-27 16:15:14
https://mongoose.ws
cesanta
8677.0
2389.0
parse_mqtt
parse_mqtt( struct mbuf * io , struct mg_mqtt_message * mm)
['io', 'mm']
MG_INTERNAL int parse_mqtt(struct mbuf *io, struct mg_mqtt_message *mm) { uint8_t header; size_t len = 0, len_len = 0; const char *p, *end; unsigned char lc = 0; int cmd; if (io->len < 2) return MG_MQTT_ERROR_INCOMPLETE_MSG; header = io->buf[0]; cmd = header >> 4; /* decode mqtt variable length */ len = len_len = 0; p = io->buf + 1; while ((size_t)(p - io->buf) < io->len) { lc = *((const unsigned char *) p++); len += (lc & 0x7f) << 7 * len_len; len_len++; if (!(lc & 0x80)) break; if (len_len > 4) return MG_MQTT_ERROR_MALFORMED_MSG; } end = p + len; if (lc & 0x80 || len > (io->len - (p - io->buf))) { return MG_MQTT_ERROR_INCOMPLETE_MSG; } mm->cmd = cmd; mm->qos = MG_MQTT_GET_QOS(header); switch (cmd) { case MG_MQTT_CMD_CONNECT: { p = scanto(p, &mm->protocol_name); if (p > end - 4) return MG_MQTT_ERROR_MALFORMED_MSG; mm->protocol_version = *(uint8_t *) p++; mm->connect_flags = *(uint8_t *) p++; mm->keep_alive_timer = getu16(p); p += 2; if (p >= end) return MG_MQTT_ERROR_MALFORMED_MSG; p = scanto(p, &mm->client_id); if (p > end) return MG_MQTT_ERROR_MALFORMED_MSG; if (mm->connect_flags & MG_MQTT_HAS_WILL) { if (p >= end) return MG_MQTT_ERROR_MALFORMED_MSG; p = scanto(p, &mm->will_topic); } if (mm->connect_flags & MG_MQTT_HAS_WILL) { if (p >= end) return MG_MQTT_ERROR_MALFORMED_MSG; p = scanto(p, &mm->will_message); } if (mm->connect_flags & MG_MQTT_HAS_USER_NAME) { if (p >= end) return MG_MQTT_ERROR_MALFORMED_MSG; p = scanto(p, &mm->user_name); } if (mm->connect_flags & MG_MQTT_HAS_PASSWORD) { if (p >= end) return MG_MQTT_ERROR_MALFORMED_MSG; p = scanto(p, &mm->password); } if (p != end) return MG_MQTT_ERROR_MALFORMED_MSG; LOG(LL_DEBUG, ("%d %2x %d proto [%.*s] client_id [%.*s] will_topic [%.*s] " "will_msg [%.*s] user_name [%.*s] password [%.*s]", (int) len, (int) mm->connect_flags, (int) mm->keep_alive_timer, (int) mm->protocol_name.len, mm->protocol_name.p, (int) mm->client_id.len, mm->client_id.p, (int) mm->will_topic.len, mm->will_topic.p, (int) mm->will_message.len, mm->will_message.p, (int) mm->user_name.len, mm->user_name.p, (int) mm->password.len, mm->password.p)); break; } case MG_MQTT_CMD_CONNACK: if (end - p < 2) return MG_MQTT_ERROR_MALFORMED_MSG; mm->connack_ret_code = p[1]; break; case MG_MQTT_CMD_PUBACK: case MG_MQTT_CMD_PUBREC: case MG_MQTT_CMD_PUBREL: case MG_MQTT_CMD_PUBCOMP: case MG_MQTT_CMD_SUBACK: mm->message_id = getu16(p); break; case MG_MQTT_CMD_PUBLISH: { p = scanto(p, &mm->topic); if (p > end) return MG_MQTT_ERROR_MALFORMED_MSG; if (mm->qos > 0) { if (end - p < 2) return MG_MQTT_ERROR_MALFORMED_MSG; mm->message_id = getu16(p); p += 2; } mm->payload.p = p; mm->payload.len = end - p; break; } case MG_MQTT_CMD_SUBSCRIBE: if (end - p < 2) return MG_MQTT_ERROR_MALFORMED_MSG; mm->message_id = getu16(p); p += 2; /* * topic expressions are left in the payload and can be parsed with * `mg_mqtt_next_subscribe_topic` */ mm->payload.p = p; mm->payload.len = end - p; break; default: /* Unhandled command */ break; } mm->len = end - io->buf; return mm->len; }
753
True
1
CVE-2022-25299
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
False
[{'url': 'https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-552'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*', 'versionEndExcluding': '7.6', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.'}]
2022-02-28T17:10Z
2022-02-18T13:15Z
Files or Directories Accessible to External Parties
The product makes files or directories accessible to unauthorized actors, even though they should not be.
Web servers, FTP servers, and similar servers may store a set of files underneath a "root" directory that is accessible to the server's users. Applications may store sensitive files underneath this root without also using access control to limit which users may request those files, if any. Alternately, an application might package multiple files or directories into an archive file (e.g., ZIP or tar), but the application might not exclude sensitive files that are underneath those directories.
https://cwe.mitre.org/data/definitions/552.html
0
Sergey Lyubka
2022-01-17 12:08:23+00:00
Protect against the directory traversal in mg_upload()
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
False
cesanta/mongoose
Embedded Web Server
2012-08-14 15:09:51
2022-08-27 16:15:14
https://mongoose.ws
cesanta
8677.0
2389.0
mg_http_upload
mg_http_upload( struct mg_connection * c , struct mg_http_message * hm , const char * dir)
['c', 'hm', 'dir']
int mg_http_upload(struct mg_connection *c, struct mg_http_message *hm, const char *dir) { char offset[40] = "", name[200] = "", path[256]; mg_http_get_var(&hm->query, "offset", offset, sizeof(offset)); mg_http_get_var(&hm->query, "name", name, sizeof(name)); if (name[0] == '\0') { mg_http_reply(c, 400, "", "%s", "name required"); return -1; } else { FILE *fp; size_t oft = strtoul(offset, NULL, 0); snprintf(path, sizeof(path), "%s%c%s", dir, MG_DIRSEP, name); LOG(LL_DEBUG, ("%p %d bytes @ %d [%s]", c->fd, (int) hm->body.len, (int) oft, name)); if ((fp = fopen(path, oft == 0 ? "wb" : "ab")) == NULL) { mg_http_reply(c, 400, "", "fopen(%s): %d", name, errno); return -2; } else { fwrite(hm->body.ptr, 1, hm->body.len, fp); fclose(fp); mg_http_reply(c, 200, "", ""); return (int) hm->body.len; } } }
257
True
1
CVE-2022-25299
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
False
[{'url': 'https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-552'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*', 'versionEndExcluding': '7.6', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.'}]
2022-02-28T17:10Z
2022-02-18T13:15Z
Files or Directories Accessible to External Parties
The product makes files or directories accessible to unauthorized actors, even though they should not be.
Web servers, FTP servers, and similar servers may store a set of files underneath a "root" directory that is accessible to the server's users. Applications may store sensitive files underneath this root without also using access control to limit which users may request those files, if any. Alternately, an application might package multiple files or directories into an archive file (e.g., ZIP or tar), but the application might not exclude sensitive files that are underneath those directories.
https://cwe.mitre.org/data/definitions/552.html
0
Sergey Lyubka
2022-01-17 12:08:23+00:00
Protect against the directory traversal in mg_upload()
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
False
cesanta/mongoose
Embedded Web Server
2012-08-14 15:09:51
2022-08-27 16:15:14
https://mongoose.ws
cesanta
8677.0
2389.0
mg_http_upload
mg_http_upload( struct mg_connection * c , struct mg_http_message * hm , const char * dir)
['c', 'hm', 'dir']
int mg_http_upload(struct mg_connection *c, struct mg_http_message *hm, const char *dir) { char offset[40] = "", name[200] = "", path[256]; mg_http_get_var(&hm->query, "offset", offset, sizeof(offset)); mg_http_get_var(&hm->query, "name", name, sizeof(name)); if (name[0] == '\0') { mg_http_reply(c, 400, "", "%s", "name required"); return -1; } else { FILE *fp; size_t oft = strtoul(offset, NULL, 0); snprintf(path, sizeof(path), "%s%c%s", dir, MG_DIRSEP, name); LOG(LL_DEBUG, ("%p %d bytes @ %d [%s]", c->fd, (int) hm->body.len, (int) oft, name)); if ((fp = fopen(path, oft == 0 ? "wb" : "ab")) == NULL) { mg_http_reply(c, 400, "", "fopen(%s): %d", name, errno); return -2; } else { fwrite(hm->body.ptr, 1, hm->body.len, fp); fclose(fp); mg_http_reply(c, 200, "", ""); return (int) hm->body.len; } } }
257
True
1
CVE-2022-25299
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:P/A:N
NETWORK
LOW
NONE
NONE
PARTIAL
NONE
5.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
HIGH
NONE
7.5
HIGH
3.9
3.6
False
[{'url': 'https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945', 'name': 'N/A', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-552'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*', 'versionEndExcluding': '7.6', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.'}]
2022-02-28T17:10Z
2022-02-18T13:15Z
Files or Directories Accessible to External Parties
The product makes files or directories accessible to unauthorized actors, even though they should not be.
Web servers, FTP servers, and similar servers may store a set of files underneath a "root" directory that is accessible to the server's users. Applications may store sensitive files underneath this root without also using access control to limit which users may request those files, if any. Alternately, an application might package multiple files or directories into an archive file (e.g., ZIP or tar), but the application might not exclude sensitive files that are underneath those directories.
https://cwe.mitre.org/data/definitions/552.html
0
Sergey Lyubka
2022-01-17 12:08:23+00:00
Protect against the directory traversal in mg_upload()
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
False
cesanta/mongoose
Embedded Web Server
2012-08-14 15:09:51
2022-08-27 16:15:14
https://mongoose.ws
cesanta
8677.0
2389.0
test_http_server
test_http_server( void)
['void']
static void test_http_server(void) { struct mg_mgr mgr; const char *url = "http://127.0.0.1:12346"; char buf[FETCH_BUF_SIZE]; mg_mgr_init(&mgr); mg_http_listen(&mgr, url, eh1, NULL); ASSERT(fetch(&mgr, buf, url, "GET /a.txt HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hello\n") == 0); ASSERT(fetch(&mgr, buf, url, "GET /%%61.txt HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hello\n") == 0); // Responses with missing reason phrase must also work ASSERT(fetch(&mgr, buf, url, "GET /no_reason HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "ok") == 0); // Fetch file with unicode chars in filename ASSERT(fetch(&mgr, buf, url, "GET /київ.txt HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "є\n") == 0); ASSERT(fetch(&mgr, buf, url, "GET /../fuzz.c HTTP/1.0\n\n") == 404); ASSERT(fetch(&mgr, buf, url, "GET /.%%2e/fuzz.c HTTP/1.0\n\n") == 404); ASSERT(fetch(&mgr, buf, url, "GET /.%%2e%%2ffuzz.c HTTP/1.0\n\n") == 404); ASSERT(fetch(&mgr, buf, url, "GET /..%%2f%%20fuzz.c HTTP/1.0\n\n") == 404); ASSERT(fetch(&mgr, buf, url, "GET /..%%2ffuzz.c%%20 HTTP/1.0\n\n") == 404); ASSERT(fetch(&mgr, buf, url, "GET /dredir HTTP/1.0\n\n") == 301); ASSERT(cmpheader(buf, "Location", "/dredir/")); ASSERT(fetch(&mgr, buf, url, "GET /dredir/ HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hi\n") == 0); ASSERT(fetch(&mgr, buf, url, "GET /..ddot HTTP/1.0\n\n") == 301); ASSERT(fetch(&mgr, buf, url, "GET /..ddot/ HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hi\n") == 0); { extern char *mg_http_etag(char *, size_t, size_t, time_t); char etag[100]; size_t size = 0; time_t mtime = 0; ASSERT(mg_fs_posix.stat("./test/data/a.txt", &size, &mtime) != 0); ASSERT(mg_http_etag(etag, sizeof(etag), size, mtime) == etag); ASSERT(fetch(&mgr, buf, url, "GET /a.txt HTTP/1.0\nIf-None-Match: %s\n\n", etag) == 304); } // Text mime type override ASSERT(fetch(&mgr, buf, url, "GET /servefile HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hello\n") == 0); { struct mg_http_message hm; mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_http_get_header(&hm, "Content-Type") != NULL); ASSERT(mg_strcmp(*mg_http_get_header(&hm, "Content-Type"), mg_str("c/d")) == 0); } ASSERT(fetch(&mgr, buf, url, "GET /foo/1 HTTP/1.0\r\n\n") == 200); // LOG(LL_INFO, ("%d %.*s", (int) hm.len, (int) hm.len, hm.buf)); ASSERT(cmpbody(buf, "uri: 1") == 0); ASSERT(fetch(&mgr, buf, url, "%s", "POST /body HTTP/1.1\r\n" "Content-Length: 4\r\n\r\nkuku") == 200); ASSERT(cmpbody(buf, "kuku") == 0); ASSERT(fetch(&mgr, buf, url, "GET /ssi HTTP/1.1\r\n\r\n") == 301); ASSERT(fetch(&mgr, buf, url, "GET /ssi/ HTTP/1.1\r\n\r\n") == 200); ASSERT(cmpbody(buf, "this is index\n" "this is nested\n\n" "this is f1\n\n\n\n" "recurse\n\n" "recurse\n\n" "recurse\n\n" "recurse\n\n" "recurse\n\n") == 0); { struct mg_http_message hm; mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_http_get_header(&hm, "Content-Length") != NULL); ASSERT(mg_http_get_header(&hm, "Content-Type") != NULL); ASSERT(mg_strcmp(*mg_http_get_header(&hm, "Content-Type"), mg_str("text/html; charset=utf-8")) == 0); } ASSERT(fetch(&mgr, buf, url, "GET /badroot HTTP/1.0\r\n\n") == 400); ASSERT(cmpbody(buf, "Invalid web root [/BAAADDD!]\n") == 0); { char *data = mg_file_read("./test/data/ca.pem", NULL); ASSERT(fetch(&mgr, buf, url, "GET /ca.pem HTTP/1.0\r\n\n") == 200); ASSERT(cmpbody(buf, data) == 0); free(data); } { // Test mime type struct mg_http_message hm; ASSERT(fetch(&mgr, buf, url, "GET /empty.js HTTP/1.0\r\n\n") == 200); mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_http_get_header(&hm, "Content-Type") != NULL); ASSERT(mg_strcmp(*mg_http_get_header(&hm, "Content-Type"), mg_str("text/javascript; charset=utf-8")) == 0); } { // Test connection refused int i, errored = 0; mg_connect(&mgr, "tcp://127.0.0.1:55117", eh9, &errored); for (i = 0; i < 10 && errored == 0; i++) mg_mgr_poll(&mgr, 1); ASSERT(errored == 7); } // Directory listing fetch(&mgr, buf, url, "GET /test/ HTTP/1.0\n\n"); ASSERT(fetch(&mgr, buf, url, "GET /test/ HTTP/1.0\n\n") == 200); ASSERT(mg_strstr(mg_str(buf), mg_str(">Index of /test/<")) != NULL); ASSERT(mg_strstr(mg_str(buf), mg_str(">fuzz.c<")) != NULL); { // Credentials struct mg_http_message hm; ASSERT(fetch(&mgr, buf, url, "%s", "GET /creds?access_token=x HTTP/1.0\r\n\r\n") == 200); mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_strcmp(hm.body, mg_str("[]:[x]")) == 0); ASSERT(fetch(&mgr, buf, url, "%s", "GET /creds HTTP/1.0\r\n" "Authorization: Bearer x\r\n\r\n") == 200); mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_strcmp(hm.body, mg_str("[]:[x]")) == 0); ASSERT(fetch(&mgr, buf, url, "%s", "GET /creds HTTP/1.0\r\n" "Authorization: Basic Zm9vOmJhcg==\r\n\r\n") == 200); mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_strcmp(hm.body, mg_str("[foo]:[bar]")) == 0); ASSERT(fetch(&mgr, buf, url, "%s", "GET /creds HTTP/1.0\r\n" "Cookie: blah; access_token=hello\r\n\r\n") == 200); mg_http_parse(buf, strlen(buf), &hm); ASSERT(mg_strcmp(hm.body, mg_str("[]:[hello]")) == 0); } { // Test upload char *p; remove("uploaded.txt"); ASSERT((p = mg_file_read("uploaded.txt", NULL)) == NULL); ASSERT(fetch(&mgr, buf, url, "POST /upload HTTP/1.0\n" "Content-Length: 1\n\nx") == 400); ASSERT(fetch(&mgr, buf, url, "POST /upload?name=uploaded.txt HTTP/1.0\r\n" "Content-Length: 5\r\n" "\r\nhello") == 200); ASSERT(fetch(&mgr, buf, url, "POST /upload?name=uploaded.txt&offset=5 HTTP/1.0\r\n" "Content-Length: 6\r\n" "\r\n\nworld") == 200); ASSERT((p = mg_file_read("uploaded.txt", NULL)) != NULL); ASSERT(strcmp(p, "hello\nworld") == 0); free(p); remove("uploaded.txt"); } // HEAD request ASSERT(fetch(&mgr, buf, url, "GET /a.txt HTTP/1.0\n\n") == 200); ASSERT(fetch(&mgr, buf, url, "HEAD /a.txt HTTP/1.0\n\n") == 200); #if MG_ENABLE_IPV6 { const char *url6 = "http://[::1]:12346"; ASSERT(mg_http_listen(&mgr, url6, eh1, NULL) != NULL); ASSERT(fetch(&mgr, buf, url6, "GET /a.txt HTTP/1.0\n\n") == 200); ASSERT(cmpbody(buf, "hello\n") == 0); } #endif mg_mgr_free(&mgr); ASSERT(mgr.conns == NULL); }
1395
True
1
CVE-2017-8891
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/dropbox/lepton/issues/87', 'name': 'https://github.com/dropbox/lepton/issues/87', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/dropbox/lepton/commit/82167c144a322cc956da45407f6dce8d4303d346', 'name': 'https://github.com/dropbox/lepton/commit/82167c144a322cc956da45407f6dce8d4303d346', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2017/05/10/1', 'name': 'http://openwall.com/lists/oss-security/2017/05/10/1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-1187'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:dropbox:lepton:1.2.1:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Dropbox Lepton 1.2.1 allows DoS (SEGV and application crash) via a malformed lepton file because the code does not ensure setup of a correct number of threads.'}]
2019-10-03T00:03Z
2017-05-10T16:29Z
DEPRECATED: Use of Uninitialized Resource
This entry has been deprecated because it was a duplicate of CWE-908. All content has been transferred to CWE-908.
CWE Content Team MITRE 2019-03-25 CWE Content Team MITRE 2020-02-24 updated Description, Name, Relationships, Type, Weakness_Ordinalities Use of Uninitialized Resource
https://cwe.mitre.org/data/definitions/1187.html
0
Daniel Reiter Horn
2017-04-04 23:58:01-07:00
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
82167c144a322cc956da45407f6dce8d4303d346
False
dropbox/lepton
Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
2016-07-13 16:27:29
2022-08-23 12:06:01
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
dropbox
4983.0
361.0
bounded_iostream::write_no_buffer
bounded_iostream::write_no_buffer( const void * from , size_t bytes_to_write)
['from', 'bytes_to_write']
unsigned int bounded_iostream::write_no_buffer(const void *from, size_t bytes_to_write) { //return iostream::write(from,tpsize,dtsize); std::pair<unsigned int, Sirikata::JpegError> retval; if (byte_bound != 0 && byte_position + bytes_to_write > byte_bound) { size_t real_bytes_to_write = byte_bound - byte_position; byte_position += real_bytes_to_write; retval = parent->Write(reinterpret_cast<const unsigned char*>(from), real_bytes_to_write); if (retval.first < real_bytes_to_write) { err = retval.second; return retval.first; } return bytes_to_write; // pretend we wrote it all } size_t total = bytes_to_write; retval = parent->Write(reinterpret_cast<const unsigned char*>(from), total); unsigned int written = retval.first; byte_position += written; if (written < total ) { err = retval.second; return written; } return bytes_to_write; }
153
True
1
CVE-2017-8891
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/dropbox/lepton/issues/87', 'name': 'https://github.com/dropbox/lepton/issues/87', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/dropbox/lepton/commit/82167c144a322cc956da45407f6dce8d4303d346', 'name': 'https://github.com/dropbox/lepton/commit/82167c144a322cc956da45407f6dce8d4303d346', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2017/05/10/1', 'name': 'http://openwall.com/lists/oss-security/2017/05/10/1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-1187'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:dropbox:lepton:1.2.1:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Dropbox Lepton 1.2.1 allows DoS (SEGV and application crash) via a malformed lepton file because the code does not ensure setup of a correct number of threads.'}]
2019-10-03T00:03Z
2017-05-10T16:29Z
DEPRECATED: Use of Uninitialized Resource
This entry has been deprecated because it was a duplicate of CWE-908. All content has been transferred to CWE-908.
CWE Content Team MITRE 2019-03-25 CWE Content Team MITRE 2020-02-24 updated Description, Name, Relationships, Type, Weakness_Ordinalities Use of Uninitialized Resource
https://cwe.mitre.org/data/definitions/1187.html
0
Daniel Reiter Horn
2017-04-04 23:58:01-07:00
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
82167c144a322cc956da45407f6dce8d4303d346
False
dropbox/lepton
Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
2016-07-13 16:27:29
2022-08-23 12:06:01
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
dropbox
4983.0
361.0
VP8ComponentDecoder::decode_chunk
VP8ComponentDecoder::decode_chunk( UncompressedComponents * const colldata)
['colldata']
CodingReturnValue VP8ComponentDecoder::decode_chunk(UncompressedComponents * const colldata) { mux_splicer.init(spin_workers_); /* cmpc is a global variable with the component count */ /* construct 4x4 VP8 blocks to hold 8x8 JPEG blocks */ if ( thread_state_[0] == nullptr || thread_state_[0]->context_[0].isNil() ) { /* first call */ BlockBasedImagePerChannel<false> framebuffer; framebuffer.memset(0); for (size_t i = 0; i < framebuffer.size() && int( i ) < colldata->get_num_components(); ++i) { framebuffer[i] = &colldata->full_component_write((BlockType)i); } Sirikata::Array1d<BlockBasedImagePerChannel<false>, MAX_NUM_THREADS> all_framebuffers; for (size_t i = 0; i < all_framebuffers.size(); ++i) { all_framebuffers[i] = framebuffer; } size_t num_threads_needed = initialize_decoder_state(colldata, all_framebuffers).size(); for (size_t i = 0;i < num_threads_needed; ++i) { map_logical_thread_to_physical_thread(i, i); } for (size_t i = 0;i < num_threads_needed; ++i) { initialize_thread_id(i, i, framebuffer); if (!do_threading_) { break; } } if (num_threads_needed > NUM_THREADS || num_threads_needed == 0) { return CODING_ERROR; } } if (do_threading_) { for (unsigned int thread_id = 0; thread_id < NUM_THREADS; ++thread_id) { unsigned int cur_spin_worker = thread_id; spin_workers_[cur_spin_worker].work = std::bind(worker_thread, thread_state_[thread_id], thread_id, colldata, mux_splicer.thread_target, getWorker(cur_spin_worker), &send_to_actual_thread_state); spin_workers_[cur_spin_worker].activate_work(); } flush(); for (unsigned int thread_id = 0; thread_id < NUM_THREADS; ++thread_id) { unsigned int cur_spin_worker = thread_id; TimingHarness::timing[thread_id][TimingHarness::TS_THREAD_WAIT_STARTED] = TimingHarness::get_time_us(); spin_workers_[cur_spin_worker].main_wait_for_done(); TimingHarness::timing[thread_id][TimingHarness::TS_THREAD_WAIT_FINISHED] = TimingHarness::get_time_us(); } // join on all threads } else { if (virtual_thread_id_ != -1) { TimingHarness::timing[0][TimingHarness::TS_ARITH_STARTED] = TimingHarness::get_time_us(); CodingReturnValue ret = thread_state_[0]->vp8_decode_thread(0, colldata); if (ret == CODING_PARTIAL) { return ret; } TimingHarness::timing[0][TimingHarness::TS_ARITH_FINISHED] = TimingHarness::get_time_us(); } // wait for "threads" virtual_thread_id_ += 1; // first time's a charm for (unsigned int thread_id = virtual_thread_id_; thread_id < NUM_THREADS; ++thread_id, ++virtual_thread_id_) { BlockBasedImagePerChannel<false> framebuffer; framebuffer.memset(0); for (size_t i = 0; i < framebuffer.size() && int( i ) < colldata->get_num_components(); ++i) { framebuffer[i] = &colldata->full_component_write((BlockType)i); } initialize_thread_id(thread_id, 0, framebuffer); thread_state_[0]->bool_decoder_.init(new VirtualThreadPacketReader(thread_id, &mux_reader_, &mux_splicer)); TimingHarness::timing[thread_id][TimingHarness::TS_ARITH_STARTED] = TimingHarness::get_time_us(); CodingReturnValue ret; if ((ret = thread_state_[0]->vp8_decode_thread(0, colldata)) == CODING_PARTIAL) { return ret; } TimingHarness::timing[thread_id][TimingHarness::TS_ARITH_FINISHED] = TimingHarness::get_time_us(); } } TimingHarness::timing[0][TimingHarness::TS_JPEG_RECODE_STARTED] = TimingHarness::get_time_us(); for (int component = 0; component < colldata->get_num_components(); ++component) { colldata->worker_mark_cmp_finished((BlockType)component); } colldata->worker_update_coefficient_position_progress( 64 ); colldata->worker_update_bit_progress( 16 ); write_byte_bill(Billing::DELIMITERS, true, mux_reader_.getOverhead()); return CODING_DONE; }
707
True
1
CVE-2018-20820
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
False
[{'url': 'https://github.com/dropbox/lepton/issues/111', 'name': 'https://github.com/dropbox/lepton/issues/111', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/dropbox/lepton/commit/6a5ceefac1162783fffd9506a3de39c85c725761', 'name': 'https://github.com/dropbox/lepton/commit/6a5ceefac1162783fffd9506a3de39c85c725761', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:dropbox:lepton:1.2.1:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'read_ujpg in jpgcoder.cc in Dropbox Lepton 1.2.1 allows attackers to cause a denial-of-service (application runtime crash because of an integer overflow) via a crafted file.'}]
2019-04-24T20:16Z
2019-04-23T14:29Z
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
Daniel Reiter Horn
2019-04-09 23:32:33+00:00
fix #111
6a5ceefac1162783fffd9506a3de39c85c725761
False
dropbox/lepton
Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
2016-07-13 16:27:29
2022-08-23 12:06:01
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
dropbox
4983.0
361.0
read_ujpg
read_ujpg( void)
['void']
bool read_ujpg( void ) { using namespace IOUtil; using namespace Sirikata; // colldata.start_decoder_worker_thread(std::bind(&simple_decoder, &colldata, str_in)); unsigned char ujpg_mrk[ 64 ]; // this is where we will enable seccomp, before reading user data write_byte_bill(Billing::HEADER, true, 24); // for the fixed header str_out->call_size_callback(max_file_size); uint32_t compressed_header_size = 0; if (ReadFull(str_in, ujpg_mrk, 4) != 4) { custom_exit(ExitCode::SHORT_READ); } write_byte_bill(Billing::HEADER, true, 4); compressed_header_size = LEtoUint32(ujpg_mrk); if (compressed_header_size > 128 * 1024 * 1024 || max_file_size > 128 * 1024 * 1024) { always_assert(false && "Only support images < 128 megs"); return false; // bool too big } bool pending_header_reads = false; if (header_reader == NULL) { std::vector<uint8_t, JpegAllocator<uint8_t> > compressed_header_buffer(compressed_header_size); IOUtil::ReadFull(str_in, compressed_header_buffer.data(), compressed_header_buffer.size()); header_reader = new MemReadWriter((JpegAllocator<uint8_t>())); { if (ujgversion == 1) { JpegAllocator<uint8_t> no_free_allocator; #if !defined(USE_STANDARD_MEMORY_ALLOCATORS) && !defined(_WIN32) && !defined(EMSCRIPTEN) no_free_allocator.setup_memory_subsystem(32 * 1024 * 1024, 16, &mem_init_nop, &MemMgrAllocatorMalloc, &mem_nop, &mem_realloc_nop, &MemMgrAllocatorMsize); #endif std::pair<std::vector<uint8_t, Sirikata::JpegAllocator<uint8_t> >, JpegError> uncompressed_header_buffer( ZlibDecoderDecompressionReader::Decompress(compressed_header_buffer.data(), compressed_header_buffer.size(), no_free_allocator, max_file_size + 2048)); if (uncompressed_header_buffer.second) { always_assert(false && "Data not properly zlib coded"); return false; } zlib_hdrs = compressed_header_buffer.size(); header_reader->SwapIn(uncompressed_header_buffer.first, 0); } else { std::pair<std::vector<uint8_t, Sirikata::JpegAllocator<uint8_t> >, JpegError> uncompressed_header_buffer( Sirikata::BrotliCodec::Decompress(compressed_header_buffer.data(), compressed_header_buffer.size(), JpegAllocator<uint8_t>(), max_file_size * 2 + 128 * 1024 * 1024)); if (uncompressed_header_buffer.second) { always_assert(false && "Data not properly zlib coded"); return false; } zlib_hdrs = compressed_header_buffer.size(); header_reader->SwapIn(uncompressed_header_buffer.first, 0); } } write_byte_bill(Billing::HEADER, true, compressed_header_buffer.size()); } else { always_assert(compressed_header_size == 0 && "Special concatenation requires 0 size header"); } grbs = sizeof(EOI); grbgdata = EOI; // if we don't have any garbage, assume FFD9 EOI // read header from file ReadFull(header_reader, ujpg_mrk, 3 ) ; // check marker if ( memcmp( ujpg_mrk, "HDR", 3 ) == 0 ) { // read size of header, alloc memory ReadFull(header_reader, ujpg_mrk, 4 ); hdrs = LEtoUint32(ujpg_mrk); hdrdata = (unsigned char*) aligned_alloc(hdrs); memset(hdrdata, 0, hdrs); if ( hdrdata == NULL ) { fprintf( stderr, MEM_ERRMSG ); errorlevel.store(2); return false; } // read hdrdata ReadFull(header_reader, hdrdata, hdrs ); } else { fprintf( stderr, "HDR marker not found" ); errorlevel.store(2); return false; } bool memory_optimized_image = (filetype != UJG) && !g_allow_progressive; // parse header for image-info if ( !setup_imginfo_jpg(memory_optimized_image) ) return false; // beginning here: recovery information (needed for exact JPEG recovery) // read padbit information from file ReadFull(header_reader, ujpg_mrk, 3 ); // check marker if ( memcmp( ujpg_mrk, "P0D", 3 ) == 0 ) { // This is a more nuanced pad byte that can have different values per bit header_reader->Read( reinterpret_cast<unsigned char*>(&padbit), 1 ); } else if ( memcmp( ujpg_mrk, "PAD", 3 ) == 0 ) { // this is a single pad bit that is implied to have all the same values header_reader->Read( reinterpret_cast<unsigned char*>(&padbit), 1 ); if (!(padbit == 0 || padbit == 1 ||padbit == -1)) { while (write(2, "Legacy Padbit must be 0, 1 or -1\n", strlen("Legacy Padbit must be 0, 1 or -1\n")) < 0 && errno == EINTR) { } custom_exit(ExitCode::STREAM_INCONSISTENT); } if (padbit == 1) { padbit = 0x7f; // all 6 bits set } } else { fprintf( stderr, "PAD marker not found" ); errorlevel.store(2); return false; } std::vector<ThreadHandoff> thread_handoff; // read further recovery information if any while ( ReadFull(header_reader, ujpg_mrk, 3 ) == 3 ) { // check marker if ( memcmp( ujpg_mrk, "CRS", 3 ) == 0 ) { rst_cnt_set = true; ReadFull(header_reader, ujpg_mrk, 4); rst_cnt.resize(LEtoUint32(ujpg_mrk)); for (size_t i = 0; i < rst_cnt.size(); ++i) { ReadFull(header_reader, ujpg_mrk, 4); rst_cnt.at(i) = LEtoUint32(ujpg_mrk); } } else if ( memcmp( ujpg_mrk, "HHX", 2 ) == 0 ) { // only look at first two bytes size_t to_alloc = ThreadHandoff::get_remaining_data_size_from_two_bytes(ujpg_mrk + 1) + 2; if(to_alloc) { std::vector<unsigned char> data(to_alloc); data[0] = ujpg_mrk[1]; data[1] = ujpg_mrk[2]; ReadFull(header_reader, &data[2], to_alloc - 2); thread_handoff = ThreadHandoff::deserialize(&data[0], to_alloc); } } else if ( memcmp( ujpg_mrk, "FRS", 3 ) == 0 ) { // read number of false set RST markers per scan from file ReadFull(header_reader, ujpg_mrk, 4); scnc = LEtoUint32(ujpg_mrk); rst_err.insert(rst_err.end(), scnc - rst_err.size(), 0); // read data ReadFull(header_reader, rst_err.data(), scnc ); } else if ( memcmp( ujpg_mrk, "GRB", 3 ) == 0 ) { // read garbage (data after end of JPG) from file ReadFull(header_reader, ujpg_mrk, 4); grbs = LEtoUint32(ujpg_mrk); grbgdata = aligned_alloc(grbs); memset(grbgdata, 0, sizeof(grbs)); if ( grbgdata == NULL ) { fprintf( stderr, MEM_ERRMSG ); errorlevel.store(2); return false; } // read garbage data ReadFull(header_reader, grbgdata, grbs ); } else if ( memcmp( ujpg_mrk, "PGR", 3 ) == 0 || memcmp( ujpg_mrk, "PGE", 3 ) == 0 ) { // read prefix garbage (data before beginning of JPG) from file if (ujpg_mrk[2] == 'E') { // embedded jpeg: full header required embedded_jpeg = true; } ReadFull(header_reader, ujpg_mrk, 4); prefix_grbs = LEtoUint32(ujpg_mrk); prefix_grbgdata = aligned_alloc(prefix_grbs); memset(prefix_grbgdata, 0, sizeof(prefix_grbs)); if ( prefix_grbgdata == NULL ) { fprintf( stderr, MEM_ERRMSG ); errorlevel.store(2); return false; } // read garbage data ReadFull(header_reader, prefix_grbgdata, prefix_grbs ); } else if ( memcmp( ujpg_mrk, "SIZ", 3 ) == 0 ) { // full size of the original file ReadFull(header_reader, ujpg_mrk, 4); max_file_size = LEtoUint32(ujpg_mrk); } else if ( memcmp( ujpg_mrk, "EEE", 3) == 0) { ReadFull(header_reader, ujpg_mrk, 28); max_cmp = LEtoUint32(ujpg_mrk); max_bpos = LEtoUint32(ujpg_mrk + 4); max_sah = LEtoUint32(ujpg_mrk + 8); max_dpos[0] = LEtoUint32(ujpg_mrk + 12); max_dpos[1] = LEtoUint32(ujpg_mrk + 16); max_dpos[2] = LEtoUint32(ujpg_mrk + 20); max_dpos[3] = LEtoUint32(ujpg_mrk + 24); early_eof_encountered = true; colldata.set_truncation_bounds(max_cmp, max_bpos, max_dpos, max_sah); } else { if (memcmp(ujpg_mrk, "CNT", 3) == 0 ) { pending_header_reads = true; break; } else if (memcmp(ujpg_mrk, "CMP", 3) == 0 ) { break; } else { fprintf( stderr, "unknown data found" ); errorlevel.store(2); } return false; } } if (!pending_header_reads) { delete header_reader; header_reader = NULL; } write_byte_bill(Billing::HEADER, false, 2 + hdrs + prefix_grbs + grbs); ReadFull(str_in, ujpg_mrk, 3 ) ; write_byte_bill(Billing::HEADER, true, 3); write_byte_bill(Billing::DELIMITERS, true, 4 * NUM_THREADS); // trailing vpx_encode bits write_byte_bill(Billing::HEADER, true, 4); //trailing size if (memcmp(ujpg_mrk, "CMP", 3) != 0) { always_assert(false && "CMP must be present (uncompressed) in the file or CNT continue marker"); return false; // not a JPG } colldata.signal_worker_should_begin(); g_decoder->initialize(str_in, thread_handoff); colldata.start_decoder(g_decoder); return true; }
1532
True
1
CVE-2017-7501
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:P
LOCAL
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
4.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'name': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://security.gentoo.org/glsa/201811-22', 'name': 'GLSA-201811-22', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210628 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210629 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.13.0.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that versions of rpm before 4.13.0.2 use temporary files with predictable names when installing an RPM. An attacker with ability to write in a directory where files will be installed could create symbolic links to an arbitrary location and modify content, and possibly permissions to arbitrary files, which could be used for denial of service or possibly privilege escalation.'}]
2021-06-29T15:15Z
2017-11-22T22:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-19 14:46:36+03:00
Don't follow symlinks on file creation (CVE-2017-7501) Open newly created files with O_EXCL to prevent symlink tricks. When reopening hardlinks for writing the actual content, use append mode instead. This is compatible with the write-only permissions but is not destructive in case we got redirected to somebody elses file, verify the target before actually writing anything. As these are files with the temporary suffix, errors mean a local user with sufficient privileges to break the installation of the package anyway is trying to goof us on purpose, don't bother trying to mend it (we couldn't fix the hardlink case anyhow) but just bail out. Based on a patch by Florian Festi.
404ef011c300207cdb1e531670384564aae04bdc
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
expandRegular
expandRegular( rpmfi fi , const char * dest , rpmpsm psm , int nodigest , int nocontent)
['fi', 'dest', 'psm', 'nodigest', 'nocontent']
static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, int nocontent) { FD_t wfd = NULL; int rc = 0; /* Create the file with 0200 permissions (write by owner). */ { mode_t old_umask = umask(0577); wfd = Fopen(dest, "w.ufdio"); umask(old_umask); } if (Ferror(wfd)) { rc = RPMERR_OPEN_FAILED; goto exit; } if (!nocontent) rc = rpmfiArchiveReadToFilePsm(fi, wfd, nodigest, psm); exit: if (wfd) { int myerrno = errno; Fclose(wfd); errno = myerrno; } return rc; }
114
True
1
CVE-2017-7501
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:P
LOCAL
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
4.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'name': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://security.gentoo.org/glsa/201811-22', 'name': 'GLSA-201811-22', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210628 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210629 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.13.0.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that versions of rpm before 4.13.0.2 use temporary files with predictable names when installing an RPM. An attacker with ability to write in a directory where files will be installed could create symbolic links to an arbitrary location and modify content, and possibly permissions to arbitrary files, which could be used for denial of service or possibly privilege escalation.'}]
2021-06-29T15:15Z
2017-11-22T22:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-19 14:46:36+03:00
Don't follow symlinks on file creation (CVE-2017-7501) Open newly created files with O_EXCL to prevent symlink tricks. When reopening hardlinks for writing the actual content, use append mode instead. This is compatible with the write-only permissions but is not destructive in case we got redirected to somebody elses file, verify the target before actually writing anything. As these are files with the temporary suffix, errors mean a local user with sufficient privileges to break the installation of the package anyway is trying to goof us on purpose, don't bother trying to mend it (we couldn't fix the hardlink case anyhow) but just bail out. Based on a patch by Florian Festi.
404ef011c300207cdb1e531670384564aae04bdc
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
fsmMkfile
fsmMkfile( rpmfi fi , const char * dest , rpmfiles files , rpmpsm psm , int nodigest , int * setmeta , int * firsthardlink)
['fi', 'dest', 'files', 'psm', 'nodigest', 'setmeta', 'firsthardlink']
static int fsmMkfile(rpmfi fi, const char *dest, rpmfiles files, rpmpsm psm, int nodigest, int *setmeta, int * firsthardlink) { int rc = 0; int numHardlinks = rpmfiFNlink(fi); if (numHardlinks > 1) { /* Create first hardlinked file empty */ if (*firsthardlink < 0) { *firsthardlink = rpmfiFX(fi); rc = expandRegular(fi, dest, psm, nodigest, 1); } else { /* Create hard links for others */ char *fn = rpmfilesFN(files, *firsthardlink); rc = link(fn, dest); if (rc < 0) { rc = RPMERR_LINK_FAILED; } free(fn); } } /* Write normal files or fill the last hardlinked (already existing) file with content */ if (numHardlinks<=1) { if (!rc) rc = expandRegular(fi, dest, psm, nodigest, 0); } else if (rpmfiArchiveHasContent(fi)) { if (!rc) rc = expandRegular(fi, dest, psm, nodigest, 0); *firsthardlink = -1; } else { *setmeta = 0; } return rc; }
198
True
1
CVE-2017-7501
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:P
LOCAL
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
4.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'name': 'https://github.com/rpm-software-management/rpm/commit/404ef011c300207cdb1e531670384564aae04bdc', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://security.gentoo.org/glsa/201811-22', 'name': 'GLSA-201811-22', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210628 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b@%3Cissues.bookkeeper.apache.org%3E', 'name': '[bookkeeper-issues] 20210629 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.13.0.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that versions of rpm before 4.13.0.2 use temporary files with predictable names when installing an RPM. An attacker with ability to write in a directory where files will be installed could create symbolic links to an arbitrary location and modify content, and possibly permissions to arbitrary files, which could be used for denial of service or possibly privilege escalation.'}]
2021-06-29T15:15Z
2017-11-22T22:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-19 14:46:36+03:00
Don't follow symlinks on file creation (CVE-2017-7501) Open newly created files with O_EXCL to prevent symlink tricks. When reopening hardlinks for writing the actual content, use append mode instead. This is compatible with the write-only permissions but is not destructive in case we got redirected to somebody elses file, verify the target before actually writing anything. As these are files with the temporary suffix, errors mean a local user with sufficient privileges to break the installation of the package anyway is trying to goof us on purpose, don't bother trying to mend it (we couldn't fix the hardlink case anyhow) but just bail out. Based on a patch by Florian Festi.
404ef011c300207cdb1e531670384564aae04bdc
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
rpmPackageFilesInstall
rpmPackageFilesInstall( rpmts ts , rpmte te , rpmfiles files , rpmpsm psm , char ** failedFile)
['ts', 'te', 'files', 'psm', 'failedFile']
int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files, rpmpsm psm, char ** failedFile) { FD_t payload = rpmtePayload(te); rpmfi fi = rpmfiNewArchiveReader(payload, files, RPMFI_ITER_READ_ARCHIVE); rpmfs fs = rpmteGetFileStates(te); rpmPlugins plugins = rpmtsPlugins(ts); struct stat sb; int saveerrno = errno; int rc = 0; int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0; int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0; int firsthardlink = -1; int skip; rpmFileAction action; char *tid = NULL; const char *suffix; char *fpath = NULL; if (fi == NULL) { rc = RPMERR_BAD_MAGIC; goto exit; } /* transaction id used for temporary path suffix while installing */ rasprintf(&tid, ";%08x", (unsigned)rpmtsGetTid(ts)); /* Detect and create directories not explicitly in package. */ rc = fsmMkdirs(files, fs, plugins); while (!rc) { /* Read next payload header. */ rc = rpmfiNext(fi); if (rc < 0) { if (rc == RPMERR_ITER_END) rc = 0; break; } action = rpmfsGetAction(fs, rpmfiFX(fi)); skip = XFA_SKIPPING(action); suffix = S_ISDIR(rpmfiFMode(fi)) ? NULL : tid; if (action != FA_TOUCH) { fpath = fsmFsPath(fi, suffix); } else { fpath = fsmFsPath(fi, ""); } /* Remap file perms, owner, and group. */ rc = rpmfiStat(fi, 1, &sb); fsmDebug(fpath, action, &sb); /* Exit on error. */ if (rc) break; /* Run fsm file pre hook for all plugins */ rc = rpmpluginsCallFsmFilePre(plugins, fi, fpath, sb.st_mode, action); if (rc) { skip = 1; } else { setFileState(fs, rpmfiFX(fi)); } if (!skip) { int setmeta = 1; /* Directories replacing something need early backup */ if (!suffix) { rc = fsmBackup(fi, action); } /* Assume file does't exist when tmp suffix is in use */ if (!suffix) { rc = fsmVerify(fpath, fi); } else { rc = (action == FA_TOUCH) ? 0 : RPMERR_ENOENT; } if (S_ISREG(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMkfile(fi, fpath, files, psm, nodigest, &setmeta, &firsthardlink); } } else if (S_ISDIR(sb.st_mode)) { if (rc == RPMERR_ENOENT) { mode_t mode = sb.st_mode; mode &= ~07777; mode |= 00700; rc = fsmMkdir(fpath, mode); } } else if (S_ISLNK(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmSymlink(rpmfiFLink(fi), fpath); } } else if (S_ISFIFO(sb.st_mode)) { /* This mimics cpio S_ISSOCK() behavior but probably isn't right */ if (rc == RPMERR_ENOENT) { rc = fsmMkfifo(fpath, 0000); } } else if (S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode) || S_ISSOCK(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMknod(fpath, sb.st_mode, sb.st_rdev); } } else { /* XXX Special case /dev/log, which shouldn't be packaged anyways */ if (!IS_DEV_LOG(fpath)) rc = RPMERR_UNKNOWN_FILETYPE; } /* Set permissions, timestamps etc for non-hardlink entries */ if (!rc && setmeta) { rc = fsmSetmeta(fpath, fi, plugins, action, &sb, nofcaps); } } else if (firsthardlink >= 0 && rpmfiArchiveHasContent(fi)) { /* we skip the hard linked file containing the content */ /* write the content to the first used instead */ char *fn = rpmfilesFN(files, firsthardlink); rc = expandRegular(fi, fn, psm, nodigest, 0); firsthardlink = -1; free(fn); } if (rc) { if (!skip) { /* XXX only erase if temp fn w suffix is in use */ if (suffix && (action != FA_TOUCH)) { (void) fsmRemove(fpath, sb.st_mode); } errno = saveerrno; } } else { /* Notify on success. */ rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, rpmfiArchiveTell(fi)); if (!skip) { /* Backup file if needed. Directories are handled earlier */ if (suffix) rc = fsmBackup(fi, action); if (!rc) rc = fsmCommit(&fpath, fi, action, suffix); } } if (rc) *failedFile = xstrdup(fpath); /* Run fsm file post hook for all plugins */ rpmpluginsCallFsmFilePost(plugins, fi, fpath, sb.st_mode, action, rc); fpath = _free(fpath); } rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), fdOp(payload, FDSTAT_READ)); rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), fdOp(payload, FDSTAT_DIGEST)); exit: /* No need to bother with close errors on read */ rpmfiArchiveClose(fi); rpmfiFree(fi); Fclose(payload); free(tid); free(fpath); return rc; }
877
True
1
CVE-2017-7500
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'name': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'name': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13.0.0', 'versionEndExcluding': '4.13.0.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that rpm did not properly handle RPM installations when a destination path was a symbolic link to a directory, possibly changing ownership and permissions of an arbitrary directory, and RPM files being placed in an arbitrary destination. An attacker, with write access to a directory in which a subdirectory will be installed, could redirect that directory to an arbitrary location and gain root privilege.'}]
2019-10-09T23:29Z
2018-08-13T17:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-26 16:54:16+03:00
Restrict following symlinks to directories by ownership (CVE-2017-7500) Only follow directory symlinks owned by target directory owner or root. This prevents privilege escalation from user-writable directories via directory symlinks to privileged directories on package upgrade, while still allowing admin to arrange disk usage with symlinks. The rationale is that if you can create symlinks owned by user X you *are* user X (or root), and if you also own directory Y you can do whatever with it already, including change permissions. So when you create a symlink to that directory, the link ownership acts as a simple stamp of authority that you indeed want rpm to treat this symlink as it were the directory that you own. Such a permission can only be given by you or root, which is just the way we want it. Plus it's almost ridiculously simple as far as rules go, compared to trying to calculate something from the source vs destination directory permissions etc. In the normal case, the user arranging diskspace with symlinks is indeed root so nothing changes, the only real change here is to links created by non-privileged users which should be few and far between in practise. Unfortunately our test-suite runs as a regular user via fakechroot and thus the testcase for this fails under the new rules. Adjust the testcase to get the ownership straight and add a second case for the illegal behavior, basically the same as the old one but with different expectations.
f2d3be2a8741234faaa96f5fd05fdfdc75779a79
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
fsmVerify
fsmVerify( const char * path , rpmfi fi)
['path', 'fi']
static int fsmVerify(const char *path, rpmfi fi) { int rc; int saveerrno = errno; struct stat dsb; mode_t mode = rpmfiFMode(fi); rc = fsmStat(path, 1, &dsb); if (rc) return rc; if (S_ISREG(mode)) { /* HP-UX (and other os'es) don't permit unlink on busy files. */ char *rmpath = rstrscat(NULL, path, "-RPMDELETE", NULL); rc = fsmRename(path, rmpath); /* XXX shouldn't we take unlink return code here? */ if (!rc) (void) fsmUnlink(rmpath); else rc = RPMERR_UNLINK_FAILED; free(rmpath); return (rc ? rc : RPMERR_ENOENT); /* XXX HACK */ } else if (S_ISDIR(mode)) { if (S_ISDIR(dsb.st_mode)) return 0; if (S_ISLNK(dsb.st_mode)) { rc = fsmStat(path, 0, &dsb); if (rc == RPMERR_ENOENT) rc = 0; if (rc) return rc; errno = saveerrno; if (S_ISDIR(dsb.st_mode)) return 0; } } else if (S_ISLNK(mode)) { if (S_ISLNK(dsb.st_mode)) { char buf[8 * BUFSIZ]; size_t len; rc = fsmReadLink(path, buf, 8 * BUFSIZ, &len); errno = saveerrno; if (rc) return rc; if (rstreq(rpmfiFLink(fi), buf)) return 0; } } else if (S_ISFIFO(mode)) { if (S_ISFIFO(dsb.st_mode)) return 0; } else if (S_ISCHR(mode) || S_ISBLK(mode)) { if ((S_ISCHR(dsb.st_mode) || S_ISBLK(dsb.st_mode)) && (dsb.st_rdev == rpmfiFRdev(fi))) return 0; } else if (S_ISSOCK(mode)) { if (S_ISSOCK(dsb.st_mode)) return 0; } /* XXX shouldn't do this with commit/undo. */ rc = fsmUnlink(path); if (rc == 0) rc = RPMERR_ENOENT; return (rc ? rc : RPMERR_ENOENT); /* XXX HACK */ }
385
True
1
CVE-2017-7500
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'name': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'name': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13.0.0', 'versionEndExcluding': '4.13.0.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that rpm did not properly handle RPM installations when a destination path was a symbolic link to a directory, possibly changing ownership and permissions of an arbitrary directory, and RPM files being placed in an arbitrary destination. An attacker, with write access to a directory in which a subdirectory will be installed, could redirect that directory to an arbitrary location and gain root privilege.'}]
2019-10-09T23:29Z
2018-08-13T17:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-26 16:54:16+03:00
Restrict following symlinks to directories by ownership (CVE-2017-7500) Only follow directory symlinks owned by target directory owner or root. This prevents privilege escalation from user-writable directories via directory symlinks to privileged directories on package upgrade, while still allowing admin to arrange disk usage with symlinks. The rationale is that if you can create symlinks owned by user X you *are* user X (or root), and if you also own directory Y you can do whatever with it already, including change permissions. So when you create a symlink to that directory, the link ownership acts as a simple stamp of authority that you indeed want rpm to treat this symlink as it were the directory that you own. Such a permission can only be given by you or root, which is just the way we want it. Plus it's almost ridiculously simple as far as rules go, compared to trying to calculate something from the source vs destination directory permissions etc. In the normal case, the user arranging diskspace with symlinks is indeed root so nothing changes, the only real change here is to links created by non-privileged users which should be few and far between in practise. Unfortunately our test-suite runs as a regular user via fakechroot and thus the testcase for this fails under the new rules. Adjust the testcase to get the ownership straight and add a second case for the illegal behavior, basically the same as the old one but with different expectations.
f2d3be2a8741234faaa96f5fd05fdfdc75779a79
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
rpmPackageFilesInstall
rpmPackageFilesInstall( rpmts ts , rpmte te , rpmfiles files , rpmpsm psm , char ** failedFile)
['ts', 'te', 'files', 'psm', 'failedFile']
int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files, rpmpsm psm, char ** failedFile) { FD_t payload = rpmtePayload(te); rpmfi fi = rpmfiNewArchiveReader(payload, files, RPMFI_ITER_READ_ARCHIVE); rpmfs fs = rpmteGetFileStates(te); rpmPlugins plugins = rpmtsPlugins(ts); struct stat sb; int saveerrno = errno; int rc = 0; int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0; int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0; int firsthardlink = -1; int skip; rpmFileAction action; char *tid = NULL; const char *suffix; char *fpath = NULL; if (fi == NULL) { rc = RPMERR_BAD_MAGIC; goto exit; } /* transaction id used for temporary path suffix while installing */ rasprintf(&tid, ";%08x", (unsigned)rpmtsGetTid(ts)); /* Detect and create directories not explicitly in package. */ rc = fsmMkdirs(files, fs, plugins); while (!rc) { /* Read next payload header. */ rc = rpmfiNext(fi); if (rc < 0) { if (rc == RPMERR_ITER_END) rc = 0; break; } action = rpmfsGetAction(fs, rpmfiFX(fi)); skip = XFA_SKIPPING(action); suffix = S_ISDIR(rpmfiFMode(fi)) ? NULL : tid; if (action != FA_TOUCH) { fpath = fsmFsPath(fi, suffix); } else { fpath = fsmFsPath(fi, ""); } /* Remap file perms, owner, and group. */ rc = rpmfiStat(fi, 1, &sb); fsmDebug(fpath, action, &sb); /* Exit on error. */ if (rc) break; /* Run fsm file pre hook for all plugins */ rc = rpmpluginsCallFsmFilePre(plugins, fi, fpath, sb.st_mode, action); if (rc) { skip = 1; } else { setFileState(fs, rpmfiFX(fi)); } if (!skip) { int setmeta = 1; /* Directories replacing something need early backup */ if (!suffix) { rc = fsmBackup(fi, action); } /* Assume file does't exist when tmp suffix is in use */ if (!suffix) { rc = fsmVerify(fpath, fi); } else { rc = (action == FA_TOUCH) ? 0 : RPMERR_ENOENT; } if (S_ISREG(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMkfile(fi, fpath, files, psm, nodigest, &setmeta, &firsthardlink); } } else if (S_ISDIR(sb.st_mode)) { if (rc == RPMERR_ENOENT) { mode_t mode = sb.st_mode; mode &= ~07777; mode |= 00700; rc = fsmMkdir(fpath, mode); } } else if (S_ISLNK(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmSymlink(rpmfiFLink(fi), fpath); } } else if (S_ISFIFO(sb.st_mode)) { /* This mimics cpio S_ISSOCK() behavior but probably isn't right */ if (rc == RPMERR_ENOENT) { rc = fsmMkfifo(fpath, 0000); } } else if (S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode) || S_ISSOCK(sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMknod(fpath, sb.st_mode, sb.st_rdev); } } else { /* XXX Special case /dev/log, which shouldn't be packaged anyways */ if (!IS_DEV_LOG(fpath)) rc = RPMERR_UNKNOWN_FILETYPE; } /* Set permissions, timestamps etc for non-hardlink entries */ if (!rc && setmeta) { rc = fsmSetmeta(fpath, fi, plugins, action, &sb, nofcaps); } } else if (firsthardlink >= 0 && rpmfiArchiveHasContent(fi)) { /* we skip the hard linked file containing the content */ /* write the content to the first used instead */ char *fn = rpmfilesFN(files, firsthardlink); rc = expandRegular(fi, fn, psm, 0, nodigest, 0); firsthardlink = -1; free(fn); } if (rc) { if (!skip) { /* XXX only erase if temp fn w suffix is in use */ if (suffix && (action != FA_TOUCH)) { (void) fsmRemove(fpath, sb.st_mode); } errno = saveerrno; } } else { /* Notify on success. */ rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, rpmfiArchiveTell(fi)); if (!skip) { /* Backup file if needed. Directories are handled earlier */ if (suffix) rc = fsmBackup(fi, action); if (!rc) rc = fsmCommit(&fpath, fi, action, suffix); } } if (rc) *failedFile = xstrdup(fpath); /* Run fsm file post hook for all plugins */ rpmpluginsCallFsmFilePost(plugins, fi, fpath, sb.st_mode, action, rc); fpath = _free(fpath); } rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), fdOp(payload, FDSTAT_READ)); rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), fdOp(payload, FDSTAT_DIGEST)); exit: /* No need to bother with close errors on read */ rpmfiArchiveClose(fi); rpmfiFree(fi); Fclose(payload); free(tid); free(fpath); return rc; }
879
True
1
CVE-2017-7500
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'name': 'https://github.com/rpm-software-management/rpm/commit/f2d3be2a8741234faaa96f5fd05fdfdc75779a79', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'name': 'https://github.com/rpm-software-management/rpm/commit/c815822c8bdb138066ff58c624ae83e3a12ebfa9', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7500', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}]
[{'description': [{'lang': 'en', 'value': 'CWE-59'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.14.0.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13.0.0', 'versionEndExcluding': '4.13.0.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'It was found that rpm did not properly handle RPM installations when a destination path was a symbolic link to a directory, possibly changing ownership and permissions of an arbitrary directory, and RPM files being placed in an arbitrary destination. An attacker, with write access to a directory in which a subdirectory will be installed, could redirect that directory to an arbitrary location and gain root privilege.'}]
2019-10-09T23:29Z
2018-08-13T17:29Z
Improper Link Resolution Before File Access ('Link Following')
The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
https://cwe.mitre.org/data/definitions/59.html
0
Panu Matilainen
2017-09-27 13:45:17+03:00
Make verification match the new restricted directory symlink behavior Only follow directory symlinks owned by target directory owner or root during verification to match the behavior of fsmVerify() in the new CVE-2017-7500 world order. The code is klunkier than it should and the logic should use common code with fsmVerify() instead of duplicating it here, but that needs more changes than is comfortable to backport so starting with this. Also worth noting that the previous "follow the link" logic from commit 3ccd774255b8215733e0bdfdf5a683da9dd10923 was not quite right, it'd fail with RPMVERIFY_LSTATFAIL on a broken symlink when it should've ran verification on the symlink itself. This behavior is fixed here too. Finally, once again fakechroot gets in the way and forces the related verify testcase to be changed to be able to create a valid link. Reuse the replacement testcase for the purpose and add another case for verifying an invalid link.
c815822c8bdb138066ff58c624ae83e3a12ebfa9
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
rpmfilesVerify
rpmfilesVerify( rpmfiles fi , int ix , rpmVerifyAttrs omitMask)
['fi', 'ix', 'omitMask']
rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask) { rpm_mode_t fmode = rpmfilesFMode(fi, ix); rpmfileAttrs fileAttrs = rpmfilesFFlags(fi, ix); rpmVerifyAttrs flags = rpmfilesVFlags(fi, ix); const char * fn = rpmfilesFN(fi, ix); struct stat sb; rpmVerifyAttrs vfy = RPMVERIFY_NONE; /* * Check to see if the file was installed - if not pretend all is OK. */ switch (rpmfilesFState(fi, ix)) { case RPMFILE_STATE_NETSHARED: case RPMFILE_STATE_NOTINSTALLED: goto exit; break; case RPMFILE_STATE_REPLACED: /* For replaced files we can only verify if it exists at all */ flags = RPMVERIFY_LSTATFAIL; break; case RPMFILE_STATE_WRONGCOLOR: /* * Files with wrong color are supposed to share some attributes * with the actually installed file - verify what we can. */ flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_RDEV); break; case RPMFILE_STATE_NORMAL: /* File from a non-installed package, try to verify nevertheless */ case RPMFILE_STATE_MISSING: break; } if (fn == NULL || lstat(fn, &sb) != 0) { vfy |= RPMVERIFY_LSTATFAIL; goto exit; } /* If we expected a directory but got a symlink to one, follow the link */ if (S_ISDIR(fmode) && S_ISLNK(sb.st_mode) && stat(fn, &sb) != 0) { vfy |= RPMVERIFY_LSTATFAIL; goto exit; } /* Links have no mode, other types have no linkto */ if (S_ISLNK(sb.st_mode)) flags &= ~(RPMVERIFY_MODE); else flags &= ~(RPMVERIFY_LINKTO); /* Not all attributes of non-regular files can be verified */ if (!S_ISREG(sb.st_mode)) flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_CAPS); /* Content checks of %ghost files are meaningless. */ if (fileAttrs & RPMFILE_GHOST) flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE | RPMVERIFY_MTIME | RPMVERIFY_LINKTO); /* Don't verify any features in omitMask. */ flags &= ~(omitMask | RPMVERIFY_FAILURES); if (flags & RPMVERIFY_FILEDIGEST) { const unsigned char *digest; int algo; size_t diglen; /* XXX If --nomd5, then prelinked library sizes are not corrected. */ if ((digest = rpmfilesFDigest(fi, ix, &algo, &diglen))) { unsigned char fdigest[diglen]; rpm_loff_t fsize; if (rpmDoDigest(algo, fn, 0, fdigest, &fsize)) { vfy |= (RPMVERIFY_READFAIL|RPMVERIFY_FILEDIGEST); } else { sb.st_size = fsize; if (memcmp(fdigest, digest, diglen)) vfy |= RPMVERIFY_FILEDIGEST; } } else { vfy |= RPMVERIFY_FILEDIGEST; } } if (flags & RPMVERIFY_LINKTO) { char linkto[1024+1]; int size = 0; if ((size = readlink(fn, linkto, sizeof(linkto)-1)) == -1) vfy |= (RPMVERIFY_READLINKFAIL|RPMVERIFY_LINKTO); else { const char * flink = rpmfilesFLink(fi, ix); linkto[size] = '\0'; if (flink == NULL || !rstreq(linkto, flink)) vfy |= RPMVERIFY_LINKTO; } } if (flags & RPMVERIFY_FILESIZE) { if (sb.st_size != rpmfilesFSize(fi, ix)) vfy |= RPMVERIFY_FILESIZE; } if (flags & RPMVERIFY_MODE) { rpm_mode_t metamode = fmode; rpm_mode_t filemode; /* * Platforms (like AIX) where sizeof(rpm_mode_t) != sizeof(mode_t) * need the (rpm_mode_t) cast here. */ filemode = (rpm_mode_t)sb.st_mode; /* * Comparing the type of %ghost files is meaningless, but perms are OK. */ if (fileAttrs & RPMFILE_GHOST) { metamode &= ~0xf000; filemode &= ~0xf000; } if (metamode != filemode) vfy |= RPMVERIFY_MODE; #if WITH_ACL /* * For now, any non-default acl's on a file is a difference as rpm * cannot have set them. */ acl_t facl = acl_get_file(fn, ACL_TYPE_ACCESS); if (facl) { if (acl_equiv_mode(facl, NULL) == 1) { vfy |= RPMVERIFY_MODE; } acl_free(facl); } #endif } if (flags & RPMVERIFY_RDEV) { if (S_ISCHR(fmode) != S_ISCHR(sb.st_mode) || S_ISBLK(fmode) != S_ISBLK(sb.st_mode)) { vfy |= RPMVERIFY_RDEV; } else if (S_ISDEV(fmode) && S_ISDEV(sb.st_mode)) { rpm_rdev_t st_rdev = (sb.st_rdev & 0xffff); rpm_rdev_t frdev = (rpmfilesFRdev(fi, ix) & 0xffff); if (st_rdev != frdev) vfy |= RPMVERIFY_RDEV; } } #if WITH_CAP if (flags & RPMVERIFY_CAPS) { /* * Empty capability set ("=") is not exactly the same as no * capabilities at all but suffices for now... */ cap_t cap, fcap; cap = cap_from_text(rpmfilesFCaps(fi, ix)); if (!cap) { cap = cap_from_text("="); } fcap = cap_get_file(fn); if (!fcap) { fcap = cap_from_text("="); } if (cap_compare(cap, fcap) != 0) vfy |= RPMVERIFY_CAPS; cap_free(fcap); cap_free(cap); } #endif if ((flags & RPMVERIFY_MTIME) && (sb.st_mtime != rpmfilesFMtime(fi, ix))) { vfy |= RPMVERIFY_MTIME; } if (flags & RPMVERIFY_USER) { const char * name = rpmugUname(sb.st_uid); const char * fuser = rpmfilesFUser(fi, ix); uid_t uid; int namematch = 0; int idmatch = 0; if (name && fuser) namematch = rstreq(name, fuser); if (fuser && rpmugUid(fuser, &uid) == 0) idmatch = (uid == sb.st_uid); if (namematch != idmatch) { rpmlog(RPMLOG_WARNING, _("Duplicate username or UID for user %s\n"), fuser); } if (!(namematch || idmatch)) vfy |= RPMVERIFY_USER; } if (flags & RPMVERIFY_GROUP) { const char * name = rpmugGname(sb.st_gid); const char * fgroup = rpmfilesFGroup(fi, ix); gid_t gid; int namematch = 0; int idmatch = 0; if (name && fgroup) namematch = rstreq(name, fgroup); if (fgroup && rpmugGid(fgroup, &gid) == 0) idmatch = (gid == sb.st_gid); if (namematch != idmatch) { rpmlog(RPMLOG_WARNING, _("Duplicate groupname or GID for group %s\n"), fgroup); } if (!(namematch || idmatch)) vfy |= RPMVERIFY_GROUP; } exit: return vfy; }
1005
True
1
CVE-2021-20271
False
False
False
True
AV:N/AC:H/Au:N/C:P/I:P/A:P
NETWORK
HIGH
NONE
PARTIAL
PARTIAL
PARTIAL
5.1
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
LOCAL
HIGH
NONE
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
False
[{'url': 'https://github.com/rpm-software-management/rpm/commit/d6a86b5e69e46cc283b1e06c92343319beb42e21', 'name': 'https://github.com/rpm-software-management/rpm/commit/d6a86b5e69e46cc283b1e06c92343319beb42e21', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1934125', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1934125', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/VHRPNBCRPDJHHQE3MBPSZK4H7X2IM7AC/', 'name': 'FEDORA-2021-2383d950fd', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TMGXO3W6DHPO62GJ4VVF5DEUX5DRUR5K/', 'name': 'FEDORA-2021-8d52a8a999', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/YILPBTPSBRYL4POBI3F4YUSVPSOQNJBY/', 'name': 'FEDORA-2021-662680e477', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-43', 'name': 'GLSA-202107-43', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-345'}, {'lang': 'en', 'value': 'CWE-345'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:alpha:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:alpha:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.15.0', 'versionEndExcluding': '4.15.1.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.16.0', 'versionEndExcluding': '4.16.1.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "A flaw was found in RPM's signature check functionality when reading a package file. This flaw allows an attacker who can convince a victim to install a seemingly verifiable package, whose signature header was modified, to cause RPM database corruption and execute code. The highest threat from this vulnerability is to data integrity, confidentiality, and system availability."}]
2021-12-10T19:50Z
2021-03-26T17:15Z
Insufficient Verification of Data Authenticity
The software does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
https://cwe.mitre.org/data/definitions/345.html
0
Panu Matilainen
2021-03-04 13:21:19+02:00
Be much more careful about copying data from the signature header Only look for known tags, and ensure correct type and size where known before copying over. Bump the old arbitrary 16k count limit to 16M limit though, it's not inconceivable that a package could have that many files. While at it, ensure none of these tags exist in the main header, which would confuse us greatly. This is optimized for backporting ease, upstream can remove redundancies and further improve checking later. Reported and initial patches by Demi Marie Obenour. Fixes: RhBug:1935049, RhBug:1933867, RhBug:1935035, RhBug:1934125, ... Fixes: CVE-2021-3421, CVE-2021-20271
d6a86b5e69e46cc283b1e06c92343319beb42e21
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
headerMergeLegacySigs
headerMergeLegacySigs( Header h , Header sigh)
['h', 'sigh']
void headerMergeLegacySigs(Header h, Header sigh) { HeaderIterator hi; struct rpmtd_s td; hi = headerInitIterator(sigh); for (; headerNext(hi, &td); rpmtdFreeData(&td)) { switch (td.tag) { /* XXX Translate legacy signature tag values. */ case RPMSIGTAG_SIZE: td.tag = RPMTAG_SIGSIZE; break; case RPMSIGTAG_PGP: td.tag = RPMTAG_SIGPGP; break; case RPMSIGTAG_MD5: td.tag = RPMTAG_SIGMD5; break; case RPMSIGTAG_GPG: td.tag = RPMTAG_SIGGPG; break; case RPMSIGTAG_PGP5: td.tag = RPMTAG_SIGPGP5; break; case RPMSIGTAG_PAYLOADSIZE: td.tag = RPMTAG_ARCHIVESIZE; break; case RPMSIGTAG_FILESIGNATURES: td.tag = RPMTAG_FILESIGNATURES; break; case RPMSIGTAG_FILESIGNATURELENGTH: td.tag = RPMTAG_FILESIGNATURELENGTH; break; case RPMSIGTAG_VERITYSIGNATURES: case RPMSIGTAG_VERITYSIGNATUREALGO: case RPMSIGTAG_SHA1: case RPMSIGTAG_SHA256: case RPMSIGTAG_DSA: case RPMSIGTAG_RSA: default: if (!(td.tag >= HEADER_SIGBASE && td.tag < HEADER_TAGBASE)) continue; break; } if (!headerIsEntry(h, td.tag)) { switch (td.type) { case RPM_NULL_TYPE: continue; break; case RPM_CHAR_TYPE: case RPM_INT8_TYPE: case RPM_INT16_TYPE: case RPM_INT32_TYPE: case RPM_INT64_TYPE: if (td.count != 1) continue; break; case RPM_STRING_TYPE: case RPM_STRING_ARRAY_TYPE: case RPM_BIN_TYPE: if (td.count >= 16*1024) continue; break; case RPM_I18NSTRING_TYPE: continue; break; } (void) headerPut(h, &td, HEADERPUT_DEFAULT); } } headerFreeIterator(hi); }
284
True
1
CVE-2021-20271
False
False
False
True
AV:N/AC:H/Au:N/C:P/I:P/A:P
NETWORK
HIGH
NONE
PARTIAL
PARTIAL
PARTIAL
5.1
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
LOCAL
HIGH
NONE
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
False
[{'url': 'https://github.com/rpm-software-management/rpm/commit/d6a86b5e69e46cc283b1e06c92343319beb42e21', 'name': 'https://github.com/rpm-software-management/rpm/commit/d6a86b5e69e46cc283b1e06c92343319beb42e21', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1934125', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1934125', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/VHRPNBCRPDJHHQE3MBPSZK4H7X2IM7AC/', 'name': 'FEDORA-2021-2383d950fd', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/TMGXO3W6DHPO62GJ4VVF5DEUX5DRUR5K/', 'name': 'FEDORA-2021-8d52a8a999', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/YILPBTPSBRYL4POBI3F4YUSVPSOQNJBY/', 'name': 'FEDORA-2021-662680e477', 'refsource': 'FEDORA', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-43', 'name': 'GLSA-202107-43', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-345'}, {'lang': 'en', 'value': 'CWE-345'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:beta2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:beta3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.16.0:alpha:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:beta1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:4.15.0:alpha:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.15.0', 'versionEndExcluding': '4.15.1.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.16.0', 'versionEndExcluding': '4.16.1.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "A flaw was found in RPM's signature check functionality when reading a package file. This flaw allows an attacker who can convince a victim to install a seemingly verifiable package, whose signature header was modified, to cause RPM database corruption and execute code. The highest threat from this vulnerability is to data integrity, confidentiality, and system availability."}]
2021-12-10T19:50Z
2021-03-26T17:15Z
Insufficient Verification of Data Authenticity
The software does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
https://cwe.mitre.org/data/definitions/345.html
0
Panu Matilainen
2021-03-04 13:21:19+02:00
Be much more careful about copying data from the signature header Only look for known tags, and ensure correct type and size where known before copying over. Bump the old arbitrary 16k count limit to 16M limit though, it's not inconceivable that a package could have that many files. While at it, ensure none of these tags exist in the main header, which would confuse us greatly. This is optimized for backporting ease, upstream can remove redundancies and further improve checking later. Reported and initial patches by Demi Marie Obenour. Fixes: RhBug:1935049, RhBug:1933867, RhBug:1935035, RhBug:1934125, ... Fixes: CVE-2021-3421, CVE-2021-20271
d6a86b5e69e46cc283b1e06c92343319beb42e21
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
rpmReadPackageFile
rpmReadPackageFile( rpmts ts , FD_t fd , const char * fn , Header * hdrp)
['ts', 'fd', 'fn', 'hdrp']
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) { char *msg = NULL; Header h = NULL; Header sigh = NULL; hdrblob blob = NULL; hdrblob sigblob = NULL; rpmVSFlags vsflags = rpmtsVSFlags(ts) | RPMVSF_NEEDPAYLOAD; rpmKeyring keyring = rpmtsGetKeyring(ts, 1); struct rpmvs_s *vs = rpmvsCreate(0, vsflags, keyring); struct pkgdata_s pkgdata = { .msgfunc = loghdrmsg, .fn = fn ? fn : Fdescr(fd), .msg = NULL, .rc = RPMRC_OK, }; /* XXX: lots of 3rd party software relies on the behavior */ if (hdrp) *hdrp = NULL; rpmRC rc = rpmpkgRead(vs, fd, &sigblob, &blob, &msg); if (rc) goto exit; /* Actually all verify discovered signatures and digests */ rc = RPMRC_FAIL; if (!rpmvsVerify(vs, RPMSIG_VERIFIABLE_TYPE, handleHdrVS, &pkgdata)) { /* Finally import the headers and do whatever required retrofits etc */ if (hdrp) { if (hdrblobImport(sigblob, 0, &sigh, &msg)) goto exit; if (hdrblobImport(blob, 0, &h, &msg)) goto exit; /* Append (and remap) signature tags to the metadata. */ headerMergeLegacySigs(h, sigh); applyRetrofits(h); /* Bump reference count for return. */ *hdrp = headerLink(h); } rc = RPMRC_OK; } /* If there was a "substatus" (NOKEY in practise), return that instead */ if (rc == RPMRC_OK && pkgdata.rc) rc = pkgdata.rc; exit: if (rc && msg) rpmlog(RPMLOG_ERR, "%s: %s\n", Fdescr(fd), msg); hdrblobFree(sigblob); hdrblobFree(blob); headerFree(sigh); headerFree(h); rpmKeyringFree(keyring); rpmvsFree(vs); free(msg); return rc; }
311
True
1
CVE-2021-3521
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
LOCAL
HIGH
NONE
REQUIRED
UNCHANGED
NONE
HIGH
NONE
4.7
MEDIUM
1.0
3.6
nan
[{'url': 'https://access.redhat.com/security/cve/CVE-2021-3521', 'name': 'https://access.redhat.com/security/cve/CVE-2021-3521', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/rpm-software-management/rpm/pull/1795/', 'name': 'https://github.com/rpm-software-management/rpm/pull/1795/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1941098', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1941098', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/rpm-software-management/rpm/commit/bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8', 'name': 'https://github.com/rpm-software-management/rpm/commit/bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-347'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:rpm:rpm:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'There is a flaw in RPM\'s signature functionality. OpenPGP subkeys are associated with a primary key via a "binding signature." RPM does not check the binding signature of subkeys prior to importing them. If an attacker is able to add or socially engineer another party to add a malicious subkey to a legitimate public key, RPM could wrongly trust a malicious signature. The greatest impact of this flaw is to data integrity. To exploit this flaw, an attacker must either compromise an RPM repository or convince an administrator to install an untrusted RPM or public key. It is strongly recommended to only use RPMs and public keys from trusted sources.'}]
2022-08-26T15:36Z
2022-08-22T15:15Z
Improper Verification of Cryptographic Signature
The software does not verify, or incorrectly verifies, the cryptographic signature for data.
https://cwe.mitre.org/data/definitions/347.html
0
Panu Matilainen
2021-09-30 09:59:30+03:00
Validate and require subkey binding signatures on PGP public keys All subkeys must be followed by a binding signature by the primary key as per the OpenPGP RFC, enforce the presence and validity in the parser. The implementation is as kludgey as they come to work around our simple-minded parser structure without touching API, to maximise backportability. Store all the raw packets internally as we decode them to be able to access previous elements at will, needed to validate ordering and access the actual data. Add testcases for manipulated keys whose import previously would succeed. Depends on the two previous commits: 7b399fcb8f52566e6f3b4327197a85facd08db91 and 236b802a4aa48711823a191d1b7f753c82a89ec5 Fixes CVE-2021-3521.
bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
pgpPrtParams
pgpPrtParams( const uint8_t * pkts , size_t pktlen , unsigned int pkttype , pgpDigParams * ret)
['pkts', 'pktlen', 'pkttype', 'ret']
int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype, pgpDigParams * ret) { const uint8_t *p = pkts; const uint8_t *pend = pkts + pktlen; pgpDigParams digp = NULL; struct pgpPkt pkt; int rc = -1; /* assume failure */ while (p < pend) { if (decodePkt(p, (pend - p), &pkt)) break; if (digp == NULL) { if (pkttype && pkt.tag != pkttype) { break; } else { digp = pgpDigParamsNew(pkt.tag); } } if (pgpPrtPkt(&pkt, digp)) break; p += (pkt.body - pkt.head) + pkt.blen; if (pkttype == PGPTAG_SIGNATURE) break; } rc = (digp && (p == pend)) ? 0 : -1; if (ret && rc == 0) { *ret = digp; } else { pgpDigParamsFree(digp); } return rc; }
190
True
1
CVE-2021-35939
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/rpm-software-management/rpm/pull/1919', 'name': 'https://github.com/rpm-software-management/rpm/pull/1919', 'refsource': 'MISC', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'refsource': 'MISC', 'tags': []}, {'url': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'name': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'refsource': 'MISC', 'tags': []}, {'url': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'name': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'refsource': 'MISC', 'tags': []}, {'url': 'https://rpm.org/wiki/Releases/4.18.0', 'name': 'https://rpm.org/wiki/Releases/4.18.0', 'refsource': 'MISC', 'tags': []}]
[{'description': []}]
nan
[]
[{'lang': 'en', 'value': 'It was found that the fix for CVE-2017-7500 and CVE-2017-7501 was incomplete: the check was only implemented for the parent directory of the file to be created. A local unprivileged user who owns another ancestor directory could potentially use this flaw to gain root privileges. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.'}]
2022-08-26T17:17Z
2022-08-26T16:15Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Panu Matilainen
2022-02-10 14:32:43+02:00
Validate intermediate symlinks during installation, CVE-2021-35939 Whenever directory changes during unpacking, walk the entire tree from starting from / and validate any symlinks crossed, fail the install on invalid links. This is the first of step of many towards securing our file operations against local tamperers and besides plugging that one CVE, paves the way for the next step by adding the necessary directory fd tracking. This also bumps the rpm OS requirements to a whole new level by requiring the *at() family of calls from POSIX-1.2008. This necessarily does a whole lot of huffing and puffing we previously did not do. It should be possible to cache secure (ie root-owned) directory structures to avoid validating everything a million times but for now, just keeping things simple.
96ec957e281220f8e137a2d5eb23b83a6377d556
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
fsmMkdir
fsmMkdir( const char * path , mode_t mode)
['path', 'mode']
static int fsmMkdir(const char *path, mode_t mode) { int rc = mkdir(path, (mode & 07777)); if (_fsm_debug) rpmlog(RPMLOG_DEBUG, " %8s (%s, 0%04o) %s\n", __func__, path, (unsigned)(mode & 07777), (rc < 0 ? strerror(errno) : "")); if (rc < 0) rc = RPMERR_MKDIR_FAILED; return rc; }
76
True
1
CVE-2021-35939
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/rpm-software-management/rpm/pull/1919', 'name': 'https://github.com/rpm-software-management/rpm/pull/1919', 'refsource': 'MISC', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'refsource': 'MISC', 'tags': []}, {'url': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'name': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'refsource': 'MISC', 'tags': []}, {'url': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'name': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'refsource': 'MISC', 'tags': []}, {'url': 'https://rpm.org/wiki/Releases/4.18.0', 'name': 'https://rpm.org/wiki/Releases/4.18.0', 'refsource': 'MISC', 'tags': []}]
[{'description': []}]
nan
[]
[{'lang': 'en', 'value': 'It was found that the fix for CVE-2017-7500 and CVE-2017-7501 was incomplete: the check was only implemented for the parent directory of the file to be created. A local unprivileged user who owns another ancestor directory could potentially use this flaw to gain root privileges. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.'}]
2022-08-26T17:17Z
2022-08-26T16:15Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Panu Matilainen
2022-02-10 14:32:43+02:00
Validate intermediate symlinks during installation, CVE-2021-35939 Whenever directory changes during unpacking, walk the entire tree from starting from / and validate any symlinks crossed, fail the install on invalid links. This is the first of step of many towards securing our file operations against local tamperers and besides plugging that one CVE, paves the way for the next step by adding the necessary directory fd tracking. This also bumps the rpm OS requirements to a whole new level by requiring the *at() family of calls from POSIX-1.2008. This necessarily does a whole lot of huffing and puffing we previously did not do. It should be possible to cache secure (ie root-owned) directory structures to avoid validating everything a million times but for now, just keeping things simple.
96ec957e281220f8e137a2d5eb23b83a6377d556
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
fsmMkdirs
fsmMkdirs( rpmfiles files , rpmfs fs , rpmPlugins plugins)
['files', 'fs', 'plugins']
static int fsmMkdirs(rpmfiles files, rpmfs fs, rpmPlugins plugins) { DNLI_t dnli = dnlInitIterator(files, fs, 0); struct stat sb; const char *dpath; int rc = 0; int i; size_t ldnlen = 0; const char * ldn = NULL; while ((dpath = dnlNextIterator(dnli)) != NULL) { size_t dnlen = strlen(dpath); char * te, dn[dnlen+1]; if (dnlen <= 1) continue; if (dnlen == ldnlen && rstreq(dpath, ldn)) continue; /* Copy as we need to modify the string */ (void) stpcpy(dn, dpath); /* Assume '/' directory exists, "mkdir -p" for others if non-existent */ for (i = 1, te = dn + 1; *te != '\0'; te++, i++) { if (*te != '/') continue; /* Already validated? */ if (i < ldnlen && (ldn[i] == '/' || ldn[i] == '\0') && rstreqn(dn, ldn, i)) continue; /* Validate next component of path. */ *te = '\0'; rc = fsmStat(dn, 1, &sb); /* lstat */ *te = '/'; /* Directory already exists? */ if (rc == 0 && S_ISDIR(sb.st_mode)) { continue; } else if (rc == RPMERR_ENOENT) { *te = '\0'; mode_t mode = S_IFDIR | (_dirPerms & 07777); rpmFsmOp op = (FA_CREATE|FAF_UNOWNED); /* Run fsm file pre hook for all plugins */ rc = rpmpluginsCallFsmFilePre(plugins, NULL, dn, mode, op); if (!rc) rc = fsmMkdir(dn, mode); if (!rc) { rc = rpmpluginsCallFsmFilePrepare(plugins, NULL, dn, dn, mode, op); } /* Run fsm file post hook for all plugins */ rpmpluginsCallFsmFilePost(plugins, NULL, dn, mode, op, rc); if (!rc) { rpmlog(RPMLOG_DEBUG, "%s directory created with perms %04o\n", dn, (unsigned)(mode & 07777)); } *te = '/'; } if (rc) break; } if (rc) break; /* Save last validated path. */ ldn = dpath; ldnlen = dnlen; } dnlFreeIterator(dnli); return rc; }
387
True
1
CVE-2021-35939
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/rpm-software-management/rpm/pull/1919', 'name': 'https://github.com/rpm-software-management/rpm/pull/1919', 'refsource': 'MISC', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1964129', 'refsource': 'MISC', 'tags': []}, {'url': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'name': 'https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556', 'refsource': 'MISC', 'tags': []}, {'url': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'name': 'https://access.redhat.com/security/cve/CVE-2021-35939', 'refsource': 'MISC', 'tags': []}, {'url': 'https://rpm.org/wiki/Releases/4.18.0', 'name': 'https://rpm.org/wiki/Releases/4.18.0', 'refsource': 'MISC', 'tags': []}]
[{'description': []}]
nan
[]
[{'lang': 'en', 'value': 'It was found that the fix for CVE-2017-7500 and CVE-2017-7501 was incomplete: the check was only implemented for the parent directory of the file to be created. A local unprivileged user who owns another ancestor directory could potentially use this flaw to gain root privileges. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.'}]
2022-08-26T17:17Z
2022-08-26T16:15Z
Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Panu Matilainen
2022-02-10 14:32:43+02:00
Validate intermediate symlinks during installation, CVE-2021-35939 Whenever directory changes during unpacking, walk the entire tree from starting from / and validate any symlinks crossed, fail the install on invalid links. This is the first of step of many towards securing our file operations against local tamperers and besides plugging that one CVE, paves the way for the next step by adding the necessary directory fd tracking. This also bumps the rpm OS requirements to a whole new level by requiring the *at() family of calls from POSIX-1.2008. This necessarily does a whole lot of huffing and puffing we previously did not do. It should be possible to cache secure (ie root-owned) directory structures to avoid validating everything a million times but for now, just keeping things simple.
96ec957e281220f8e137a2d5eb23b83a6377d556
False
rpm-software-management/rpm
null
2015-02-24 12:00:53
2022-08-27 13:19:13
http://rpm.org
rpm-software-management
365.0
311.0
rpmPackageFilesInstall
rpmPackageFilesInstall( rpmts ts , rpmte te , rpmfiles files , rpmpsm psm , char ** failedFile)
['ts', 'te', 'files', 'psm', 'failedFile']
int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files, rpmpsm psm, char ** failedFile) { FD_t payload = rpmtePayload(te); rpmfi fi = NULL; rpmfs fs = rpmteGetFileStates(te); rpmPlugins plugins = rpmtsPlugins(ts); int rc = 0; int fx = -1; int fc = rpmfilesFC(files); int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0; int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0; FD_t firstlinkfile = NULL; char *tid = NULL; struct filedata_s *fdata = xcalloc(fc, sizeof(*fdata)); struct filedata_s *firstlink = NULL; /* transaction id used for temporary path suffix while installing */ rasprintf(&tid, ";%08x", (unsigned)rpmtsGetTid(ts)); /* Collect state data for the whole operation */ fi = rpmfilesIter(files, RPMFI_ITER_FWD); while (!rc && (fx = rpmfiNext(fi)) >= 0) { struct filedata_s *fp = &fdata[fx]; if (rpmfiFFlags(fi) & RPMFILE_GHOST) fp->action = FA_SKIP; else fp->action = rpmfsGetAction(fs, fx); fp->skip = XFA_SKIPPING(fp->action); fp->setmeta = 1; if (XFA_CREATING(fp->action) && !S_ISDIR(rpmfiFMode(fi))) fp->suffix = tid; fp->fpath = fsmFsPath(fi, fp->suffix); /* Remap file perms, owner, and group. */ rc = rpmfiStat(fi, 1, &fp->sb); setFileState(fs, fx); fsmDebug(fp->fpath, fp->action, &fp->sb); /* Run fsm file pre hook for all plugins */ rc = rpmpluginsCallFsmFilePre(plugins, fi, fp->fpath, fp->sb.st_mode, fp->action); fp->stage = FILE_PRE; } fi = rpmfiFree(fi); if (rc) goto exit; if (rpmteType(te) == TR_ADDED) fi = rpmfiNewArchiveReader(payload, files, RPMFI_ITER_READ_ARCHIVE); else fi = rpmfilesIter(files, RPMFI_ITER_FWD); if (fi == NULL) { rc = RPMERR_BAD_MAGIC; goto exit; } /* Detect and create directories not explicitly in package. */ if (!rc) rc = fsmMkdirs(files, fs, plugins); /* Process the payload */ while (!rc && (fx = rpmfiNext(fi)) >= 0) { struct filedata_s *fp = &fdata[fx]; if (!fp->skip) { /* Directories replacing something need early backup */ if (!fp->suffix) { rc = fsmBackup(fi, fp->action); } /* Assume file does't exist when tmp suffix is in use */ if (!fp->suffix) { if (fp->action == FA_TOUCH) { struct stat sb; rc = fsmStat(fp->fpath, 1, &sb); } else { rc = fsmVerify(fp->fpath, fi); } } else { rc = RPMERR_ENOENT; } /* See if the file was removed while our attention was elsewhere */ if (rc == RPMERR_ENOENT && fp->action == FA_TOUCH) { rpmlog(RPMLOG_DEBUG, "file %s vanished unexpectedly\n", fp->fpath); fp->action = FA_CREATE; fsmDebug(fp->fpath, fp->action, &fp->sb); } /* When touching we don't need any of this... */ if (fp->action == FA_TOUCH) continue; if (S_ISREG(fp->sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMkfile(fi, fp, files, psm, nodigest, &firstlink, &firstlinkfile); } } else if (S_ISDIR(fp->sb.st_mode)) { if (rc == RPMERR_ENOENT) { mode_t mode = fp->sb.st_mode; mode &= ~07777; mode |= 00700; rc = fsmMkdir(fp->fpath, mode); } } else if (S_ISLNK(fp->sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmSymlink(rpmfiFLink(fi), fp->fpath); } } else if (S_ISFIFO(fp->sb.st_mode)) { /* This mimics cpio S_ISSOCK() behavior but probably isn't right */ if (rc == RPMERR_ENOENT) { rc = fsmMkfifo(fp->fpath, 0000); } } else if (S_ISCHR(fp->sb.st_mode) || S_ISBLK(fp->sb.st_mode) || S_ISSOCK(fp->sb.st_mode)) { if (rc == RPMERR_ENOENT) { rc = fsmMknod(fp->fpath, fp->sb.st_mode, fp->sb.st_rdev); } } else { /* XXX Special case /dev/log, which shouldn't be packaged anyways */ if (!IS_DEV_LOG(fp->fpath)) rc = RPMERR_UNKNOWN_FILETYPE; } } else if (firstlink && rpmfiArchiveHasContent(fi)) { /* * Tricksy case: this file is a being skipped, but it's part of * a hardlinked set and has the actual content linked with it. * Write the content to the first non-skipped file of the set * instead. */ rc = fsmMkfile(fi, firstlink, files, psm, nodigest, &firstlink, &firstlinkfile); } /* Notify on success. */ if (rc) *failedFile = xstrdup(fp->fpath); else rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, rpmfiArchiveTell(fi)); fp->stage = FILE_UNPACK; } fi = rpmfiFree(fi); if (!rc && fx < 0 && fx != RPMERR_ITER_END) rc = fx; /* Set permissions, timestamps etc for non-hardlink entries */ fi = rpmfilesIter(files, RPMFI_ITER_FWD); while (!rc && (fx = rpmfiNext(fi)) >= 0) { struct filedata_s *fp = &fdata[fx]; if (!fp->skip && fp->setmeta) { rc = fsmSetmeta(fp->fpath, fi, plugins, fp->action, &fp->sb, nofcaps); } if (rc) *failedFile = xstrdup(fp->fpath); fp->stage = FILE_PREP; } fi = rpmfiFree(fi); /* If all went well, commit files to final destination */ fi = rpmfilesIter(files, RPMFI_ITER_FWD); while (!rc && (fx = rpmfiNext(fi)) >= 0) { struct filedata_s *fp = &fdata[fx]; if (!fp->skip) { /* Backup file if needed. Directories are handled earlier */ if (!rc && fp->suffix) rc = fsmBackup(fi, fp->action); if (!rc) rc = fsmCommit(&fp->fpath, fi, fp->action, fp->suffix); if (!rc) fp->stage = FILE_COMMIT; else *failedFile = xstrdup(fp->fpath); } } fi = rpmfiFree(fi); /* Walk backwards in case we need to erase */ fi = rpmfilesIter(files, RPMFI_ITER_BACK); while ((fx = rpmfiNext(fi)) >= 0) { struct filedata_s *fp = &fdata[fx]; /* Run fsm file post hook for all plugins for all processed files */ if (fp->stage) { rpmpluginsCallFsmFilePost(plugins, fi, fp->fpath, fp->sb.st_mode, fp->action, rc); } /* On failure, erase non-committed files */ if (rc && fp->stage > FILE_NONE && !fp->skip) { (void) fsmRemove(fp->fpath, fp->sb.st_mode); } } rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS), fdOp(payload, FDSTAT_READ)); rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST), fdOp(payload, FDSTAT_DIGEST)); exit: fi = rpmfiFree(fi); Fclose(payload); free(tid); for (int i = 0; i < fc; i++) free(fdata[i].fpath); free(fdata); return rc; }
1319
True
1
CVE-2017-7524
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:N
NETWORK
LOW
NONE
PARTIAL
NONE
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
NONE
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://github.com/01org/tpm2.0-tools/commit/c5d72beaab1cbbbe68271f4bc4b6670d69985157', 'name': 'https://github.com/01org/tpm2.0-tools/commit/c5d72beaab1cbbbe68271f4bc4b6670d69985157', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-522'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:tpm2-tools_project:tpm2.0-tools:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.1.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'tpm2-tools versions before 1.1.1 are vulnerable to a password leak due to transmitting password in plaintext from client to server when generating HMAC.'}]
2019-10-09T23:29Z
2017-06-27T14:29Z
Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
https://cwe.mitre.org/data/definitions/522.html
0
William Roberts
2017-06-21 09:32:32-07:00
kdfa: use openssl for hmac not tpm While not reachable in the current code base tools, a potential security bug lurked in tpm_kdfa(). If using that routine for an hmac authorization, the hmac was calculated using the tpm. A user of an object wishing to authenticate via hmac, would expect that the password is never sent to the tpm. However, since the hmac calculation relies on password, and is performed by the tpm, the password ends up being sent in plain text to the tpm. The fix is to use openssl to generate the hmac on the host. Fixes: CVE-2017-7524 Signed-off-by: William Roberts <[email protected]>
c5d72beaab1cbbbe68271f4bc4b6670d69985157
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
01org
visit repo url
visit repo url
tpm_kdfa
tpm_kdfa( TSS2_SYS_CONTEXT * sapi_context , TPMI_ALG_HASH hashAlg , TPM2B * key , char * label , TPM2B * contextU , TPM2B * contextV , UINT16 bits , TPM2B_MAX_BUFFER * resultKey)
['sapi_context', 'hashAlg', 'key', 'label', 'contextU', 'contextV', 'bits', 'resultKey']
TPM_RC tpm_kdfa(TSS2_SYS_CONTEXT *sapi_context, TPMI_ALG_HASH hashAlg, TPM2B *key, char *label, TPM2B *contextU, TPM2B *contextV, UINT16 bits, TPM2B_MAX_BUFFER *resultKey ) { TPM2B_DIGEST tmpResult; TPM2B_DIGEST tpm2bLabel, tpm2bBits, tpm2b_i_2; UINT8 *tpm2bBitsPtr = &tpm2bBits.t.buffer[0]; UINT8 *tpm2b_i_2Ptr = &tpm2b_i_2.t.buffer[0]; TPM2B_DIGEST *bufferList[8]; UINT32 bitsSwizzled, i_Swizzled; TPM_RC rval; int i, j; UINT16 bytes = bits / 8; resultKey->t .size = 0; tpm2b_i_2.t.size = 4; tpm2bBits.t.size = 4; bitsSwizzled = string_bytes_endian_convert_32( bits ); *(UINT32 *)tpm2bBitsPtr = bitsSwizzled; for(i = 0; label[i] != 0 ;i++ ); tpm2bLabel.t.size = i+1; for( i = 0; i < tpm2bLabel.t.size; i++ ) { tpm2bLabel.t.buffer[i] = label[i]; } resultKey->t.size = 0; i = 1; while( resultKey->t.size < bytes ) { // Inner loop i_Swizzled = string_bytes_endian_convert_32( i ); *(UINT32 *)tpm2b_i_2Ptr = i_Swizzled; j = 0; bufferList[j++] = (TPM2B_DIGEST *)&(tpm2b_i_2.b); bufferList[j++] = (TPM2B_DIGEST *)&(tpm2bLabel.b); bufferList[j++] = (TPM2B_DIGEST *)contextU; bufferList[j++] = (TPM2B_DIGEST *)contextV; bufferList[j++] = (TPM2B_DIGEST *)&(tpm2bBits.b); bufferList[j++] = (TPM2B_DIGEST *)0; rval = tpm_hmac(sapi_context, hashAlg, key, (TPM2B **)&( bufferList[0] ), &tmpResult ); if( rval != TPM_RC_SUCCESS ) { return( rval ); } bool res = string_bytes_concat_buffer(resultKey, &(tmpResult.b)); if (!res) { return TSS2_SYS_RC_BAD_VALUE; } } // Truncate the result to the desired size. resultKey->t.size = bytes; return TPM_RC_SUCCESS; }
405
True
1
CVE-2017-7524
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:N
NETWORK
LOW
NONE
PARTIAL
NONE
NONE
5.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
NONE
NONE
7.5
HIGH
3.9
3.6
nan
[{'url': 'https://github.com/01org/tpm2.0-tools/commit/c5d72beaab1cbbbe68271f4bc4b6670d69985157', 'name': 'https://github.com/01org/tpm2.0-tools/commit/c5d72beaab1cbbbe68271f4bc4b6670d69985157', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-522'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:tpm2-tools_project:tpm2.0-tools:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.1.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'tpm2-tools versions before 1.1.1 are vulnerable to a password leak due to transmitting password in plaintext from client to server when generating HMAC.'}]
2019-10-09T23:29Z
2017-06-27T14:29Z
Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
https://cwe.mitre.org/data/definitions/522.html
0
William Roberts
2017-06-21 09:32:32-07:00
kdfa: use openssl for hmac not tpm While not reachable in the current code base tools, a potential security bug lurked in tpm_kdfa(). If using that routine for an hmac authorization, the hmac was calculated using the tpm. A user of an object wishing to authenticate via hmac, would expect that the password is never sent to the tpm. However, since the hmac calculation relies on password, and is performed by the tpm, the password ends up being sent in plain text to the tpm. The fix is to use openssl to generate the hmac on the host. Fixes: CVE-2017-7524 Signed-off-by: William Roberts <[email protected]>
c5d72beaab1cbbbe68271f4bc4b6670d69985157
False
visit repo url
visit repo url
visit repo url
visit repo url
visit repo url
01org
visit repo url
visit repo url
StartAuthSession
StartAuthSession( TSS2_SYS_CONTEXT * sapi_context , SESSION * session)
['sapi_context', 'session']
static TPM_RC StartAuthSession(TSS2_SYS_CONTEXT *sapi_context, SESSION *session ) { TPM_RC rval; TPM2B_ENCRYPTED_SECRET key; char label[] = "ATH"; UINT16 bytes; int i; key.t.size = 0; if( session->nonceOlder.t.size == 0 ) { /* this is an internal routine to TSS and should be removed */ session->nonceOlder.t.size = GetDigestSize( TPM_ALG_SHA1 ); for( i = 0; i < session->nonceOlder.t.size; i++ ) session->nonceOlder.t.buffer[i] = 0; } session->nonceNewer.t.size = session->nonceOlder.t.size; rval = Tss2_Sys_StartAuthSession( sapi_context, session->tpmKey, session->bind, 0, &( session->nonceOlder ), &( session->encryptedSalt ), session->sessionType, &( session->symmetric ), session->authHash, &( session->sessionHandle ), &( session->nonceNewer ), 0 ); if( rval == TPM_RC_SUCCESS ) { if( session->tpmKey == TPM_RH_NULL ) session->salt.t.size = 0; if( session->bind == TPM_RH_NULL ) session->authValueBind.t.size = 0; if( session->tpmKey == TPM_RH_NULL && session->bind == TPM_RH_NULL ) { session->sessionKey.b.size = 0; } else { // Generate the key used as input to the KDF. // Generate the key used as input to the KDF. bool result = string_bytes_concat_buffer( (TPM2B_MAX_BUFFER *)&key, &( session->authValueBind.b ) ); if (!result) { return TSS2_SYS_RC_BAD_VALUE; } result = string_bytes_concat_buffer( (TPM2B_MAX_BUFFER *)&key, &( session->salt.b ) ); if (!result) { return TSS2_SYS_RC_BAD_VALUE; } bytes = GetDigestSize( session->authHash ); if( key.t.size == 0 ) { session->sessionKey.t.size = 0; } else { rval = tpm_kdfa(sapi_context, session->authHash, &(key.b), label, &( session->nonceNewer.b ), &( session->nonceOlder.b ), bytes * 8, (TPM2B_MAX_BUFFER *)&( session->sessionKey ) ); } if( rval != TPM_RC_SUCCESS ) { return( TSS2_APP_RC_CREATE_SESSION_KEY_FAILED ); } } session->nonceTpmDecrypt.b.size = 0; session->nonceTpmEncrypt.b.size = 0; session->nvNameChanged = 0; } return rval; }
441
True
1
CVE-2017-7875
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
nan
[{'url': 'https://github.com/derf/feh/commit/f7a547b7ef8fc8ebdeaa4c28515c9d72e592fb6d', 'name': 'https://github.com/derf/feh/commit/f7a547b7ef8fc8ebdeaa4c28515c9d72e592fb6d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://feh.finalrewind.org/', 'name': 'https://feh.finalrewind.org/', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Product']}, {'url': 'http://www.securityfocus.com/bid/97689', 'name': '97689', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.gentoo.org/glsa/201707-08', 'name': 'GLSA-201707-08', 'refsource': 'GENTOO', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/05/msg00021.html', 'name': '[debian-lts-announce] 20200524 [SECURITY] [DLA 2219-1] feh security update', 'refsource': 'MLIST', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:feh_project:feh:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.18.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In wallpaper.c in feh before v2.18.3, if a malicious client pretends to be the E17 window manager, it is possible to trigger an out-of-boundary heap write while receiving an IPC message. An integer overflow leads to a buffer overflow and/or a double free.'}]
2020-05-24T20:15Z
2017-04-14T18:59Z
Out-of-bounds Write
The software writes data past the end, or before the beginning, of the intended buffer.
Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/787.html
0
Tobias Stoeckmann
2017-03-23 16:45:20+01:00
Fix double-free/OOB-write while receiving IPC data If a malicious client pretends to be the E17 window manager, it is possible to trigger an out of boundary heap write while receiving an IPC message. The length of the already received message is stored in an unsigned short, which overflows after receiving 64 KB of data. It's comparably small amount of data and therefore achievable for an attacker. When len overflows, realloc() will either be called with a small value and therefore chars will be appended out of bounds, or len + 1 will be exactly 0, in which case realloc() behaves like free(). This could be abused for a later double-free attack as it's even possible to overwrite the free information -- but this depends on the malloc implementation. Signed-off-by: Tobias Stoeckmann <[email protected]>
f7a547b7ef8fc8ebdeaa4c28515c9d72e592fb6d
False
derf/feh
a fast and light image viewer
2010-02-05 17:15:56
2022-08-22 15:54:01
https://feh.finalrewind.org
derf
1056.0
147.0
enl_ipc_get
enl_ipc_get( const char * msg_data)
['msg_data']
char *enl_ipc_get(const char *msg_data) { static char *message = NULL; static unsigned short len = 0; char buff[13], *ret_msg = NULL; register unsigned char i; unsigned char blen; if (msg_data == IPC_TIMEOUT) { return(IPC_TIMEOUT); } for (i = 0; i < 12; i++) { buff[i] = msg_data[i]; } buff[12] = 0; blen = strlen(buff); if (message != NULL) { len += blen; message = (char *) erealloc(message, len + 1); strcat(message, buff); } else { len = blen; message = (char *) emalloc(len + 1); strcpy(message, buff); } if (blen < 12) { ret_msg = message; message = NULL; D(("Received complete reply: \"%s\"\n", ret_msg)); } return(ret_msg); }
186
True
1
CVE-2017-8326
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:P/A:P
NETWORK
MEDIUM
NONE
PARTIAL
PARTIAL
PARTIAL
6.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
8.8
HIGH
2.8
5.9
False
[{'url': 'https://github.com/jsummers/imageworsener/commit/a00183107d4b84bc8a714290e824ca9c68dac738', 'name': 'https://github.com/jsummers/imageworsener/commit/a00183107d4b84bc8a714290e824ca9c68dac738', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/04/27/imageworsener-two-left-shift/', 'name': 'https://blogs.gentoo.org/ago/2017/04/27/imageworsener-two-left-shift/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.gentoo.org/glsa/201706-06', 'name': 'GLSA-201706-06', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-682'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:entropymine:imageworsener:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.3.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'libimageworsener.a in ImageWorsener before 1.3.1 has "left shift cannot be represented in type int" undefined behavior issues, which might allow remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image, related to imagew-bmp.c and imagew-util.c.'}]
2019-10-03T00:03Z
2017-04-29T20:59Z
Incorrect Calculation
The software performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.
When software performs a security-critical calculation incorrectly, it might lead to incorrect resource allocations, incorrect privilege assignments, or failed comparisons among other things. Many of the direct results of an incorrect calculation can lead to even larger problems such as failed protection mechanisms or even arbitrary code execution.
https://cwe.mitre.org/data/definitions/682.html
0
Jason Summers
2017-04-22 08:50:41-04:00
Trying to fix some invalid left shift operations Fixes issue #16
a00183107d4b84bc8a714290e824ca9c68dac738
False
jsummers/imageworsener
A utility for processing PNG, JPEG, BMP, and WebP images. Features include resize/resample, dither, grayscale, apply background color, subpixel rendering.
2011-02-08 00:35:27
2022-03-28 19:09:02
https://entropymine.com/imageworsener/
jsummers
204.0
28.0
find_high_bit
find_high_bit( unsigned int x)
['x']
static int find_high_bit(unsigned int x) { int i; for(i=31;i>=0;i--) { if(x&(1<<i)) return i; } return 0; }
43
True
1
CVE-2017-8326
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:P/A:P
NETWORK
MEDIUM
NONE
PARTIAL
PARTIAL
PARTIAL
6.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
8.8
HIGH
2.8
5.9
False
[{'url': 'https://github.com/jsummers/imageworsener/commit/a00183107d4b84bc8a714290e824ca9c68dac738', 'name': 'https://github.com/jsummers/imageworsener/commit/a00183107d4b84bc8a714290e824ca9c68dac738', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://blogs.gentoo.org/ago/2017/04/27/imageworsener-two-left-shift/', 'name': 'https://blogs.gentoo.org/ago/2017/04/27/imageworsener-two-left-shift/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.gentoo.org/glsa/201706-06', 'name': 'GLSA-201706-06', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-682'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:entropymine:imageworsener:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.3.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'libimageworsener.a in ImageWorsener before 1.3.1 has "left shift cannot be represented in type int" undefined behavior issues, which might allow remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image, related to imagew-bmp.c and imagew-util.c.'}]
2019-10-03T00:03Z
2017-04-29T20:59Z
Incorrect Calculation
The software performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.
When software performs a security-critical calculation incorrectly, it might lead to incorrect resource allocations, incorrect privilege assignments, or failed comparisons among other things. Many of the direct results of an incorrect calculation can lead to even larger problems such as failed protection mechanisms or even arbitrary code execution.
https://cwe.mitre.org/data/definitions/682.html
0
Jason Summers
2017-04-22 08:50:41-04:00
Trying to fix some invalid left shift operations Fixes issue #16
a00183107d4b84bc8a714290e824ca9c68dac738
False
jsummers/imageworsener
A utility for processing PNG, JPEG, BMP, and WebP images. Features include resize/resample, dither, grayscale, apply background color, subpixel rendering.
2011-02-08 00:35:27
2022-03-28 19:09:02
https://entropymine.com/imageworsener/
jsummers
204.0
28.0
find_low_bit
find_low_bit( unsigned int x)
['x']
static int find_low_bit(unsigned int x) { int i; for(i=0;i<=31;i++) { if(x&(1<<i)) return i; } return 0; }
43
True
1