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-31135
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:C
NETWORK
LOW
NONE
NONE
NONE
COMPLETE
7.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
NONE
NONE
HIGH
7.5
HIGH
3.9
3.6
False
[{'url': 'https://github.com/AttorneyOnline/akashi/security/advisories/GHSA-vj86-vfmg-q68v', 'name': 'https://github.com/AttorneyOnline/akashi/security/advisories/GHSA-vj86-vfmg-q68v', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/AttorneyOnline/akashi/commit/5566cdfedddef1f219aee33477d9c9690bf2f78b', 'name': 'https://github.com/AttorneyOnline/akashi/commit/5566cdfedddef1f219aee33477d9c9690bf2f78b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-129'}, {'lang': 'en', 'value': 'CWE-129'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aceattorneyonline:akashi:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Akashi is an open source server implementation of the Attorney Online video game based on the Ace Attorney universe. Affected versions of Akashi are subject to a denial of service attack. An attacker can use a specially crafted evidence packet to make an illegal modification, causing a server crash. This can be used to mount a denial-of-service exploit. Users are advised to upgrade. There is no known workaround for this issue.'}]
2022-07-15T03:22Z
2022-07-07T18:15Z
Improper Validation of Array Index
The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.
https://cwe.mitre.org/data/definitions/129.html
0
oldmud0
2021-07-27 22:57:29-05:00
Fix out of bounds crash on evidence
5566cdfedddef1f219aee33477d9c9690bf2f78b
False
AttorneyOnline/akashi
C++ AO2 Server
2020-08-22 07:19:20
2022-08-20 13:42:00
null
AttorneyOnline
5.0
21.0
AOClient::pktRemoveEvidence
AOClient::pktRemoveEvidence( AreaData * area , int argc , QStringList argv , AOPacket packet)
['area', 'argc', 'argv', 'packet']
void AOClient::pktRemoveEvidence(AreaData* area, int argc, QStringList argv, AOPacket packet) { if (!checkEvidenceAccess(area)) return; bool is_int = false; int idx = argv[0].toInt(&is_int); if (is_int && idx <= area->evidence().size() && idx >= 0) { area->deleteEvidence(idx); } sendEvidenceList(area); }
82
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACLosslessScan::ParseMCU
ACLosslessScan::ParseMCU( struct Line ** prev , struct Line ** top)
['prev', 'top']
void ACLosslessScan::ParseMCU(struct Line **prev,struct Line **top) { #if ACCUSOFT_CODE UBYTE c; // // Parse a single MCU, which is now a group of pixels. for(c = 0;c < m_ucCount;c++) { struct QMContextSet &contextset = m_Context[m_ucContext[c]]; struct Line *line = top[c]; struct Line *pline= prev[c]; UBYTE ym = m_ucMCUHeight[c]; ULONG x = m_ulX[c]; class PredictorBase *mcupred = m_pPredict[c]; LONG *lp = line->m_pData + x; LONG *pp = (pline)?(pline->m_pData + x):(NULL); // // Parse MCUwidth * MCUheight coefficients starting at the line top. do { class PredictorBase *pred = mcupred; UBYTE xm = m_ucMCUWidth[c]; do { // Decode now the difference between the predicted value and // the real value. LONG v; // // Get the sign coding context. struct QMContextSet::ContextZeroSet &zset = contextset.ClassifySignZero(m_plDa[c][ym-1],m_plDb[c][x], m_ucSmall[c],m_ucLarge[c]); // if (m_Coder.Get(zset.S0)) { LONG sz = 0; bool sign = m_Coder.Get(zset.SS); // true for negative. // if (m_Coder.Get((sign)?(zset.SN):(zset.SP))) { struct QMContextSet::MagnitudeSet &mset = contextset.ClassifyMagnitude(m_plDb[c][x],m_ucLarge[c]); int i = 0; LONG m = 2; // while(m_Coder.Get(mset.X[i])) { m <<= 1; i++; } // m >>= 1; sz = m; while((m >>= 1)) { if (m_Coder.Get(mset.M[i])) { sz |= m; } } } // if (sign) { v = -sz - 1; } else { v = sz + 1; } } else { v = 0; } // // Use the prediction to fill in the sample. lp[0] = pred->DecodeSample(v,lp,pp); // Update Da and Db. // Is this a bug? 32768 does not exist, but -32768 does. The streams // seem to use -32768 instead. m_plDb[c][x] = v; m_plDa[c][ym-1] = v; // // One pixel done. Proceed to the next in the MCU. Note that // the lines have been extended such that always a complete MCU is present. } while(--xm && (lp++,pp++,x++,pred = pred->MoveRight(),true)); // // Go to the next line. } while(--ym && (pp = line->m_pData + (x = m_ulX[c]),line = (line->m_pNext)?(line->m_pNext):(line), lp = line->m_pData + x,mcupred = mcupred->MoveDown(),true)); } #else NOREF(prev); NOREF(top); #endif }
501
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACLosslessScan::QMContextSet::MagnitudeSet::Init
ACLosslessScan::QMContextSet::MagnitudeSet::Init( void)
['void']
void Init(void) { for(int i = 0;i < 15;i++) { X[i].Init(); M[i].Init(); } }
40
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACSequentialScan::DecodeBlock
ACSequentialScan::DecodeBlock( LONG * block , LONG & prevdc , LONG & prevdiff , UBYTE small , UBYTE large , UBYTE kx , UBYTE dc , UBYTE ac)
['block', 'prevdc', 'prevdiff', 'small', 'large', 'kx', 'dc', 'ac']
void ACSequentialScan::DecodeBlock(LONG *block, LONG &prevdc,LONG &prevdiff, UBYTE small,UBYTE large,UBYTE kx,UBYTE dc,UBYTE ac) { // DC coding if (m_ucScanStart == 0 && m_bResidual == false) { LONG diff; struct QMContextSet::DCContextZeroSet &cz = m_Context[dc].Classify(prevdiff,small,large); // Check whether the difference is nonzero. if (m_Coder.Get(cz.S0)) { LONG sz; bool sign = m_Coder.Get(cz.SS); // sign coding, is true for negative. // // // Positive and negative are encoded in different contexts. // Decode the magnitude cathegory. if (m_Coder.Get((sign)?(cz.SN):(cz.SP))) { int i = 0; LONG m = 2; while(m_Coder.Get(m_Context[dc].DCMagnitude.X[i])) { m <<= 1; i++; if (m == 0) JPG_THROW(MALFORMED_STREAM,"ACSequentialScan::DecodeBlock", "QMDecoder is out of sync"); } // // Get the MSB to decode. m >>= 1; sz = m; // // Refinement coding of remaining bits. while((m >>= 1)) { if (m_Coder.Get(m_Context[dc].DCMagnitude.M[i])) { sz |= m; } } } else { sz = 0; } // // Done, finally, include the sign and the offset. if (sign) { diff = -sz - 1; } else { diff = sz + 1; } } else { // Difference is zero. diff = 0; } prevdiff = diff; if (m_bDifferential) { prevdc = diff; } else { prevdc += diff; } block[0] = prevdc << m_ucLowBit; // point transformation } if (m_ucScanStop) { // AC coding. No block skipping used here. int k = (m_ucScanStart)?(m_ucScanStart):((m_bResidual)?0:1); // // EOB decoding. while(k <= m_ucScanStop && !m_Coder.Get(m_Context[ac].ACZero[k-1].SE)) { LONG sz; bool sign; // // Not yet EOB. Run coding in S0: Skip over zeros. while(!m_Coder.Get(m_Context[ac].ACZero[k-1].S0)) { k++; if (k > m_ucScanStop) JPG_THROW(MALFORMED_STREAM,"ACSequentialScan::DecodeBlock", "QMDecoder is out of sync"); } // // Now decode the sign of the coefficient. // This happens in the uniform context. sign = m_Coder.Get(m_Context[ac].Uniform); // // Decode the magnitude. if (m_Coder.Get(m_Context[ac].ACZero[k-1].SP)) { // X1 coding, identical to SN and SP. if (m_Coder.Get(m_Context[ac].ACZero[k-1].SP)) { int i = 0; LONG m = 4; struct QMContextSet::ACContextMagnitudeSet &acm = (k > kx)?(m_Context[ac].ACMagnitudeHigh):(m_Context[ac].ACMagnitudeLow); while(m_Coder.Get(acm.X[i])) { m <<= 1; i++; if (m == 0) JPG_THROW(MALFORMED_STREAM,"ACSequentialScan::DecodeBlock", "QMDecoder is out of sync"); } // // Get the MSB to decode m >>= 1; sz = m; // // Proceed to refinement. while((m >>= 1)) { if (m_Coder.Get(acm.M[i])) { sz |= m; } } } else { sz = 1; } } else { sz = 0; } // // Done. Finally, include sign and offset. sz++; if (sign) sz = -sz; block[DCT::ScanOrder[k]] = sz << m_ucLowBit; // // Proceed to the next block. k++; } } }
609
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACSequentialScan::QMContextSet::ACContextMagnitudeSet::Init
ACSequentialScan::QMContextSet::ACContextMagnitudeSet::Init( bool hi)
['hi']
void Init(bool hi) { for(int i = 0;i < 18;i++) { char string[5] = "xl00"; string[1] = (hi)?('h'):('l'); string[2] = (i / 10) + '0'; string[3] = (i % 10) + '0'; X[i].Init(string); string[0] = 'm'; M[i].Init(string); } }
101
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACSequentialScan::QMContextSet::ACContextMagnitudeSet::Init
ACSequentialScan::QMContextSet::ACContextMagnitudeSet::Init( void)
['void']
void Init(void) { for(int i = 0;i < 18;i++) { X[i].Init(); M[i].Init(); } }
40
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
ACSequentialScan::QMContextSet::DCContextMagnitudeSet::Init
ACSequentialScan::QMContextSet::DCContextMagnitudeSet::Init( void)
['void']
void Init(void) { for(int i = 0;i < 19;i++) { #ifdef DEBUG_QMCODER char string[5] = "X0 "; string[1] = (i / 10) + '0'; string[2] = (i % 10) + '0'; X[i].Init(string); string[0] = 'M'; M[i].Init(string); #else X[i].Init(); M[i].Init(); #endif } }
101
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
RectangleRequest::RectangleRequest
RectangleRequest::RectangleRequest( const struct RectangleRequest & req)
['req']
RectangleRequest(const struct RectangleRequest &req) : Explicit() { // Not nice, but this is really faster and simpler memcpy(this,&req,sizeof(struct RectangleRequest)); // Not linked in any way if this is new. rr_pNext = NULL; }
32
True
1
CVE-2022-31620
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/70', 'name': 'https://github.com/thorfdbg/libjpeg/issues/70', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg before 1.64, BitStream<false>::Get in bitstream.hpp has an assertion failure that may cause denial of service. This is related to out-of-bounds array access during arithmetically coded lossless scan or arithmetically coded sequential scan.'}]
2022-07-19T17:15Z
2022-05-25T21:15Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Thomas Richter
2022-05-23 07:57:40+02:00
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
RectangleRequest::operator =
RectangleRequest::operator =( const struct RectangleRequest & req)
['req']
RectangleRequest &operator=(const struct RectangleRequest &req) { // Not nice, but this is really faster and simpler memcpy(this,&req,sizeof(struct RectangleRequest)); // Not linked in any way if this is new. rr_pNext = NULL; // return *this; }
33
True
1
CVE-2022-32201
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/thorfdbg/libjpeg/commit/ea6315164b1649ff932a396b7600eac4bffcfaba', 'name': 'https://github.com/thorfdbg/libjpeg/commit/ea6315164b1649ff932a396b7600eac4bffcfaba', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/73', 'name': 'https://github.com/thorfdbg/libjpeg/issues/73', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:1.63:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg 1.63, there is a NULL pointer dereference in Component::SubXOf in component.hpp.'}]
2022-06-10T16:18Z
2022-06-02T14:16Z
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
Thomas Richter
2022-05-30 16:07:05+02:00
Added a check whether all components in a scan are actually present.
ea6315164b1649ff932a396b7600eac4bffcfaba
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
EntropyParser::EntropyParser
EntropyParser::EntropyParser( class Frame * frame , class Scan * scan)
['frame', 'scan']
EntropyParser::EntropyParser(class Frame *frame,class Scan *scan) : JKeeper(scan->EnvironOf()), m_pScan(scan), m_pFrame(frame) { m_ucCount = scan->ComponentsInScan(); // The residual scan uses all components here, not just for, but // it does not require the component count either. for(volatile UBYTE i = 0;i < m_ucCount && i < 4;i++) { JPG_TRY { m_pComponent[i] = scan->ComponentOf(i); } JPG_CATCH { m_pComponent[i] = NULL; } JPG_ENDTRY; } m_ulRestartInterval = m_pFrame->TablesOf()->RestartIntervalOf(); m_usNextRestartMarker = 0xffd0; m_ulMCUsToGo = m_ulRestartInterval; m_bSegmentIsValid = true; m_bScanForDNL = (m_pFrame->HeightOf() == 0)?true:false; m_bDNLFound = false; }
135
True
1
CVE-2022-32202
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/thorfdbg/libjpeg/commit/51c3241b6da39df30f016b63f43f31c4011222c7', 'name': 'https://github.com/thorfdbg/libjpeg/commit/51c3241b6da39df30f016b63f43f31c4011222c7', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/issues/74', 'name': 'https://github.com/thorfdbg/libjpeg/issues/74', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libjpeg_project:libjpeg:1.63:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In libjpeg 1.63, there is a NULL pointer dereference in LineBuffer::FetchRegion in linebuffer.cpp.'}]
2022-06-10T16:14Z
2022-06-02T14:16Z
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
Thomas Richter
2022-05-31 12:17:21+02:00
Fixed a NULL-pointer access in the line-based reconstruction process in case no valid scan was found and no data is present.
51c3241b6da39df30f016b63f43f31c4011222c7
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
LineBitmapRequester::ReconstructRegion
LineBitmapRequester::ReconstructRegion( const RectAngle<LONG> & orgregion , const struct RectangleRequest * rr)
['orgregion', 'rr']
void LineBitmapRequester::ReconstructRegion(const RectAngle<LONG> &orgregion,const struct RectangleRequest *rr) { class ColorTrafo *ctrafo = ColorTrafoOf(false,!rr->rr_bColorTrafo); UBYTE i; if (m_bSubsampling && rr->rr_bUpsampling) { for(i = rr->rr_usFirstComponent;i <= rr->rr_usLastComponent;i++) { class Component *comp = m_pFrame->ComponentOf(i); UBYTE subx = comp->SubXOf(); UBYTE suby = comp->SubYOf(); class UpsamplerBase *up; // upsampler LONG bx,by; RectAngle<LONG> blocks; // // Compute the region of blocks assert(subx > 0 && suby > 0); if ((up = m_ppUpsampler[i])) { LONG bwidth = ((m_ulPixelWidth + subx - 1) / subx + 7) >> 3; LONG bheight = ((m_ulPixelHeight + suby - 1) / suby + 7) >> 3; LONG rx = (subx > 1)?(1):(0); LONG ry = (suby > 1)?(1):(0); // The +/-1 include additional lines required for subsampling expansion blocks.ra_MinX = ((orgregion.ra_MinX / subx - rx) >> 3); blocks.ra_MaxX = ((orgregion.ra_MaxX / subx + rx) >> 3); blocks.ra_MinY = ((orgregion.ra_MinY / suby - ry) >> 3); blocks.ra_MaxY = ((orgregion.ra_MaxY / suby + ry) >> 3); // Clip. if (blocks.ra_MinX < 0) blocks.ra_MinX = 0; if (blocks.ra_MaxX >= bwidth) blocks.ra_MaxX = bwidth - 1; if (blocks.ra_MinY < 0) blocks.ra_MinY = 0; if (blocks.ra_MaxY >= bheight) blocks.ra_MaxY = bheight - 1; up->SetBufferedRegion(blocks); // also removes the rectangle of blocks already buffered. // for(by = blocks.ra_MinY;by <= blocks.ra_MaxY;by++) { for(bx = blocks.ra_MinX;bx <= blocks.ra_MaxX;bx++) { LONG dst[64]; if (*m_pppImage[i]) { FetchRegion(bx,*m_pppImage[i],dst); } else { memset(dst,0,sizeof(dst)); } up->DefineRegion(bx,by,dst); } Next8Lines(i); } } } // Now push blocks into the color transformer from the upsampler. { RectAngle<LONG> r; ULONG minx = orgregion.ra_MinX >> 3; ULONG maxx = orgregion.ra_MaxX >> 3; ULONG miny = orgregion.ra_MinY >> 3; ULONG maxy = orgregion.ra_MaxY >> 3; ULONG x,y; if (maxy > m_ulMaxMCU) maxy = m_ulMaxMCU; for(y = miny,r.ra_MinY = orgregion.ra_MinY;y <= maxy;y++,r.ra_MinY = r.ra_MaxY + 1) { r.ra_MaxY = (r.ra_MinY & -8) + 7; if (r.ra_MaxY > orgregion.ra_MaxY) r.ra_MaxY = orgregion.ra_MaxY; for(x = minx,r.ra_MinX = orgregion.ra_MinX;x <= maxx;x++,r.ra_MinX = r.ra_MaxX + 1) { r.ra_MaxX = (r.ra_MinX & -8) + 7; if (r.ra_MaxX > orgregion.ra_MaxX) r.ra_MaxX = orgregion.ra_MaxX; for(i = 0;i < m_ucCount;i++) { if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) { ExtractBitmap(m_ppTempIBM[i],r,i); if (m_ppUpsampler[i]) { // Upsampled case, take from the upsampler, transform // into the color buffer. m_ppUpsampler[i]->UpsampleRegion(r,m_ppCTemp[i]); } else if (*m_pppImage[i]) { FetchRegion(x,*m_pppImage[i],m_ppCTemp[i]); } else { memset(m_ppCTemp[0],0,sizeof(LONG) * 64); } } else { // Not requested, zero the buffer. memset(m_ppCTemp[i],0,sizeof(LONG) * 64); } } ctrafo->YCbCr2RGB(r,m_ppTempIBM,m_ppCTemp,NULL); } // // Advance the quantized rows for the non-subsampled components, // upsampled components have been advanced above. for(i = rr->rr_usFirstComponent;i <= rr->rr_usLastComponent;i++) { if (m_ppUpsampler[i] == NULL) Next8Lines(i); } } } } else { // direct case, no upsampling required, residual coding possible. RectAngle<LONG> r; RectAngle<LONG> region = orgregion; SubsampledRegion(region,rr); ULONG minx = region.ra_MinX >> 3; ULONG maxx = region.ra_MaxX >> 3; ULONG miny = region.ra_MinY >> 3; ULONG maxy = region.ra_MaxY >> 3; ULONG x,y; if (maxy > m_ulMaxMCU) maxy = m_ulMaxMCU; for(y = miny,r.ra_MinY = region.ra_MinY;y <= maxy;y++,r.ra_MinY = r.ra_MaxY + 1) { r.ra_MaxY = (r.ra_MinY & -8) + 7; if (r.ra_MaxY > region.ra_MaxY) r.ra_MaxY = region.ra_MaxY; for(x = minx,r.ra_MinX = region.ra_MinX;x <= maxx;x++,r.ra_MinX = r.ra_MaxX + 1) { r.ra_MaxX = (r.ra_MinX & -8) + 7; if (r.ra_MaxX > region.ra_MaxX) r.ra_MaxX = region.ra_MaxX; for(i = 0;i < m_ucCount;i++) { LONG *dst = m_ppCTemp[i]; if (i >= rr->rr_usFirstComponent && i <= rr->rr_usLastComponent) { ExtractBitmap(m_ppTempIBM[i],r,i); FetchRegion(x,*m_pppImage[i],dst); } else { memset(dst,0,sizeof(LONG) * 64); } } // // Perform the color transformation now. ctrafo->YCbCr2RGB(r,m_ppTempIBM,m_ppCTemp,NULL); } // of loop over x // // Advance the rows. for(i = rr->rr_usFirstComponent;i <= rr->rr_usLastComponent;i++) { Next8Lines(i); } } } }
1157
True
1
CVE-2022-32978
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/issues/75', 'name': 'https://github.com/thorfdbg/libjpeg/issues/75', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/commit/4746b577931e926a49e50de9720a4946de3069a7', 'name': 'https://github.com/thorfdbg/libjpeg/commit/4746b577931e926a49e50de9720a4946de3069a7', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-617'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jpeg:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'There is an assertion failure in SingleComponentLSScan::ParseMCU in singlecomponentlsscan.cpp in libjpeg before 1.64 via an empty JPEG-LS scan.'}]
2022-06-17T16:34Z
2022-06-10T15:15Z
Reachable Assertion
The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, it can still lead to a denial of service. For example, if a server handles multiple simultaneous connections, and an assert() occurs in one single connection that causes all other connections to be dropped, this is a reachable assertion that leads to a denial of service.
https://cwe.mitre.org/data/definitions/617.html
0
Thomas Richter
2022-06-08 12:58:05+02:00
Fixed handling of empty JPEG-LS scans.
4746b577931e926a49e50de9720a4946de3069a7
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
SampleInterleavedLSScan::ParseMCU
SampleInterleavedLSScan::ParseMCU( void)
['void']
bool SampleInterleavedLSScan::ParseMCU(void) { #if ACCUSOFT_CODE int lines = m_ulRemaining[0]; // total number of MCU lines processed. UBYTE preshift = m_ucLowBit + FractionalColorBitsOf(); struct Line *line[4]; UBYTE cx; // // If a DNL marker is present, the number of remaining lines is zero. Fix it. if (m_pFrame->HeightOf() == 0) { assert(lines == 0); lines = 8; } // // A "MCU" in respect to the code organization is eight lines. if (lines > 8) { lines = 8; } if (m_pFrame->HeightOf() > 0) m_ulRemaining[0] -= lines; assert(lines > 0); assert(m_ucCount < 4); // // Fill the line pointers. for(cx = 0;cx < m_ucCount;cx++) { line[cx] = CurrentLine(cx); } // Loop over lines and columns do { LONG length = m_ulWidth[0]; LONG *lp[4]; // Get the line pointers and initialize the internal backup lines. for(cx = 0;cx < m_ucCount;cx++) { lp[cx] = line[cx]->m_pData; StartLine(cx); } if (BeginReadMCU(m_Stream.ByteStreamOf())) { // No error handling strategy. No RST in scans. Bummer! do { LONG a[4],b[4],c[4],d[4]; // neighbouring values. LONG d1[4],d2[4],d3[4]; // local gradients. bool isrun = true; for(cx = 0;cx < m_ucCount;cx++) { GetContext(cx,a[cx],b[cx],c[cx],d[cx]); d1[cx] = d[cx] - b[cx]; // compute local gradients d2[cx] = b[cx] - c[cx]; d3[cx] = c[cx] - a[cx]; // // Run mode only if the run condition is met for all components if (isrun && !isRunMode(d1[cx],d2[cx],d3[cx])) isrun = false; } if (isrun) { LONG run = DecodeRun(length,m_lRunIndex[0]); // // Now fill the data. while(run) { // Update so that the next process gets the correct value. // There is one sample per component. for(cx = 0;cx < m_ucCount;cx++) { UpdateContext(cx,a[cx]); // And insert the value into the target line as well. *lp[cx]++ = a[cx] << preshift; } run--,length--; // As long as there are pixels on the line. } // // More data on the line? I.e. the run did not cover the full m_lJ samples? // Now decode the run interruption sample. The rtype is here always zero. if (length) { bool negative; // the sign variable LONG errval; // the prediction error LONG merr; // the mapped error (symbol) LONG rx; // the reconstructed value UBYTE k; // golomb parameter // // Decode the interrupting pixels. for(cx = 0;cx < m_ucCount;cx++) { // Get the neighbourhood. GetContext(cx,a[cx],b[cx],c[cx],d[cx]); // The prediction mode is always false, but the sign information // is required. negative = a[cx] > b[cx]; // Get the golomb parameter for run interruption coding. k = GolombParameter(false); // Golomb-decode the error symbol. It is always using the common // run index. merr = GolombDecode(k,m_lLimit - m_lJ[m_lRunIndex[0]] - 1); // Inverse the error mapping procedure. errval = InverseErrorMapping(merr,ErrorMappingOffset(false,merr != 0,k)); // Compute the reconstructed value. rx = Reconstruct(negative,b[cx],errval); // Update so that the next process gets the correct value. UpdateContext(cx,rx); // Fill in the value into the line *lp[cx]++ = rx << preshift; // Update the variables of the run mode. UpdateState(false,errval); } // Update the run index now. This is not part of // EncodeRun because the non-reduced run-index is // required for the golomb coder length limit. if (m_lRunIndex[0] > 0) m_lRunIndex[0]--; } else break; // end of line. } else { UWORD ctxt; bool negative; // the sign variable. LONG px; // the predicted variable. LONG rx; // the reconstructed value. LONG errval; // the error value. LONG merr; // the mapped error value. UBYTE k; // the Golomb parameter. // for(cx = 0;cx < m_ucCount;cx++) { // Quantize the gradients. d1[cx] = QuantizedGradient(d1[cx]); d2[cx] = QuantizedGradient(d2[cx]); d3[cx] = QuantizedGradient(d3[cx]); // Compute the context. ctxt = Context(negative,d1[cx],d2[cx],d3[cx]); // Compute the predicted value. px = Predict(a[cx],b[cx],c[cx]); // Correct the prediction. px = CorrectPrediction(ctxt,negative,px); // Compute the golomb parameter k from the context. k = GolombParameter(ctxt); // Decode the error symbol. merr = GolombDecode(k,m_lLimit); // Inverse the error symbol into an error value. errval = InverseErrorMapping(merr,ErrorMappingOffset(ctxt,k)); // Update the variables. UpdateState(ctxt,errval); // Compute the reconstructed value. rx = Reconstruct(negative,px,errval); // Update so that the next process gets the correct value. UpdateContext(cx,rx); // And insert the value into the target line as well. *lp[cx]++ = rx << preshift; } } } while(--length); } // No error handling here. // // Advance the line pointers. for(cx = 0;cx < m_ucCount;cx++) { EndLine(cx); line[cx] = line[cx]->m_pNext; } // } while(--lines); // // If this is the last line, gobble up all the // bits from bitstuffing the last byte may have left. // As SkipStuffing is idempotent, we can also do that // all the time. m_Stream.SkipStuffing(); #endif return false; }
844
True
1
CVE-2022-32978
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:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://github.com/thorfdbg/libjpeg/issues/75', 'name': 'https://github.com/thorfdbg/libjpeg/issues/75', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/thorfdbg/libjpeg/commit/4746b577931e926a49e50de9720a4946de3069a7', 'name': 'https://github.com/thorfdbg/libjpeg/commit/4746b577931e926a49e50de9720a4946de3069a7', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-617'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:jpeg:libjpeg:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.64', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'There is an assertion failure in SingleComponentLSScan::ParseMCU in singlecomponentlsscan.cpp in libjpeg before 1.64 via an empty JPEG-LS scan.'}]
2022-06-17T16:34Z
2022-06-10T15:15Z
Reachable Assertion
The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, it can still lead to a denial of service. For example, if a server handles multiple simultaneous connections, and an assert() occurs in one single connection that causes all other connections to be dropped, this is a reachable assertion that leads to a denial of service.
https://cwe.mitre.org/data/definitions/617.html
0
Thomas Richter
2022-06-08 12:58:05+02:00
Fixed handling of empty JPEG-LS scans.
4746b577931e926a49e50de9720a4946de3069a7
False
thorfdbg/libjpeg
A complete implementation of 10918-1 (JPEG) coming from jpeg.org (the ISO group) with extensions for HDR, lossless and alpha channel coding standardized as ISO/IEC 18477 (JPEG XT).
2012-07-27 13:18:14
2022-08-05 11:26:51
thorfdbg
235.0
67.0
SingleComponentLSScan::ParseMCU
SingleComponentLSScan::ParseMCU( void)
['void']
bool SingleComponentLSScan::ParseMCU(void) { #if ACCUSOFT_CODE int lines = m_ulRemaining[0]; // total number of MCU lines processed. UBYTE preshift = m_ucLowBit + FractionalColorBitsOf(); struct Line *line = CurrentLine(0); // // If a DNL marker is present, the number of remaining lines is zero. Fix it. if (m_pFrame->HeightOf() == 0) { assert(lines == 0); lines = 8; } assert(m_ucCount == 1); // // A "MCU" in respect to the code organization is eight lines. if (lines > 8) { lines = 8; } if (m_pFrame->HeightOf() > 0) m_ulRemaining[0] -= lines; assert(lines > 0); // Loop over lines and columns do { LONG length = m_ulWidth[0]; LONG *lp = line->m_pData; #ifdef DEBUG_LS int xpos = 0; static int linenumber = 0; printf("\n%4d : ",++linenumber); #endif StartLine(0); if (BeginReadMCU(m_Stream.ByteStreamOf())) { // No error handling strategy. No RST in scans. Bummer! do { LONG a,b,c,d; // neighbouring values. LONG d1,d2,d3; // local gradients. GetContext(0,a,b,c,d); d1 = d - b; // compute local gradients d2 = b - c; d3 = c - a; if (isRunMode(d1,d2,d3)) { LONG run = DecodeRun(length,m_lRunIndex[0]); // // Now fill the data. while(run) { // Update so that the next process gets the correct value. UpdateContext(0,a); // And insert the value into the target line as well. *lp++ = a << preshift; #ifdef DEBUG_LS printf("%4d:<%2x> ",xpos++,a); #endif run--,length--; // As long as there are pixels on the line. } // // More data on the line? I.e. the run did not cover the full m_lJ samples? // Now decode the run interruption sample. if (length) { bool negative; // the sign variable bool rtype; // run interruption type LONG errval; // the prediction error LONG merr; // the mapped error (symbol) LONG rx; // the reconstructed value UBYTE k; // golomb parameter // Get the neighbourhood. GetContext(0,a,b,c,d); // Get the prediction mode. rtype = InterruptedPredictionMode(negative,a,b); // Get the golomb parameter for run interruption coding. k = GolombParameter(rtype); // Golomb-decode the error symbol. merr = GolombDecode(k,m_lLimit - m_lJ[m_lRunIndex[0]] - 1); // Inverse the error mapping procedure. errval = InverseErrorMapping(merr + rtype,ErrorMappingOffset(rtype,rtype || merr,k)); // Compute the reconstructed value. rx = Reconstruct(negative,rtype?a:b,errval); // Update so that the next process gets the correct value. UpdateContext(0,rx); // Fill in the value into the line *lp = rx << preshift; #ifdef DEBUG_LS printf("%4d:<%2x> ",xpos++,*lp); #endif // Update the variables of the run mode. UpdateState(rtype,errval); // Update the run index now. This is not part of // EncodeRun because the non-reduced run-index is // required for the golomb coder length limit. if (m_lRunIndex[0] > 0) m_lRunIndex[0]--; } else break; // end of line. } else { UWORD ctxt; bool negative; // the sign variable. LONG px; // the predicted variable. LONG rx; // the reconstructed value. LONG errval; // the error value. LONG merr; // the mapped error value. UBYTE k; // the Golomb parameter. // Quantize the gradients. d1 = QuantizedGradient(d1); d2 = QuantizedGradient(d2); d3 = QuantizedGradient(d3); // Compute the context. ctxt = Context(negative,d1,d2,d3); // Compute the predicted value. px = Predict(a,b,c); // Correct the prediction. px = CorrectPrediction(ctxt,negative,px); // Compute the golomb parameter k from the context. k = GolombParameter(ctxt); // Decode the error symbol. merr = GolombDecode(k,m_lLimit); // Inverse the error symbol into an error value. errval = InverseErrorMapping(merr,ErrorMappingOffset(ctxt,k)); // Update the variables. UpdateState(ctxt,errval); // Compute the reconstructed value. rx = Reconstruct(negative,px,errval); // Update so that the next process gets the correct value. UpdateContext(0,rx); // And insert the value into the target line as well. *lp = rx << preshift; #ifdef DEBUG_LS printf("%4d:<%2x> ",xpos++,*lp); #endif } } while(++lp,--length); } // No error handling here. EndLine(0); line = line->m_pNext; } while(--lines); // // If this is the last line, gobble up all the // bits from bitstuffing the last byte may have left. // As SkipStuffing is idempotent, we can also do that // all the time. m_Stream.SkipStuffing(); #endif return false; }
620
True
1
CVE-2022-32200
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://www.prevanders.net/dwarfbug.html', 'name': 'https://www.prevanders.net/dwarfbug.html', 'refsource': 'MISC', 'tags': ['Product', 'Third Party Advisory']}, {'url': 'https://github.com/davea42/libdwarf-code/commit/8151575a6ace77d005ca5bb5d71c1bfdba3f7069', 'name': 'https://github.com/davea42/libdwarf-code/commit/8151575a6ace77d005ca5bb5d71c1bfdba3f7069', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/davea42/libdwarf-code/issues/116', 'name': 'https://github.com/davea42/libdwarf-code/issues/116', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libdwarf_project:libdwarf:0.4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'libdwarf 0.4.0 has a heap-based buffer over-read in _dwarf_check_string_valid in dwarf_util.c.'}]
2022-06-10T16:16Z
2022-06-02T14:16Z
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 Anderson
2022-05-29 09:35:39-07:00
Fixes vulnerability DW202205-001 Reports error instead of crashing the when reading a specially crafted (corrupted) .debug_pubnames or .debug_pubtypes section. modified: src/lib/libdwarf/dwarf_global.c
8151575a6ace77d005ca5bb5d71c1bfdba3f7069
False
davea42/libdwarf-code
Contains source for libdwarf, a library for reading DWARF2 and later DWARF. Contains source to create dwarfdump, a program which prints DWARF2 and later DWARF in readable format. Has a very limited DWARF writer set of functions in libdwarfp (producer library). Builds using GNU configure, meson, or cmake.
2021-05-13 22:28:28
2022-08-27 17:53:34
davea42
45.0
18.0
_dwarf_internal_get_pubnames_like_data
_dwarf_internal_get_pubnames_like_data( Dwarf_Debug dbg , const char * secname , Dwarf_Small * section_data_ptr , Dwarf_Unsigned section_length , Dwarf_Global ** globals , Dwarf_Signed * return_count , Dwarf_Error * error , int context_DLA_code , int global_DLA_code , int length_err_num , int version_err_num)
['dbg', 'secname', 'section_data_ptr', 'section_length', 'globals', 'return_count', 'error', 'context_DLA_code', 'global_DLA_code', 'length_err_num', 'version_err_num']
_dwarf_internal_get_pubnames_like_data(Dwarf_Debug dbg, const char *secname, Dwarf_Small * section_data_ptr, Dwarf_Unsigned section_length, Dwarf_Global ** globals, Dwarf_Signed * return_count, Dwarf_Error * error, int context_DLA_code, int global_DLA_code, int length_err_num, int version_err_num) { Dwarf_Small *pubnames_like_ptr = 0; Dwarf_Off pubnames_section_offset = 0; Dwarf_Small *section_end_ptr = section_data_ptr +section_length; /* Points to the context for the current set of global names, and contains information to identify the compilation-unit that the set refers to. */ Dwarf_Global_Context pubnames_context = 0; Dwarf_Bool pubnames_context_on_list = FALSE; Dwarf_Unsigned version = 0; /* Offset from the start of compilation-unit for the current global. */ Dwarf_Off die_offset_in_cu = 0; Dwarf_Unsigned global_count = 0; /* Used to chain the Dwarf_Global_s structs for creating contiguous list of pointers to the structs. */ Dwarf_Chain head_chain = 0; Dwarf_Chain *plast_chain = &head_chain; /* Points to contiguous block of Dwarf_Global to be returned. */ Dwarf_Global *ret_globals = 0; int mres = 0; /* Temporary counter. */ Dwarf_Unsigned i = 0; if (!dbg || dbg->de_magic != DBG_IS_VALID) { _dwarf_error_string(NULL, error, DW_DLE_DBG_NULL, "DW_DLE_DBG_NULL: " "calling for pubnames-like data Dwarf_Debug " "either null or it contains" "a stale Dwarf_Debug pointer"); return DW_DLV_ERROR; } /* We will eventually need the .debug_info data. Load it now. */ if (!dbg->de_debug_info.dss_data) { int res = _dwarf_load_debug_info(dbg, error); if (res != DW_DLV_OK) { return res; } } if (section_data_ptr == NULL) { return DW_DLV_NO_ENTRY; } pubnames_like_ptr = section_data_ptr; do { Dwarf_Unsigned length = 0; int local_extension_size = 0; int local_length_size = 0; /* Some compilers emit padding at the end of each cu's area. pubnames_ptr_past_end_cu records the true area end for the pubnames(like) content of a cu. Essentially the length in the header and the 0 terminator of the data are redundant information. The dwarf2/3 spec does not mention what to do if the length is past the 0 terminator. So we take any bytes left after the 0 as padding and ignore them. */ Dwarf_Small *pubnames_ptr_past_end_cu = 0; pubnames_context_on_list = FALSE; pubnames_context = (Dwarf_Global_Context) _dwarf_get_alloc(dbg, context_DLA_code, 1); if (pubnames_context == NULL) { dealloc_globals_chain(dbg,head_chain); _dwarf_error(dbg, error, DW_DLE_ALLOC_FAIL); return DW_DLV_ERROR; } /* ========pubnames_context not recorded anywhere yet. */ /* READ_AREA_LENGTH updates pubnames_like_ptr for consumed bytes. */ if ((pubnames_like_ptr + DWARF_32BIT_SIZE + DWARF_HALF_SIZE + DWARF_32BIT_SIZE) > /* A minimum size needed */ section_end_ptr) { pubnames_error_length(dbg,error, DWARF_32BIT_SIZE + DWARF_HALF_SIZE + DWARF_32BIT_SIZE, secname, "header-record"); dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return DW_DLV_ERROR; } mres = _dwarf_read_area_length_ck_wrapper(dbg, &length,&pubnames_like_ptr,&local_length_size, &local_extension_size,section_length,section_end_ptr, error); if (mres != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return mres; } pubnames_context->pu_alloc_type = context_DLA_code; pubnames_context->pu_length_size = local_length_size; pubnames_context->pu_length = length; pubnames_context->pu_extension_size = local_extension_size; pubnames_context->pu_dbg = dbg; pubnames_context->pu_pub_offset = pubnames_section_offset; pubnames_ptr_past_end_cu = pubnames_like_ptr + length; pubnames_context->pu_pub_entries_end_ptr = pubnames_ptr_past_end_cu; if ((pubnames_like_ptr + (DWARF_HALF_SIZE) ) > /* A minimum size needed */ section_end_ptr) { pubnames_error_length(dbg,error, DWARF_HALF_SIZE, secname,"version-number"); dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return DW_DLV_ERROR; } mres = _dwarf_read_unaligned_ck_wrapper(dbg, &version,pubnames_like_ptr,DWARF_HALF_SIZE, section_end_ptr,error); if (mres != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return mres; } pubnames_context->pu_version = version; pubnames_like_ptr += DWARF_HALF_SIZE; /* ASSERT: DW_PUBNAMES_VERSION2 == DW_PUBTYPES_VERSION2 */ if (version != DW_PUBNAMES_VERSION2) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } _dwarf_error(dbg, error, version_err_num); return DW_DLV_ERROR; } /* Offset of CU header in debug section. */ if ((pubnames_like_ptr + 3*pubnames_context->pu_length_size)> section_end_ptr) { pubnames_error_length(dbg,error, 3*pubnames_context->pu_length_size, secname, "header/DIE offsets"); dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return DW_DLV_ERROR; } mres = _dwarf_read_unaligned_ck_wrapper(dbg, &pubnames_context->pu_offset_of_cu_header, pubnames_like_ptr, pubnames_context->pu_length_size, section_end_ptr,error); if (mres != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return mres; } pubnames_like_ptr += pubnames_context->pu_length_size; FIX_UP_OFFSET_IRIX_BUG(dbg, pubnames_context->pu_offset_of_cu_header, "pubnames cu header offset"); mres = _dwarf_read_unaligned_ck_wrapper(dbg, &pubnames_context->pu_info_length, pubnames_like_ptr, pubnames_context->pu_length_size, section_end_ptr,error); if (mres != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return mres; } pubnames_like_ptr += pubnames_context->pu_length_size; if (pubnames_like_ptr > (section_data_ptr + section_length)) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } _dwarf_error(dbg, error, length_err_num); return DW_DLV_ERROR; } /* ====begin pubname */ /* Read initial offset (of DIE within CU) of a pubname, final entry is not a pair, just a zero offset. */ mres = _dwarf_read_unaligned_ck_wrapper(dbg, &die_offset_in_cu, pubnames_like_ptr, pubnames_context->pu_length_size, pubnames_context->pu_pub_entries_end_ptr,error); if (mres != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } return mres; } pubnames_like_ptr += pubnames_context->pu_length_size; FIX_UP_OFFSET_IRIX_BUG(dbg, die_offset_in_cu, "offset of die in cu"); if (pubnames_like_ptr > (section_data_ptr + section_length)) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } _dwarf_error(dbg, error, length_err_num); return DW_DLV_ERROR; } /* Loop thru pairs. DIE off with CU followed by string. */ if (!die_offset_in_cu) { if (dbg->de_return_empty_pubnames) { int res = 0; /* Here we have a pubnames CU with no actual entries so we fake up an entry to hold the header data. There are no 'pairs' here, just the end of list zero value. We do this only if de_return_empty_pubnames is set so that we by default return exactly the same data this always returned, yet dwarfdump can request the empty-cu records get created to test that feature. see dwarf_get_globals_header() */ res = _dwarf_make_global_add_to_chain(dbg, global_DLA_code, pubnames_context, die_offset_in_cu, /* It is a fake global, so empty name */ (unsigned char *)"", &global_count, &pubnames_context_on_list, &plast_chain, error); if (res != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } return res; } /* ========pubnames_context recorded in chain. */ } else { /* The section is empty. Nowhere to record pubnames_context); */ dwarf_dealloc(dbg,pubnames_context,context_DLA_code); pubnames_context = 0; continue; } } while (die_offset_in_cu) { int res = 0; unsigned char *glname = 0; /* non-zero die_offset_in_cu already read, so pubnames_like_ptr points to a string. */ res = _dwarf_check_string_valid(dbg,section_data_ptr, pubnames_like_ptr, pubnames_context->pu_pub_entries_end_ptr, DW_DLE_STRING_OFF_END_PUBNAMES_LIKE,error); if (res != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } return res; } glname = (unsigned char *)pubnames_like_ptr; pubnames_like_ptr = pubnames_like_ptr + strlen((char *) pubnames_like_ptr) + 1; /* Already read offset and verified string, glname now points to the string. */ res = _dwarf_make_global_add_to_chain(dbg, global_DLA_code, pubnames_context, die_offset_in_cu, glname, &global_count, &pubnames_context_on_list, &plast_chain, error); if (res != DW_DLV_OK) { dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } return res; } /* ========pubnames_context recorded in chain. */ /* Ensure room for a next entry to exist. */ if ((pubnames_like_ptr + pubnames_context->pu_length_size ) > section_end_ptr) { pubnames_error_length(dbg,error, 2*pubnames_context->pu_length_size, secname, "global record offset"); dealloc_globals_chain(dbg,head_chain); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } return DW_DLV_ERROR; } /* Read die offset for the *next* entry */ mres = _dwarf_read_unaligned_ck_wrapper(dbg, &die_offset_in_cu, pubnames_like_ptr, pubnames_context->pu_length_size, pubnames_context->pu_pub_entries_end_ptr, error); if (mres != DW_DLV_OK) { if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } dealloc_globals_chain(dbg,head_chain); return mres; } pubnames_like_ptr += pubnames_context->pu_length_size; FIX_UP_OFFSET_IRIX_BUG(dbg, die_offset_in_cu, "offset of next die in cu"); if (pubnames_like_ptr > (section_data_ptr + section_length)) { if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context, context_DLA_code); } dealloc_globals_chain(dbg,head_chain); _dwarf_error(dbg, error, length_err_num); return DW_DLV_ERROR; } } /* ASSERT: die_offset_in_cu == 0 */ if (pubnames_like_ptr > pubnames_ptr_past_end_cu) { /* This is some kind of error. This simply cannot happen. The encoding is wrong or the length in the header for this cu's contribution is wrong. */ _dwarf_error(dbg, error, length_err_num); if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } dealloc_globals_chain(dbg,head_chain); return DW_DLV_ERROR; } /* If there is some kind of padding at the end of the section, as emitted by some compilers, skip over that padding and simply ignore the bytes thus passed-over. With most compilers, pubnames_like_ptr == pubnames_ptr_past_end_cu at this point */ { Dwarf_Unsigned increment = pubnames_context->pu_length_size + pubnames_context->pu_length + pubnames_context->pu_extension_size; pubnames_section_offset += increment; } pubnames_like_ptr = pubnames_ptr_past_end_cu; } while (pubnames_like_ptr < section_end_ptr); /* Points to contiguous block of Dwarf_Global. */ ret_globals = (Dwarf_Global *) _dwarf_get_alloc(dbg, DW_DLA_LIST, global_count); if (ret_globals == NULL) { if (!pubnames_context_on_list) { dwarf_dealloc(dbg,pubnames_context,context_DLA_code); } dealloc_globals_chain(dbg,head_chain); _dwarf_error(dbg, error, DW_DLE_ALLOC_FAIL); return DW_DLV_ERROR; } /* Store pointers to Dwarf_Global_s structs in contiguous block, and deallocate the chain. This ignores the various headers */ { Dwarf_Chain curr_chain = 0; curr_chain = head_chain; for (i = 0; i < global_count; i++) { Dwarf_Chain prev = 0; *(ret_globals + i) = curr_chain->ch_item; prev = curr_chain; curr_chain = curr_chain->ch_next; prev->ch_item = 0; /* Not actually necessary. */ dwarf_dealloc(dbg, prev, DW_DLA_CHAIN); } } *globals = ret_globals; *return_count = (Dwarf_Signed) global_count; return DW_DLV_OK; }
1593
True
1
CVE-2022-34299
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:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
8.1
HIGH
2.8
5.2
False
[{'url': 'https://github.com/davea42/libdwarf-code/issues/119', 'name': 'https://github.com/davea42/libdwarf-code/issues/119', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/davea42/libdwarf-code/commit/7ef09e1fc9ba07653dd078edb2408631c7969162', 'name': 'https://github.com/davea42/libdwarf-code/commit/7ef09e1fc9ba07653dd078edb2408631c7969162', '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:libdwarf_project:libdwarf:0.4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'There is a heap-based buffer over-read in libdwarf 0.4.0. This issue is related to dwarf_global_formref_b.'}]
2022-06-29T22:13Z
2022-06-23T17: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
David Anderson
2022-06-15 14:46:01-07:00
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
7ef09e1fc9ba07653dd078edb2408631c7969162
False
davea42/libdwarf-code
Contains source for libdwarf, a library for reading DWARF2 and later DWARF. Contains source to create dwarfdump, a program which prints DWARF2 and later DWARF in readable format. Has a very limited DWARF writer set of functions in libdwarfp (producer library). Builds using GNU configure, meson, or cmake.
2021-05-13 22:28:28
2022-08-27 17:53:34
davea42
45.0
18.0
find_sig8_target_as_global_offset
find_sig8_target_as_global_offset( Dwarf_Attribute attr , Dwarf_Sig8 * sig8 , Dwarf_Bool * is_info , Dwarf_Off * targoffset , Dwarf_Error * error)
['attr', 'sig8', 'is_info', 'targoffset', 'error']
find_sig8_target_as_global_offset(Dwarf_Attribute attr, Dwarf_Sig8 *sig8, Dwarf_Bool *is_info, Dwarf_Off *targoffset, Dwarf_Error *error) { Dwarf_Die targdie = 0; Dwarf_Bool targ_is_info = 0; Dwarf_Off localoff = 0; int res = 0; targ_is_info = attr->ar_cu_context->cc_is_info; memcpy(sig8,attr->ar_debug_ptr,sizeof(*sig8)); res = dwarf_find_die_given_sig8(attr->ar_dbg, sig8,&targdie,&targ_is_info,error); if (res != DW_DLV_OK) { return res; } res = dwarf_die_offsets(targdie,targoffset,&localoff,error); if (res != DW_DLV_OK) { dwarf_dealloc_die(targdie); return res; } *is_info = targdie->di_cu_context->cc_is_info; dwarf_dealloc_die(targdie); return DW_DLV_OK; }
143
True
1
CVE-2022-34295
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'name': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'name': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'name': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'refsource': 'MISC', 'tags': ['Patch', 'Release Notes', 'Third Party Advisory']}, {'url': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'name': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'refsource': 'MISC', 'tags': ['Exploit', 'Technical Description', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-330'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:totd_project:totd:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.5.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'totd before 1.5.3 does not properly randomize mesg IDs.'}]
2022-07-06T18:49Z
2022-06-23T17:15Z
Use of Insufficiently Random Values
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
When software generates predictable values in a context requiring unpredictability, it may be possible for an attacker to guess the next value that will be generated, and use this guess to impersonate another user or access sensitive information.
https://cwe.mitre.org/data/definitions/330.html
0
F.W. Dillema
2014-02-18 15:02:20+01:00
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
afd8a10a6a21f82a70940d1b43cff48143250399
False
fwdillema/totd
DNS proxy and translator for IPv6 and IPv4
2013-08-07 20:18:03
2018-09-28 19:15:39
null
fwdillema
19.0
5.0
mesg_id
mesg_id( void)
['void']
uint16_t mesg_id (void) { static uint16_t id = 0; if (!id) { srandom (time (NULL)); id = random (); } id++; if (T.debug > 4) syslog (LOG_DEBUG, "mesg_id() = %d", id); return id; }
56
True
1
CVE-2022-34295
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'name': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'name': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'name': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'refsource': 'MISC', 'tags': ['Patch', 'Release Notes', 'Third Party Advisory']}, {'url': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'name': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'refsource': 'MISC', 'tags': ['Exploit', 'Technical Description', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-330'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:totd_project:totd:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.5.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'totd before 1.5.3 does not properly randomize mesg IDs.'}]
2022-07-06T18:49Z
2022-06-23T17:15Z
Use of Insufficiently Random Values
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
When software generates predictable values in a context requiring unpredictability, it may be possible for an attacker to guess the next value that will be generated, and use this guess to impersonate another user or access sensitive information.
https://cwe.mitre.org/data/definitions/330.html
0
F.W. Dillema
2014-02-18 15:02:20+01:00
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
afd8a10a6a21f82a70940d1b43cff48143250399
False
fwdillema/totd
DNS proxy and translator for IPv6 and IPv4
2013-08-07 20:18:03
2018-09-28 19:15:39
null
fwdillema
19.0
5.0
mesg_make_query
mesg_make_query( u_char * qname , uint16_t qtype , uint16_t qclass , uint32_t id , int rd , u_char * buf , int buflen)
['qname', 'qtype', 'qclass', 'id', 'rd', 'buf', 'buflen']
int mesg_make_query (u_char *qname, uint16_t qtype, uint16_t qclass, uint32_t id, int rd, u_char *buf, int buflen) { char *fn = "mesg_make_query()"; u_char *ucp; int i, written_len; Mesg_Hdr *hdr; if (T.debug > 4) syslog (LOG_DEBUG, "%s: (qtype: %s, id: %d): start", fn, string_rtype (qtype), id); hdr = (Mesg_Hdr *) buf; /* write header */ hdr->id = id; hdr->opcode = OP_QUERY; hdr->rcode = RC_OK; hdr->rd = rd; hdr->qr = hdr->aa = hdr->tc = hdr->ra = hdr->zero = 0; hdr->qdcnt = ntohs (1); hdr->ancnt = hdr->nscnt = hdr->arcnt = ntohs (0); written_len = sizeof (Mesg_Hdr); ucp = (u_char *) (hdr + 1); /* write qname */ if (T.debug > 4) syslog (LOG_DEBUG, "%s: qname offset = %zd", fn, ucp - buf); i = dname_copy (qname, ucp, buflen - written_len); if (i < 0) return -1; written_len += i; ucp += i; /* write qtype / qclass */ if (T.debug > 4) syslog (LOG_DEBUG, "%s: qtype/qclass offset = %zd", fn, ucp - buf); written_len += sizeof (uint16_t) * 2; if (written_len > buflen) return -1; PUTSHORT (qtype, ucp); PUTSHORT (qclass, ucp); return written_len; }
278
True
1
CVE-2022-34295
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
6.5
MEDIUM
2.8
3.6
False
[{'url': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'name': 'https://www.usenix.org/conference/usenixsecurity22/presentation/jeitner', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'name': 'https://github.com/fwdillema/totd/commit/afd8a10a6a21f82a70940d1b43cff48143250399', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'name': 'https://github.com/fwdillema/totd/releases/tag/1.5.3', 'refsource': 'MISC', 'tags': ['Patch', 'Release Notes', 'Third Party Advisory']}, {'url': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'name': 'http://www.hit.bme.hu/~lencse/publications/JCST-Apr14-2.pdf', 'refsource': 'MISC', 'tags': ['Exploit', 'Technical Description', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-330'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:totd_project:totd:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.5.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'totd before 1.5.3 does not properly randomize mesg IDs.'}]
2022-07-06T18:49Z
2022-06-23T17:15Z
Use of Insufficiently Random Values
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
When software generates predictable values in a context requiring unpredictability, it may be possible for an attacker to guess the next value that will be generated, and use this guess to impersonate another user or access sensitive information.
https://cwe.mitre.org/data/definitions/330.html
0
F.W. Dillema
2014-02-18 15:02:20+01:00
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
afd8a10a6a21f82a70940d1b43cff48143250399
False
fwdillema/totd
DNS proxy and translator for IPv6 and IPv4
2013-08-07 20:18:03
2018-09-28 19:15:39
null
fwdillema
19.0
5.0
read_config
read_config( char * config_file)
['config_file']
int read_config (char *config_file) { char buf[512]; char *cp; FILE *config_fp; char *args[MAXARGS]; int argcnt, errcnt, linenum; if (T.debug > 0) syslog (LOG_DEBUG, "config file: %s", config_file); config_fp = fopen (config_file, "r"); if (!config_fp) { syslog (LOG_ERR, "can't open config file: %s", config_file); return -1; } linenum = errcnt = 0; while (fgets (buf, sizeof (buf), config_fp)) { linenum++; cp = strchr (buf, '\n'); if (cp) *cp = '\0'; cp = strchr (buf, '\n'); if (cp) *cp = '\0'; cp = strchr (buf, '#'); /* strip comment */ if (cp) *cp = '\0'; cp = strchr (buf, ';'); /* strip comment */ if (cp) *cp = '\0'; /* parse config line in words */ args[argcnt = 0] = strtok (buf, " \t"); while (args[argcnt] && ++argcnt < MAXARGS) args[argcnt] = strtok (NULL, " \t"); if (!args[0]) /* empty line (or only comment) */ continue; if (!strcasecmp (args[0], "forwarder")) { if (argcnt < 2 || argcnt > 4 ) { syslog (LOG_ERR, "line %d: invalid format: forwarder <IPaddr> [port <port>]", linenum); errcnt++; } else { int port = PORT_TO, i; i = 2; if (argcnt > i) { if (!strcasecmp (args[i], "port")) { if (argcnt >= ++i) { port = atoi (args[i++]); } else { syslog (LOG_ERR, "line %d: invalid format, missing <port> after port attribute", linenum); errcnt++; continue; } } else { syslog (LOG_ERR, "line %d: invalid format, cannot parse unknown attribute: %s", linenum, args[i]); errcnt++; continue; } } if (fwd_add (args[1], port) == -1) return -1; /* serious trouble */ } } else if (!strcasecmp (args[0], "prefix")) { if (argcnt != 2) { syslog (LOG_ERR, "line %d: invalid format: prefix <IPv6prefix>", linenum); errcnt++; } else { if (conv_trick_conf ((u_char *)args[1])) { syslog (LOG_INFO, "can not add prefix %d: %s", T.prefixnum, args[1]); errcnt++; } else syslog (LOG_INFO, "prefix %d added: %s", T.prefixnum, args[1]); } } else if (!strcasecmp (args[0], "allow")) { if (argcnt != 2) { syslog (LOG_ERR, "line %d: invalid format: allow <IP address>", linenum); errcnt++; } else { #ifdef SWILL if (T.http_port) { swill_allow(args[1]); syslog (LOG_INFO, "allow http connects from %s", args[1]); } else #endif syslog (LOG_INFO, "NOTE: http support not enabled!!!"); } } else if (!strcasecmp (args[0], "retry")) { if (argcnt != 2) { syslog (LOG_ERR, "line %d: invalid format: retry <seconds>", linenum); errcnt++; } else { T.retry_interval = atoi(args[1]); } } else if (!strcasecmp (args[0], "pidfile")) { if (argcnt != 2) { syslog (LOG_ERR, "line %d: invalid format: pidfile <filename>", linenum); errcnt++; } else { T.pidfile = strdup(args[1]); } } else if (!strcasecmp (args[0], "interfaces")) { int i; if (argcnt < 2) { syslog (LOG_ERR, "line %d: invalid format: interfaces <ifa> <ifb> ...", linenum); errcnt++; } for (i = 0; T.iflist[i] && i < MAXINTERFACES; i++); if (i + argcnt-1 > MAXINTERFACES) { syslog (LOG_ERR, "line %d: to many interfaces, more than %d", linenum, MAXINTERFACES); errcnt++; } else { syslog (LOG_DEBUG, "line %d: %d interfaces listed, no wildcard socket", linenum, argcnt-1); T.iflist[i + argcnt--] = NULL; while (argcnt) { if (!strcmp(args[argcnt], "*")) { /* wildcard interface, ignore other ifn */ T.iflist[0] = NULL; T.wildcard = 1; break; } T.iflist[i+argcnt-1] = strdup(args[argcnt]); argcnt--; } if (T.iflist[0]) T.wildcard = 0; } } else if (!strcasecmp (args[0], "port")) { if (argcnt != 2) { syslog (LOG_ERR, "line %d: invalid format: port <portnum>", linenum); errcnt++; } else { T.port = atoi(args[1]); } } #ifdef SCOPED_REWRITE else if (!strcasecmp(args[0], "scoped")) { if (argcnt != 4) { syslog (LOG_ERR, "line %d: invalid format: scoped <from> <to> <plen>", linenum); errcnt++; } else { if (conv_scoped_conf(args[1], args[2], atoi(args[3]))) { syslog (LOG_INFO, "can not add scoped %d: %s %s %s", T.scoped_prefixes, args[1], args[2], args[3]); errcnt++; } else { syslog(LOG_INFO, "scoped %d added: %s %s %d", T.scoped_prefixes, args[1], args[2], atoi(args[3])); } } } #endif #ifdef STF else if (!strcasecmp(args[0], "stf")) { if (argcnt != 1) { syslog (LOG_ERR, "line %d: invalid format: stf", linenum); errcnt++; } else { T.stf = 1; } } #endif else { syslog (LOG_WARNING, "line %d: unknown keyword in config file: %s", linenum, args[0]); errcnt++; } } fclose (config_fp); if (errcnt) { syslog (LOG_ERR, "errors found in config file. errcnt = %d", errcnt); return -1; } else syslog (LOG_INFO, "configuration file loaded."); return 0; }
1114
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
decrypt_stream
decrypt_stream( FILE * infp , FILE * outfp , unsigned char * passwd , int passlen)
['infp', 'outfp', 'passwd', 'passlen']
int decrypt_stream(FILE *infp, FILE *outfp, unsigned char* passwd, int passlen) { aes_context aes_ctx; sha256_context sha_ctx; aescrypt_hdr aeshdr; sha256_t digest; unsigned char IV[16]; unsigned char iv_key[48]; unsigned i, j, n; size_t bytes_read; unsigned char buffer[64], buffer2[32]; unsigned char *head, *tail; unsigned char ipad[64], opad[64]; int reached_eof = 0; /* Read the file header */ if ((bytes_read = fread(&aeshdr, 1, sizeof(aeshdr), infp)) != sizeof(aescrypt_hdr)) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading the file header:"); } return -1; } if (!(aeshdr.aes[0] == 'A' && aeshdr.aes[1] == 'E' && aeshdr.aes[2] == 'S')) { fprintf(stderr, "Error: Bad file header (not aescrypt file or is corrupted? [%x, %x, %x])\n", aeshdr.aes[0], aeshdr.aes[1], aeshdr.aes[2]); return -1; } /* Validate the version number and take any version-specific actions */ if (aeshdr.version == 0) { /* * Let's just consider the least significant nibble to determine * the size of the last block */ aeshdr.last_block_size = (aeshdr.last_block_size & 0x0F); } else if (aeshdr.version > 0x02) { fprintf(stderr, "Error: Unsupported AES file version: %d\n", aeshdr.version); return -1; } /* Skip over extensions present v2 and later files */ if (aeshdr.version >= 0x02) { do { if ((bytes_read = fread(buffer, 1, 2, infp)) != 2) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading the file extensions:"); } return -1; } /* Determine the extension length, zero means no more extensions */ i = j = (((int)buffer[0]) << 8) | (int)buffer[1]; while (i--) { if ((bytes_read = fread(buffer, 1, 1, infp)) != 1) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading the file extensions:"); } return -1; } } } while(j); } /* Read the initialization vector from the file */ if ((bytes_read = fread(IV, 1, 16, infp)) != 16) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading the initialization vector:"); } return -1; } /* Hash the IV and password 8192 times */ memset(digest, 0, 32); memcpy(digest, IV, 16); for(i=0; i<8192; i++) { sha256_starts( &sha_ctx); sha256_update( &sha_ctx, digest, 32); sha256_update( &sha_ctx, passwd, passlen); sha256_finish( &sha_ctx, digest); } /* Set the AES encryption key */ aes_set_key(&aes_ctx, digest, 256); /* Set the ipad and opad arrays with values as * per RFC 2104 (HMAC). HMAC is defined as * H(K XOR opad, H(K XOR ipad, text)) */ memset(ipad, 0x36, 64); memset(opad, 0x5C, 64); for(i=0; i<32; i++) { ipad[i] ^= digest[i]; opad[i] ^= digest[i]; } sha256_starts(&sha_ctx); sha256_update(&sha_ctx, ipad, 64); /* If this is a version 1 or later file, then read the IV and key * for decrypting the bulk of the file. */ if (aeshdr.version >= 0x01) { for(i=0; i<48; i+=16) { if ((bytes_read = fread(buffer, 1, 16, infp)) != 16) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading input file IV and key:"); } return -1; } memcpy(buffer2, buffer, 16); sha256_update(&sha_ctx, buffer, 16); aes_decrypt(&aes_ctx, buffer, buffer); /* * XOR plain text block with previous encrypted * output (i.e., use CBC) */ for(j=0; j<16; j++) { iv_key[i+j] = (buffer[j] ^ IV[j]); } /* Update the IV (CBC mode) */ memcpy(IV, buffer2, 16); } /* Verify that the HMAC is correct */ sha256_finish(&sha_ctx, digest); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, opad, 64); sha256_update(&sha_ctx, digest, 32); sha256_finish(&sha_ctx, digest); if ((bytes_read = fread(buffer, 1, 32, infp)) != 32) { if (feof(infp)) { fprintf(stderr, "Error: Input file is too short.\n"); } else { perror("Error reading input file digest:"); } return -1; } if (memcmp(digest, buffer, 32)) { fprintf(stderr, "Error: Message has been altered or password is incorrect\n"); return -1; } /* * Re-load the IV and encryption key with the IV and * key to now encrypt the datafile. Also, reset the HMAC * computation. */ memcpy(IV, iv_key, 16); /* Set the AES encryption key */ aes_set_key(&aes_ctx, iv_key+16, 256); /* * Set the ipad and opad arrays with values as * per RFC 2104 (HMAC). HMAC is defined as * H(K XOR opad, H(K XOR ipad, text)) */ memset(ipad, 0x36, 64); memset(opad, 0x5C, 64); for(i=0; i<32; i++) { ipad[i] ^= iv_key[i+16]; opad[i] ^= iv_key[i+16]; } /* Wipe the IV and encryption key from memory */ memset_secure(iv_key, 0, 48); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, ipad, 64); } /* * Decrypt the balance of the file * * Attempt to initialize the ring buffer with contents from the file. * Attempt to read 48 octets of the file into the ring buffer. */ if ((bytes_read = fread(buffer, 1, 48, infp)) < 48) { if (!feof(infp)) { perror("Error reading input file ring:"); return -1; } else { /* * If there are less than 48 octets, the only valid count * is 32 for version 0 (HMAC) and 33 for version 1 or * greater files ( file size modulo + HMAC) */ if ((aeshdr.version == 0x00 && bytes_read != 32) || (aeshdr.version >= 0x01 && bytes_read != 33)) { fprintf(stderr, "Error: Input file is corrupt (1:%u).\n", (unsigned) bytes_read); return -1; } else { /* * Version 0 files would have the last block size * read as part of the header, so let's grab that * value now for version 1 files. */ if (aeshdr.version >= 0x01) { /* * The first octet must be the indicator of the * last block size. */ aeshdr.last_block_size = (buffer[0] & 0x0F); } /* * If this initial read indicates there is no encrypted * data, then there should be 0 in the last_block_size field */ if (aeshdr.last_block_size != 0) { fprintf(stderr, "Error: Input file is corrupt (2).\n"); return -1; } } reached_eof = 1; } } head = buffer + 48; tail = buffer; while(!reached_eof) { /* Check to see if the head of the buffer is past the ring buffer */ if (head == (buffer + 64)) { head = buffer; } if ((bytes_read = fread(head, 1, 16, infp)) < 16) { if (!feof(infp)) { perror("Error reading input file:"); return -1; } else { /* The last block for v0 must be 16 and for v1 it must be 1 */ if ((aeshdr.version == 0x00 && bytes_read > 0) || (aeshdr.version >= 0x01 && bytes_read != 1)) { fprintf(stderr, "Error: Input file is corrupt (3:%u).\n", (unsigned) bytes_read); return -1; } /* * If this is a v1 file, then the file modulo is located * in the ring buffer at tail + 16 (with consideration * given to wrapping around the ring, in which case * it would be at buffer[0]) */ if (aeshdr.version >= 0x01) { if ((tail + 16) < (buffer + 64)) { aeshdr.last_block_size = (tail[16] & 0x0F); } else { aeshdr.last_block_size = (buffer[0] & 0x0F); } } /* Indicate that we've reached the end of the file */ reached_eof = 1; } } /* * Process data that has been read. Note that if the last * read operation returned no additional data, there is still * one one ciphertext block for us to process if this is a v0 file. */ if ((bytes_read > 0) || (aeshdr.version == 0x00)) { /* Advance the head of the buffer forward */ if (bytes_read > 0) { head += 16; } memcpy(buffer2, tail, 16); sha256_update(&sha_ctx, tail, 16); aes_decrypt(&aes_ctx, tail, tail); /* * XOR plain text block with previous encrypted * output (i.e., use CBC) */ for(i=0; i<16; i++) { tail[i] ^= IV[i]; } /* Update the IV (CBC mode) */ memcpy(IV, buffer2, 16); /* * If this is the final block, then we may * write less than 16 octets */ n = ((!reached_eof) || (aeshdr.last_block_size == 0)) ? 16 : aeshdr.last_block_size; /* Write the decrypted block */ if ((i = fwrite(tail, 1, n, outfp)) != n) { perror("Error writing decrypted block:"); return -1; } /* Move the tail of the ring buffer forward */ tail += 16; if (tail == (buffer+64)) { tail = buffer; } } } /* Verify that the HMAC is correct */ sha256_finish(&sha_ctx, digest); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, opad, 64); sha256_update(&sha_ctx, digest, 32); sha256_finish(&sha_ctx, digest); /* Copy the HMAC read from the file into buffer2 */ if (aeshdr.version == 0x00) { memcpy(buffer2, tail, 16); tail += 16; if (tail == (buffer + 64)) { tail = buffer; } memcpy(buffer2+16, tail, 16); } else { memcpy(buffer2, tail+1, 15); tail += 16; if (tail == (buffer + 64)) { tail = buffer; } memcpy(buffer2+15, tail, 16); tail += 16; if (tail == (buffer + 64)) { tail = buffer; } memcpy(buffer2+31, tail, 1); } if (memcmp(digest, buffer2, 32)) { if (aeshdr.version == 0x00) { fprintf(stderr, "Error: Message has been altered or password is incorrect\n"); } else { fprintf(stderr, "Error: Message has been altered and should not be trusted\n"); } return -1; } /* Flush the output buffer to ensure all data is written to disk */ if (fflush(outfp)) { fprintf(stderr, "Error: Could not flush output file buffer\n"); return -1; } return 0; }
1691
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
encrypt_stream
encrypt_stream( FILE * infp , FILE * outfp , unsigned char * passwd , int passlen)
['infp', 'outfp', 'passwd', 'passlen']
int encrypt_stream(FILE *infp, FILE *outfp, unsigned char* passwd, int passlen) { aes_context aes_ctx; sha256_context sha_ctx; aescrypt_hdr aeshdr; sha256_t digest; unsigned char IV[16]; unsigned char iv_key[48]; unsigned i, j; size_t bytes_read; unsigned char buffer[32]; unsigned char ipad[64], opad[64]; time_t current_time; pid_t process_id; void *aesrand; unsigned char tag_buffer[256]; /* * Open the source for random data. Note that while the entropy * might be lower with /dev/urandom than /dev/random, it will not * fail to produce something. Also, we're going to hash the result * anyway. */ if ((aesrand = aesrandom_open()) == NULL) { perror("Error open random:"); return -1; } /* * Create the 16-octet IV and 32-octet encryption key * used for encrypting the plaintext file. We do * not trust the rand() function, so we improve on * that by also hashing the random digits and using * only a portion of the hash. This IV and key * generation could be replaced with any good random * source of data. */ memset(iv_key, 0, 48); for (i=0; i<48; i+=16) { memset(buffer, 0, 32); sha256_starts(&sha_ctx); for(j=0; j<256; j++) { if ((bytes_read = aesrandom_read(aesrand, buffer, 32)) != 32) { fprintf(stderr, "Error: Couldn't read from random : %u\n", (unsigned) bytes_read); aesrandom_close(aesrand); return -1; } sha256_update(&sha_ctx, buffer, 32); } sha256_finish(&sha_ctx, digest); memcpy(iv_key+i, digest, 16); } /* * Write an AES signature at the head of the file, along * with the AES file format version number. */ buffer[0] = 'A'; buffer[1] = 'E'; buffer[2] = 'S'; buffer[3] = (unsigned char) 0x02; /* Version 2 */ buffer[4] = '\0'; /* Reserved for version 0 */ if (fwrite(buffer, 1, 5, outfp) != 5) { fprintf(stderr, "Error: Could not write out header data\n"); aesrandom_close(aesrand); return -1; } /* Write out the CREATED-BY tag */ j = 11 + /* "CREATED-BY\0" */ strlen(PACKAGE_NAME) + /* Program name */ 1 + /* Space */ strlen(PACKAGE_VERSION); /* Program version ID */ /* * Our extension buffer is only 256 octets long, so * let's not write an extension if it is too big */ if (j < 256) { buffer[0] = '\0'; buffer[1] = (unsigned char) (j & 0xff); if (fwrite(buffer, 1, 2, outfp) != 2) { fprintf(stderr, "Error: Could not write tag to AES file (1)\n"); aesrandom_close(aesrand); return -1; } strncpy((char *)tag_buffer, "CREATED_BY", 255); tag_buffer[255] = '\0'; if (fwrite(tag_buffer, 1, 11, outfp) != 11) { fprintf(stderr, "Error: Could not write tag to AES file (2)\n"); aesrandom_close(aesrand); return -1; } sprintf((char *)tag_buffer, "%s %s", PACKAGE_NAME, PACKAGE_VERSION); j = strlen((char *)tag_buffer); if (fwrite(tag_buffer, 1, j, outfp) != j) { fprintf(stderr, "Error: Could not write tag to AES file (3)\n"); aesrandom_close(aesrand); return -1; } } /* Write out the "container" extension */ buffer[0] = '\0'; buffer[1] = (unsigned char) 128; if (fwrite(buffer, 1, 2, outfp) != 2) { fprintf(stderr, "Error: Could not write tag to AES file (4)\n"); aesrandom_close(aesrand); return -1; } memset(tag_buffer, 0, 128); if (fwrite(tag_buffer, 1, 128, outfp) != 128) { fprintf(stderr, "Error: Could not write tag to AES file (5)\n"); aesrandom_close(aesrand); return -1; } /* Write out 0x0000 to indicate that no more extensions exist */ buffer[0] = '\0'; buffer[1] = '\0'; if (fwrite(buffer, 1, 2, outfp) != 2) { fprintf(stderr, "Error: Could not write tag to AES file (6)\n"); aesrandom_close(aesrand); return -1; } /* * We will use an initialization vector comprised of the current time * process ID, and random data, all hashed together with SHA-256. */ sha256_starts( &sha_ctx); current_time = time(NULL); sha256_update( &sha_ctx, (unsigned char *)&time, sizeof(current_time)); process_id = getpid(); sha256_update( &sha_ctx, (unsigned char *)&process_id, sizeof(process_id)); for (i=0; i<256; i++) { if (aesrandom_read(aesrand, buffer, 32) != 32) { fprintf(stderr, "Error: Couldn't read from /dev/random\n"); aesrandom_close(aesrand); return -1; } sha256_update( &sha_ctx, buffer, 32); } sha256_finish( &sha_ctx, digest); memcpy(IV, digest, 16); /* We're finished collecting random data */ aesrandom_close(aesrand); /* Write the initialization vector to the file */ if (fwrite(IV, 1, 16, outfp) != 16) { fprintf(stderr, "Error: Could not write out initialization vector\n"); return -1; } /* Hash the IV and password 8192 times */ memset(digest, 0, 32); memcpy(digest, IV, 16); for(i=0; i<8192; i++) { sha256_starts( &sha_ctx); sha256_update( &sha_ctx, digest, 32); sha256_update( &sha_ctx, passwd, (unsigned long)passlen); sha256_finish( &sha_ctx, digest); } /* Set the AES encryption key */ aes_set_key(&aes_ctx, digest, 256); /* * Set the ipad and opad arrays with values as * per RFC 2104 (HMAC). HMAC is defined as * H(K XOR opad, H(K XOR ipad, text)) */ memset(ipad, 0x36, 64); memset(opad, 0x5C, 64); for(i=0; i<32; i++) { ipad[i] ^= digest[i]; opad[i] ^= digest[i]; } sha256_starts(&sha_ctx); sha256_update(&sha_ctx, ipad, 64); /* * Encrypt the IV and key used to encrypt the plaintext file, * writing that encrypted text to the output file. */ for(i=0; i<48; i+=16) { /* * Place the next 16 octets of IV and key buffer into * the input buffer. */ memcpy(buffer, iv_key+i, 16); /* * XOR plain text block with previous encrypted * output (i.e., use CBC) */ for(j=0; j<16; j++) { buffer[j] ^= IV[j]; } /* Encrypt the contents of the buffer */ aes_encrypt(&aes_ctx, buffer, buffer); /* Concatenate the "text" as we compute the HMAC */ sha256_update(&sha_ctx, buffer, 16); /* Write the encrypted block */ if (fwrite(buffer, 1, 16, outfp) != 16) { fprintf(stderr, "Error: Could not write iv_key data\n"); return -1; } /* Update the IV (CBC mode) */ memcpy(IV, buffer, 16); } /* Write the HMAC */ sha256_finish(&sha_ctx, digest); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, opad, 64); sha256_update(&sha_ctx, digest, 32); sha256_finish(&sha_ctx, digest); /* Write the encrypted block */ if (fwrite(digest, 1, 32, outfp) != 32) { fprintf(stderr, "Error: Could not write iv_key HMAC\n"); return -1; } /* Re-load the IV and encryption key with the IV and * key to now encrypt the datafile. Also, reset the HMAC * computation. */ memcpy(IV, iv_key, 16); /* Set the AES encryption key */ aes_set_key(&aes_ctx, iv_key+16, 256); /* * Set the ipad and opad arrays with values as * per RFC 2104 (HMAC). HMAC is defined as * H(K XOR opad, H(K XOR ipad, text)) */ memset(ipad, 0x36, 64); memset(opad, 0x5C, 64); for(i=0; i<32; i++) { ipad[i] ^= iv_key[i+16]; opad[i] ^= iv_key[i+16]; } /* Wipe the IV and encryption key from memory */ memset_secure(iv_key, 0, 48); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, ipad, 64); /* Initialize the last_block_size value to 0 */ aeshdr.last_block_size = 0; while ((bytes_read = fread(buffer, 1, 16, infp)) > 0) { /* * XOR plain text block with previous encrypted * output (i.e., use CBC) */ for(i=0; i<16; i++) { buffer[i] ^= IV[i]; } /* Encrypt the contents of the buffer */ aes_encrypt(&aes_ctx, buffer, buffer); /* Concatenate the "text" as we compute the HMAC */ sha256_update(&sha_ctx, buffer, 16); /* Write the encrypted block */ if (fwrite(buffer, 1, 16, outfp) != 16) { fprintf(stderr, "Error: Could not write to output file\n"); return -1; } /* Update the IV (CBC mode) */ memcpy(IV, buffer, 16); /* Assume this number of octets is the file modulo */ aeshdr.last_block_size = bytes_read; } /* Check to see if we had a read error */ if (ferror(infp)) { fprintf(stderr, "Error: Couldn't read input file\n"); return -1; } /* Write the file size modulo */ buffer[0] = (char) (aeshdr.last_block_size & 0x0F); if (fwrite(buffer, 1, 1, outfp) != 1) { fprintf(stderr, "Error: Could not write the file size modulo\n"); return -1; } /* Write the HMAC */ sha256_finish(&sha_ctx, digest); sha256_starts(&sha_ctx); sha256_update(&sha_ctx, opad, 64); sha256_update(&sha_ctx, digest, 32); sha256_finish(&sha_ctx, digest); if (fwrite(digest, 1, 32, outfp) != 32) { fprintf(stderr, "Error: Could not write the file HMAC\n"); return -1; } /* Flush the output buffer to ensure all data is written to disk */ if (fflush(outfp)) { fprintf(stderr, "Error: Could not flush output file buffer\n"); return -1; } return 0; }
1507
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
main
main( int argc , char * argv [ ])
['argc']
int main(int argc, char *argv[]) { int rc=0; int passlen=0; FILE *infp = NULL; FILE *outfp = NULL; encryptmode_t mode=UNINIT; char *infile = NULL; unsigned char pass[MAX_PASSWD_BUF]; int file_count = 0; char outfile[1024]; int password_acquired = 0; /* Initialize the output filename */ outfile[0] = '\0'; while ((rc = getopt(argc, argv, "vhdek:p:o:")) != -1) { switch (rc) { case 'h': usage(argv[0]); return 0; case 'v': version(argv[0]); return 0; case 'd': if (mode != UNINIT) { fprintf(stderr, "Error: only specify one of -d or -e\n"); cleanup(outfile); return -1; } mode = DEC; break; case 'e': if (mode != UNINIT) { fprintf(stderr, "Error: only specify one of -d or -e\n"); cleanup(outfile); return -1; } mode = ENC; break; case 'k': if (password_acquired) { fprintf(stderr, "Error: password supplied twice\n"); cleanup(outfile); return -1; } if (optarg != 0) { if (!strcmp("-",optarg)) { fprintf(stderr, "Error: keyfile cannot be read from stdin\n"); cleanup(outfile); return -1; } passlen = ReadKeyFile(optarg, pass); if (passlen < 0) { cleanup(outfile); return -1; } password_acquired = 1; } break; case 'p': if (password_acquired) { fprintf(stderr, "Error: password supplied twice\n"); cleanup(outfile); return -1; } if (optarg != 0) { passlen = passwd_to_utf16( (unsigned char*) optarg, strlen((char *)optarg), MAX_PASSWD_LEN, pass); if (passlen < 0) { cleanup(outfile); return -1; } password_acquired = 1; } break; case 'o': /* outfile argument */ if (!strncmp("-", optarg, 2)) { /* if '-' is outfile name then out to stdout */ outfp = stdout; } else if ((outfp = fopen(optarg, "w")) == NULL) { fprintf(stderr, "Error opening output file %s:", optarg); perror(""); cleanup(outfile); return -1; } strncpy(outfile, optarg, 1024); outfile[1023] = '\0'; break; default: fprintf(stderr, "Error: Unknown option '%c'\n", rc); } } if (optind >= argc) { fprintf(stderr, "Error: No file argument specified\n"); usage(argv[0]); cleanup(outfile); return -1; } if (mode == UNINIT) { fprintf(stderr, "Error: -e or -d not specified\n"); usage(argv[0]); cleanup(outfile); return -1; } /* Prompt for password if not provided on the command line */ if (passlen == 0) { passlen = read_password(pass, mode); switch (passlen) { case 0: /* no password in input */ fprintf(stderr, "Error: No password supplied.\n"); cleanup(outfile); return -1; case AESCRYPT_READPWD_FOPEN: case AESCRYPT_READPWD_FILENO: case AESCRYPT_READPWD_TCGETATTR: case AESCRYPT_READPWD_TCSETATTR: case AESCRYPT_READPWD_FGETC: case AESCRYPT_READPWD_TOOLONG: case AESCRYPT_READPWD_ICONV: fprintf(stderr, "Error in read_password: %s.\n", read_password_error(passlen)); cleanup(outfile); return -1; case AESCRYPT_READPWD_NOMATCH: fprintf(stderr, "Error: Passwords don't match.\n"); cleanup(outfile); return -1; } passlen = passwd_to_utf16( pass, strlen((char*)pass), MAX_PASSWD_LEN, pass); if (passlen < 0) { cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } } file_count = argc - optind; if ((file_count > 1) && (outfp != NULL)) { if (outfp != stdout) { fclose(outfp); } fprintf(stderr, "Error: A single output file may not be specified with multiple input files.\n"); usage(argv[0]); cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } while (optind < argc) { infile = argv[optind++]; if(!strncmp("-", infile, 2)) { if (file_count > 1) { if ((outfp != stdout) && (outfp != NULL)) { fclose(outfp); } fprintf(stderr, "Error: STDIN may not be specified with multiple input files.\n"); usage(argv[0]); cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } infp = stdin; if (outfp == NULL) { outfp = stdout; } } else if ((infp = fopen(infile, "r")) == NULL) { if ((outfp != stdout) && (outfp != NULL)) { fclose(outfp); } fprintf(stderr, "Error opening input file %s : ", infile); perror(""); cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } if (mode == ENC) { if (outfp == NULL) { snprintf(outfile, 1024, "%s.aes", infile); if ((outfp = fopen(outfile, "w")) == NULL) { if ((infp != stdin) && (infp != NULL)) { fclose(infp); } fprintf(stderr, "Error opening output file %s : ", outfile); perror(""); cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } } rc = encrypt_stream(infp, outfp, pass, passlen); } else if (mode == DEC) { if (outfp == NULL) { /* assume .aes extension */ strncpy(outfile, infile, strlen(infile)-4); outfile[strlen(infile)-4] = '\0'; if ((outfp = fopen(outfile, "w")) == NULL) { if ((infp != stdin) && (infp != NULL)) { fclose(infp); } fprintf(stderr, "Error opening output file %s : ", outfile); perror(""); cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } } /* * should probably test against ascii, utf-16le, and utf-16be * encodings */ rc = decrypt_stream(infp, outfp, pass, passlen); } if ((infp != stdin) && (infp != NULL)) { fclose(infp); } if ((outfp != stdout) && (outfp != NULL)) { if (fclose(outfp)) { if (!rc) { fprintf(stderr, "Error: Could not properly close output file \n"); rc = -1; } } } /* If there was an error, remove the output file */ if (rc) { cleanup(outfile); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } /* Reset input/output file names and desriptors */ outfile[0] = '\0'; infp = NULL; outfp = NULL; } /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return rc; }
1273
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
usage
usage( const char * progname)
['progname']
void usage(const char *progname) { const char* progname_real; /* contains the real name of the program */ /* (without path) */ progname_real = strrchr(progname, '/'); if (progname_real == NULL) /* no path in progname: use progname */ { progname_real = progname; } else { progname_real++; } fprintf(stderr, "\nusage: %s {-e|-d} [ { -p <password> | -k <keyfile> } ] { [-o <output filename>] <file> | <file> [<file> ...] }\n\n", progname_real); }
50
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
generate_password
generate_password( int length , unsigned char * password)
['length', 'password']
int generate_password(int length, unsigned char *password) { const char pwchars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '%', '$' }; FILE *randfp; unsigned char pwtemp[MAX_PASSWD_BUF]; unsigned char *p; int i, n; int passlen; if ((length <= 0) || (length > MAX_PASSWD_LEN)) { fprintf(stderr, "Invalid password length specified.\n"); return -1; } /* Open the device to read random octets */ if ((randfp = fopen("/dev/urandom", "r")) == NULL) { perror("Error open /dev/urandom:"); return -1; } /* Read random octets */ if ((n = fread((char*)pwtemp, 1, length, randfp)) != length) { fprintf(stderr, "Error: Couldn't read from /dev/urandom\n"); fclose(randfp); return -1; } fclose(randfp); /* Now ensure each octet is uses the defined character set */ for(i = 0, p = pwtemp; i < length; i++, p++) { *p = pwchars[((int)(*p)) % 64]; } /* Convert the password to UTF-16LE */ passlen = passwd_to_utf16( pwtemp, length, MAX_PASSWD_LEN, password); return passlen; }
327
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
main
main( int argc , char * argv [ ])
['argc']
int main(int argc, char *argv[]) { int option; int passlen=0; FILE *outfp = NULL; char outfile[1024]; unsigned char pass[MAX_PASSWD_BUF]; int file_count = 0; unsigned char bom[2]; int password_acquired = 0; while ((option = getopt(argc, argv, "vhg:p:o:")) != -1) { switch (option) { case 'h': usage(argv[0]); return 0; case 'v': version(argv[0]); return 0; case 'g': if (password_acquired) { fprintf(stderr, "Error: password supplied twice\n"); return -1; } if (optarg != 0) { passlen = generate_password(atoi((char*) optarg), pass); if (passlen < 0) { return -1; } } password_acquired = 1; break; case 'p': if (password_acquired) { fprintf(stderr, "Error: password supplied twice\n"); return -1; } if (optarg != 0) { passlen = passwd_to_utf16( (unsigned char*) optarg, strlen((char *)optarg), MAX_PASSWD_LEN, pass); if (passlen < 0) { return -1; } } password_acquired = 1; break; default: fprintf(stderr, "Error: Unknown option '%c'\n", option); return -1; } } file_count = argc - optind; if (file_count != 1) { fprintf(stderr, "Error: A single output file must be specified.\n"); usage(argv[0]); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } else { /* What is the filename for the key file? */ strncpy(outfile, argv[optind++], 1024); outfile[1023] = '\0'; } /* Prompt for password if not provided on the command line */ if (passlen == 0) { passlen = read_password(pass, ENC); switch (passlen) { case 0: /* no password in input */ fprintf(stderr, "Error: No password supplied.\n"); return -1; case AESCRYPT_READPWD_FOPEN: case AESCRYPT_READPWD_FILENO: case AESCRYPT_READPWD_TCGETATTR: case AESCRYPT_READPWD_TCSETATTR: case AESCRYPT_READPWD_FGETC: case AESCRYPT_READPWD_TOOLONG: case AESCRYPT_READPWD_ICONV: fprintf(stderr, "Error in read_password: %s.\n", read_password_error(passlen)); return -1; case AESCRYPT_READPWD_NOMATCH: fprintf(stderr, "Error: Passwords don't match.\n"); return -1; } } if(!strcmp("-", outfile)) { outfp = stdout; } else if ((outfp = fopen(outfile, "w")) == NULL) { fprintf(stderr, "Error opening output file %s : ", outfile); perror(""); /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return -1; } /* Write the BOM. AES Crypt uses UTF-16LE */ bom[0] = 0xFF; bom[1] = 0xFE; if (fwrite(bom, 1, 2, outfp) != 2) { fprintf(stderr, "Error: Could not write BOM to password file.\n"); if (strcmp("-",outfile)) { fclose(outfp); } cleanup(outfile); return -1; } if (fwrite(pass, 1, passlen, outfp) != (size_t) passlen) { fprintf(stderr, "Error: Could not write password file.\n"); if (strcmp("-",outfile)) { fclose(outfp); } cleanup(outfile); return -1; } /* Close the output file, so long as it is not stdout */ if (strcmp("-",outfile)) { fclose(outfp); } /* For security reasons, erase the password */ memset_secure(pass, 0, MAX_PASSWD_BUF); return 0; }
616
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
passwd_to_utf16
passwd_to_utf16( unsigned char * in_passwd , int length , int max_length , unsigned char * out_passwd)
['in_passwd', 'length', 'max_length', 'out_passwd']
int passwd_to_utf16(unsigned char *in_passwd, int length, int max_length, unsigned char *out_passwd) { #ifdef WIN32 int ret; (void)length; ret = MultiByteToWideChar( CP_ACP, 0, (LPCSTR)in_passwd, -1, (LPWSTR)out_passwd, max_length / 2 ); if (ret == 0) return AESCRYPT_READPWD_ICONV; return ret * 2; #else #ifndef ENABLE_ICONV /* support only latin */ int i; for (i=0;i<length+1;i++) { out_passwd[i*2] = in_passwd[i]; out_passwd[i*2+1] = 0; } return length*2; #else unsigned char *ic_outbuf, *ic_inbuf; iconv_t condesc; size_t ic_inbytesleft, ic_outbytesleft; /* Max length is specified in character, but this function deals * with bytes. So, multiply by two since we are going to create a * UTF-16 string. */ max_length *= 2; ic_inbuf = in_passwd; ic_inbytesleft = length; ic_outbytesleft = max_length; ic_outbuf = out_passwd; /* Set the locale based on the current environment */ setlocale(LC_CTYPE,""); if ((condesc = iconv_open("UTF-16LE", nl_langinfo(CODESET))) == (iconv_t)(-1)) { perror("Error in iconv_open"); return -1; } if (iconv(condesc, (char ** const) &ic_inbuf, &ic_inbytesleft, (char ** const) &ic_outbuf, &ic_outbytesleft) == (size_t) -1) { switch (errno) { case E2BIG: fprintf(stderr, "Error: password too long\n"); iconv_close(condesc); return -1; break; default: /* printf("\nEILSEQ(%d), EINVAL(%d), %d\n", EILSEQ, EINVAL, errno); */ perror("Password conversion error"); iconv_close(condesc); return -1; } } iconv_close(condesc); return (max_length - ic_outbytesleft); #endif #endif }
287
True
1
CVE-2022-35928
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'name': 'https://github.com/paulej/AESCrypt/commit/68761851b595e96c68c3f46bfc21167e72c6a22c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'name': 'https://github.com/paulej/AESCrypt/security/advisories/GHSA-r7fv-72pg-fwrq', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-287'}]}]
nan
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:aescrypt:aes_crypt:3.11:*:*:*:*:linux:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'AES Crypt is a file encryption software for multiple platforms. AES Crypt for Linux built using the source on GitHub and having the version number 3.11 has a vulnerability with respect to reading user-provided passwords and confirmations via command-line prompts. Passwords lengths were not checked before being read. This vulnerability may lead to buffer overruns. This does _not_ affect source code found on aescrypt.com, nor is the vulnerability present when providing a password or a key via the `-p` or `-k` command-line options. The problem was fixed via in commit 68761851b and will be included in release 3.16. Users are advised to upgrade. Users unable to upgrade should us the `-p` or `-k` options to provide a password or key.'}]
2022-08-10T15:39Z
2022-08-03T20:15Z
Improper Authentication
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
0
Paul E. Jones
2022-08-01 17:35:25-04:00
Fixed security issue with passwords entered via a prompt
68761851b595e96c68c3f46bfc21167e72c6a22c
False
paulej/AESCrypt
File Encryption software for multiple platforms
2014-06-01 16:46:53
2022-08-04 00:24:17
paulej
203.0
69.0
read_password
read_password( unsigned char * buffer , encryptmode_t mode)
['buffer', 'mode']
int read_password(unsigned char* buffer, encryptmode_t mode) { #ifndef WIN32 #define PASS_EOF EOF struct termios t; /* Used to set ECHO attribute */ int echo_enabled; /* Was echo enabled? */ int tty; /* File descriptor for tty */ FILE* ftty; /* File for tty */ unsigned char pwd[MAX_PASSWD_BUF]; unsigned char pwd_confirm[MAX_PASSWD_BUF]; unsigned char* p; /* Password buffer pointer */ #else #define PASS_EOF L'\x003' FILE* ftty = stderr; /* File for tty */ wchar_t* pwd = (wchar_t *)buffer; wchar_t pwd_confirm[MAX_PASSWD_LEN+1]; wchar_t* p; /* Password buffer pointer */ #endif /* Used for password confirmation */ int c; /* Character read from input */ int chars_read; /* Chars read from input */ int i; /* Loop counter */ int match; /* Do the two passwords match? */ #ifndef WIN32 /* Open the tty */ ftty = fopen("/dev/tty", "r+"); if (ftty == NULL) { return AESCRYPT_READPWD_FOPEN; } tty = fileno(ftty); if (tty < 0) { return AESCRYPT_READPWD_FILENO; } /* Get the tty attrs */ if (tcgetattr(tty, &t) < 0) { fclose(ftty); return AESCRYPT_READPWD_TCGETATTR; } #endif /* * Round 1 - Read the password into buffer * (If encoding) Round 2 - read password 2 for confirmation */ for (i = 0; (i == 0) || (i == 1 && mode == ENC); i++) { /* Choose the buffer where to put the password */ if (!i) { p = pwd; } else { p = pwd_confirm; } /* Prompt for password */ if (i) { fprintf(ftty, "Re-"); } fprintf(ftty, "Enter password: "); fflush(ftty); #ifndef WIN32 /* Disable echo if necessary */ if (t.c_lflag & ECHO) { t.c_lflag &= ~ECHO; if (tcsetattr(tty, TCSANOW, &t) < 0) { /* For security reasons, erase the password */ memset_secure(pwd, 0, MAX_PASSWD_BUF); memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); fclose(ftty); return AESCRYPT_READPWD_TCSETATTR; } echo_enabled = 1; } else { echo_enabled = 0; } #endif /* Read from input and fill buffer till MAX_PASSWD_LEN chars are read */ chars_read = 0; #ifdef WIN32 while (((c = _getwch()) != L'\r') && (c != PASS_EOF)) #else while (((c = fgetc(ftty)) != '\n') && (c != PASS_EOF)) #endif { /* fill buffer till MAX_PASSWD_LEN */ if (chars_read <= MAX_PASSWD_LEN) { #ifdef WIN32 p[chars_read] = (wchar_t) c; #else p[chars_read] = (char) c; #endif } chars_read++; } if (chars_read <= MAX_PASSWD_LEN) { p[chars_read] = '\0'; } fprintf(ftty, "\n"); #ifndef WIN32 /* Enable echo if disabled above */ if (echo_enabled) { t.c_lflag |= ECHO; if (tcsetattr(tty, TCSANOW, &t) < 0) { /* For security reasons, erase the password */ memset_secure(pwd, 0, MAX_PASSWD_BUF); memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); fclose(ftty); return AESCRYPT_READPWD_TCSETATTR; } } #endif /* check for EOF error */ if (c == PASS_EOF) { /* For security reasons, erase the password */ memset_secure(pwd, 0, MAX_PASSWD_BUF); memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); if (ftty != stderr) fclose(ftty); return AESCRYPT_READPWD_FGETC; } /* * Check chars_read. The password must be maximum MAX_PASSWD_LEN * chars. If too long an error is returned */ if (chars_read > MAX_PASSWD_LEN) { /* For security reasons, erase the password */ memset_secure(pwd, 0, MAX_PASSWD_BUF); memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); if (ftty != stderr) fclose(ftty); return AESCRYPT_READPWD_TOOLONG; } } /* Close the tty */ if (ftty != stderr) fclose(ftty); /* Password must be compared only when encrypting */ if (mode == ENC) { /* Check if passwords match */ match = strcmp((char*)pwd, (char*)pwd_confirm); memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); if (match != 0) { /* For security reasons, erase the password */ memset_secure(pwd, 0, MAX_PASSWD_BUF); return AESCRYPT_READPWD_NOMATCH; } } #ifdef WIN32 chars_read *= 2; #else chars_read = passwd_to_utf16( pwd, chars_read, MAX_PASSWD_LEN, buffer); if (chars_read < 0) { memset_secure(pwd_confirm, 0, MAX_PASSWD_BUF); memset_secure(pwd, 0, MAX_PASSWD_BUF); return AESCRYPT_READPWD_ICONV; } #endif return chars_read; }
634
True
1