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-2020-12135 | 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://launchpadlibrarian.net/474887364/bson-fix-overflow.patch', 'name': 'https://launchpadlibrarian.net/474887364/bson-fix-overflow.patch', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560', 'name': 'https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577', 'name': 'https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4450-1/', 'name': 'USN-4450-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:whoopsie_project:whoopsie:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.2.69', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mongodb:c_driver:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'bson before 0.8 incorrectly uses int rather than size_t for many variables, parameters, and return values. In particular, the bson_ensure_space() parameter bytesNeeded could have an integer overflow via properly constructed bson input.'}] | 2020-08-12T17:15Z | 2020-04-24T01:15Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Jérôme Lebel | 2013-01-07 22:30:02+01:00 | don't mix up int and size_t (first pass to fix that) | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | False | 10gen-archive/mongo-c-driver-legacy | C Driver for MongoDB | 2009-10-06 03:54:36 | 2020-12-21 12:20:04 | http://www.mongodb.org/ | 10gen-archive | 294.0 | 184.0 | mongo_pass_digest | mongo_pass_digest( const char * user , const char * pass , char hex_digest [ 33 ]) | ['user', 'pass'] | static void mongo_pass_digest( const char *user, const char *pass, char hex_digest[33] ) {
mongo_md5_state_t st;
mongo_md5_byte_t digest[16];
mongo_md5_init( &st );
mongo_md5_append( &st, ( const mongo_md5_byte_t * )user, strlen( user ) );
mongo_md5_append( &st, ( const mongo_md5_byte_t * )":mongo:", 7 );
mongo_md5_append( &st, ( const mongo_md5_byte_t * )pass, strlen( pass ) );
mongo_md5_finish( &st, digest );
digest2hex( digest, hex_digest );
} | 101 | True | 1 |
CVE-2020-12135 | 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://launchpadlibrarian.net/474887364/bson-fix-overflow.patch', 'name': 'https://launchpadlibrarian.net/474887364/bson-fix-overflow.patch', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560', 'name': 'https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/1872560', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577', 'name': 'https://github.com/10gen-archive/mongo-c-driver-legacy/commit/1a1f5e26a4309480d88598913f9eebf9e9cba8ca#diff-f7d29a680148f52d6601f59ed787f577', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4450-1/', 'name': 'USN-4450-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:whoopsie_project:whoopsie:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.2.69', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mongodb:c_driver:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'bson before 0.8 incorrectly uses int rather than size_t for many variables, parameters, and return values. In particular, the bson_ensure_space() parameter bytesNeeded could have an integer overflow via properly constructed bson input.'}] | 2020-08-12T17:15Z | 2020-04-24T01:15Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Jérôme Lebel | 2013-01-07 22:30:02+01:00 | don't mix up int and size_t (first pass to fix that) | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | False | 10gen-archive/mongo-c-driver-legacy | C Driver for MongoDB | 2009-10-06 03:54:36 | 2020-12-21 12:20:04 | http://www.mongodb.org/ | 10gen-archive | 294.0 | 184.0 | mongo_run_command | mongo_run_command( mongo * conn , const char * db , const bson * command , bson * out) | ['conn', 'db', 'command', 'out'] | MONGO_EXPORT int mongo_run_command( mongo *conn, const char *db, const bson *command,
bson *out ) {
int ret = MONGO_OK;
bson response = {NULL, 0};
bson fields;
int sl = strlen( db );
char *ns = bson_malloc( sl + 5 + 1 ); /* ".$cmd" + nul */
int res, success = 0;
strcpy( ns, db );
strcpy( ns+sl, ".$cmd" );
res = mongo_find_one( conn, ns, command, bson_empty( &fields ), &response );
bson_free( ns );
if( res != MONGO_OK )
ret = MONGO_ERROR;
else {
bson_iterator it;
if( bson_find( &it, &response, "ok" ) )
success = bson_iterator_bool( &it );
if( !success ) {
conn->err = MONGO_COMMAND_FAILED;
bson_destroy( &response );
ret = MONGO_ERROR;
}
else {
if( out )
*out = response;
else
bson_destroy( &response );
}
}
return ret;
} | 190 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysContact_handler | sysContact_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysContact_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_string(varbind, oid, "Contiki-NG, https://github.com/contiki-ng/contiki-ng");
} | 21 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysDescr_handler | sysDescr_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysDescr_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_string(varbind, oid, CONTIKI_VERSION_STRING);
} | 21 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysLocation_handler | sysLocation_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysLocation_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_string(varbind, oid, "");
} | 21 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysName_handler | sysName_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysName_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_string(varbind, oid, "Contiki-NG - "CONTIKI_TARGET_STRING);
} | 22 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysObjectID_handler | sysObjectID_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysObjectID_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
OID(sysObjectID_oid, 1, 3, 6, 1, 4, 1, 54352);
snmp_api_set_oid(varbind, oid, sysObjectID_oid);
} | 40 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysServices_handler | sysServices_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysServices_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_time_ticks(varbind, oid, clock_seconds() * 100);
} | 25 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | sysUpTime_handler | sysUpTime_handler( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | sysUpTime_handler(snmp_varbind_t *varbind, uint32_t *oid)
{
snmp_api_set_time_ticks(varbind, oid, clock_seconds() * 100);
} | 25 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_api_replace_oid | snmp_api_replace_oid( snmp_varbind_t * varbind , uint32_t * oid) | ['varbind', 'oid'] | snmp_api_replace_oid(snmp_varbind_t *varbind, uint32_t *oid)
{
uint8_t i;
i = 0;
while(oid[i] != ((uint32_t)-1)) {
varbind->oid[i] = oid[i];
i++;
}
varbind->oid[i] = ((uint32_t)-1);
} | 66 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_api_set_oid | snmp_api_set_oid( snmp_varbind_t * varbind , uint32_t * oid , uint32_t * ret_oid) | ['varbind', 'oid', 'ret_oid'] | snmp_api_set_oid(snmp_varbind_t *varbind, uint32_t *oid, uint32_t *ret_oid)
{
snmp_api_replace_oid(varbind, oid);
varbind->value_type = BER_DATA_TYPE_OID;
varbind->value.oid = ret_oid;
} | 37 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_api_set_string | snmp_api_set_string( snmp_varbind_t * varbind , uint32_t * oid , char * string) | ['varbind', 'oid', 'string'] | snmp_api_set_string(snmp_varbind_t *varbind, uint32_t *oid, char *string)
{
snmp_api_replace_oid(varbind, oid);
varbind->value_type = BER_DATA_TYPE_OCTET_STRING;
varbind->value.string.string = string;
varbind->value.string.length = strlen(string);
} | 52 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_api_set_time_ticks | snmp_api_set_time_ticks( snmp_varbind_t * varbind , uint32_t * oid , uint32_t integer) | ['varbind', 'oid', 'integer'] | snmp_api_set_time_ticks(snmp_varbind_t *varbind, uint32_t *oid, uint32_t integer)
{
snmp_api_replace_oid(varbind, oid);
varbind->value_type = SNMP_DATA_TYPE_TIME_TICKS;
varbind->value.integer = integer;
} | 36 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_integer | snmp_ber_decode_integer( unsigned char * buf , uint32_t * buff_len , uint32_t * num) | ['buf', 'buff_len', 'num'] | snmp_ber_decode_integer(unsigned char *buf, uint32_t *buff_len, uint32_t *num)
{
uint8_t i, len, type;
buf = snmp_ber_decode_type(buf, buff_len, &type);
if(buf == NULL || type != BER_DATA_TYPE_INTEGER) {
/*
* Sanity check
* Invalid type in buffer
*/
return NULL;
}
buf = snmp_ber_decode_length(buf, buff_len, &len);
if(buf == NULL || len > 4) {
/*
* Sanity check
* It will not fit in the uint32_t
*/
return NULL;
}
if(*buff_len < len) {
return NULL;
}
*num = (uint32_t)(*buf++ & 0xFF);
(*buff_len)--;
for(i = 1; i < len; ++i) {
*num <<= 8;
*num |= (uint8_t)(*buf++ & 0xFF);
(*buff_len)--;
}
return buf;
} | 153 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_length | snmp_ber_decode_length( unsigned char * buff , uint32_t * buff_len , uint8_t * length) | ['buff', 'buff_len', 'length'] | snmp_ber_decode_length(unsigned char *buff, uint32_t *buff_len, uint8_t *length)
{
if(*buff_len == 0) {
return NULL;
}
*length = *buff++;
(*buff_len)--;
return buff;
} | 45 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_null | snmp_ber_decode_null( unsigned char * buf , uint32_t * buff_len) | ['buf', 'buff_len'] | snmp_ber_decode_null(unsigned char *buf, uint32_t *buff_len)
{
buf++;
(*buff_len)--;
buf++;
(*buff_len)--;
return buf;
} | 34 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_string_len_buffer | snmp_ber_decode_string_len_buffer( unsigned char * buf , uint32_t * buff_len , const char ** str , uint32_t * length) | ['buf', 'buff_len', 'str', 'length'] | snmp_ber_decode_string_len_buffer(unsigned char *buf, uint32_t *buff_len, const char **str, uint32_t *length)
{
uint8_t type, i, length_bytes;
buf = snmp_ber_decode_type(buf, buff_len, &type);
if(buf == NULL || type != BER_DATA_TYPE_OCTET_STRING) {
/*
* Sanity check
* Invalid type in buffer
*/
return NULL;
}
if((*buf & 0x80) == 0) {
*length = (uint32_t)*buf++;
(*buff_len)--;
} else {
length_bytes = (uint8_t)(*buf++ & 0x7F);
(*buff_len)--;
if(length_bytes > 4) {
/*
* Sanity check
* It will not fit in the uint32_t
*/
return NULL;
}
*length = (uint32_t)*buf++;
(*buff_len)--;
for(i = 1; i < length_bytes; ++i) {
*length <<= 8;
*length |= *buf++;
(*buff_len)--;
}
}
*str = (const char *)buf;
*buff_len -= *length;
return buf + *length;
} | 189 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_type | snmp_ber_decode_type( unsigned char * buff , uint32_t * buff_len , uint8_t * type) | ['buff', 'buff_len', 'type'] | snmp_ber_decode_type(unsigned char *buff, uint32_t *buff_len, uint8_t *type)
{
if(*buff_len == 0) {
return NULL;
}
*type = *buff++;
(*buff_len)--;
return buff;
} | 45 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_decode_unsigned_integer | snmp_ber_decode_unsigned_integer( unsigned char * buf , uint32_t * buff_len , uint8_t expected_type , uint32_t * num) | ['buf', 'buff_len', 'expected_type', 'num'] | snmp_ber_decode_unsigned_integer(unsigned char *buf, uint32_t *buff_len, uint8_t expected_type, uint32_t *num)
{
uint8_t i, len, type;
buf = snmp_ber_decode_type(buf, buff_len, &type);
if(buf == NULL || type != expected_type) {
/*
* Sanity check
* Invalid type in buffer
*/
return NULL;
}
buf = snmp_ber_decode_length(buf, buff_len, &len);
if(buf == NULL || len > 4) {
/*
* Sanity check
* It will not fit in the uint32_t
*/
return NULL;
}
if(*buff_len < len) {
return NULL;
}
*num = (uint32_t)(*buf++ & 0xFF);
(*buff_len)--;
for(i = 1; i < len; ++i) {
*num <<= 8;
*num |= (uint8_t)(*buf++ & 0xFF);
(*buff_len)--;
}
return buf;
} | 156 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_integer | snmp_ber_encode_integer( unsigned char * out , uint32_t * out_len , uint32_t number) | ['out', 'out_len', 'number'] | snmp_ber_encode_integer(unsigned char *out, uint32_t *out_len, uint32_t number)
{
uint32_t original_out_len;
original_out_len = *out_len;
do {
(*out_len)++;
*out-- = (uint8_t)(number & 0xFF);
number >>= 8;
} while(number);
out = snmp_ber_encode_length(out, out_len, ((*out_len - original_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, BER_DATA_TYPE_INTEGER);
return out;
} | 89 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_length | snmp_ber_encode_length( unsigned char * out , uint32_t * out_len , uint8_t length) | ['out', 'out_len', 'length'] | snmp_ber_encode_length(unsigned char *out, uint32_t *out_len, uint8_t length)
{
*out-- = length;
(*out_len)++;
return out;
} | 31 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_null | snmp_ber_encode_null( unsigned char * out , uint32_t * out_len , uint8_t type) | ['out', 'out_len', 'type'] | snmp_ber_encode_null(unsigned char *out, uint32_t *out_len, uint8_t type)
{
(*out_len)++;
*out-- = 0x00;
out = snmp_ber_encode_type(out, out_len, type);
return out;
} | 42 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_string_len | snmp_ber_encode_string_len( unsigned char * out , uint32_t * out_len , const char * str , uint32_t length) | ['out', 'out_len', 'str', 'length'] | snmp_ber_encode_string_len(unsigned char *out, uint32_t *out_len, const char *str, uint32_t length)
{
uint32_t i;
str += length - 1;
for(i = 0; i < length; ++i) {
(*out_len)++;
*out-- = (uint8_t)*str--;
}
out = snmp_ber_encode_length(out, out_len, length);
out = snmp_ber_encode_type(out, out_len, BER_DATA_TYPE_OCTET_STRING);
return out;
} | 87 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_type | snmp_ber_encode_type( unsigned char * out , uint32_t * out_len , uint8_t type) | ['out', 'out_len', 'type'] | snmp_ber_encode_type(unsigned char *out, uint32_t *out_len, uint8_t type)
{
*out-- = type;
(*out_len)++;
return out;
} | 31 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_ber_encode_unsigned_integer | snmp_ber_encode_unsigned_integer( unsigned char * out , uint32_t * out_len , uint8_t type , uint32_t number) | ['out', 'out_len', 'type', 'number'] | snmp_ber_encode_unsigned_integer(unsigned char *out, uint32_t *out_len, uint8_t type, uint32_t number)
{
uint32_t original_out_len;
original_out_len = *out_len;
do {
(*out_len)++;
*out-- = (uint8_t)(number & 0xFF);
number >>= 8;
} while(number);
out = snmp_ber_encode_length(out, out_len, ((*out_len - original_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, type);
return out;
} | 92 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_engine | snmp_engine( unsigned char * buff , uint32_t buff_len , unsigned char * out , uint32_t * out_len) | ['buff', 'buff_len', 'out', 'out_len'] | snmp_engine(unsigned char *buff, uint32_t buff_len, unsigned char *out, uint32_t *out_len)
{
static snmp_header_t header;
static snmp_varbind_t varbinds[SNMP_MAX_NR_VALUES];
static uint32_t varbind_length = SNMP_MAX_NR_VALUES;
buff = snmp_message_decode(buff, buff_len, &header, varbinds, &varbind_length);
if(buff == NULL) {
return NULL;
}
if(header.version != SNMP_VERSION_1) {
if(strncmp(header.community.community, SNMP_COMMUNITY, header.community.length)) {
LOG_ERR("Request with invalid community\n");
return NULL;
}
}
/*
* Now handle the SNMP requests depending on their type
*/
switch(header.pdu_type) {
case SNMP_DATA_TYPE_PDU_GET_REQUEST:
if(snmp_engine_get(&header, varbinds, varbind_length) == -1) {
return NULL;
}
break;
case SNMP_DATA_TYPE_PDU_GET_NEXT_REQUEST:
if(snmp_engine_get_next(&header, varbinds, varbind_length) == -1) {
return NULL;
}
break;
case SNMP_DATA_TYPE_PDU_GET_BULK:
if(snmp_engine_get_bulk(&header, varbinds, &varbind_length) == -1) {
return NULL;
}
break;
default:
LOG_ERR("Invalid request type");
return NULL;
}
header.pdu_type = SNMP_DATA_TYPE_PDU_GET_RESPONSE;
out = snmp_message_encode(out, out_len, &header, varbinds, varbind_length);
return ++out;
} | 225 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_engine_get | snmp_engine_get( snmp_header_t * header , snmp_varbind_t * varbinds , uint32_t varbinds_length) | ['header', 'varbinds', 'varbinds_length'] | snmp_engine_get(snmp_header_t *header, snmp_varbind_t *varbinds, uint32_t varbinds_length)
{
snmp_mib_resource_t *resource;
uint32_t i;
for(i = 0; i < varbinds_length; i++) {
resource = snmp_mib_find(varbinds[i].oid);
if(!resource) {
switch(header->version) {
case SNMP_VERSION_1:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
/*
* Varbinds are 1 indexed
*/
header->error_index_max_repetitions.error_index = i + 1;
break;
case SNMP_VERSION_2C:
(&varbinds[i])->value_type = SNMP_DATA_TYPE_NO_SUCH_INSTANCE;
break;
default:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
header->error_index_max_repetitions.error_index = 0;
}
} else {
resource->handler(&varbinds[i], resource->oid);
}
}
return 0;
} | 143 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_engine_get_bulk | snmp_engine_get_bulk( snmp_header_t * header , snmp_varbind_t * varbinds , uint32_t * varbinds_length) | ['header', 'varbinds', 'varbinds_length'] | snmp_engine_get_bulk(snmp_header_t *header, snmp_varbind_t *varbinds, uint32_t *varbinds_length)
{
snmp_mib_resource_t *resource;
uint32_t i, j, original_varbinds_length;
uint32_t oid[SNMP_MAX_NR_VALUES][SNMP_MSG_OID_MAX_LEN];
uint8_t repeater;
/*
* A local copy of the requested oids must be kept since
* the varbinds are modified on the fly
*/
original_varbinds_length = *varbinds_length;
for(i = 0; i < original_varbinds_length; i++) {
snmp_oid_copy(oid[i], varbinds[i].oid);
}
*varbinds_length = 0;
for(i = 0; i < original_varbinds_length; i++) {
if(i >= header->error_status_non_repeaters.non_repeaters) {
break;
}
resource = snmp_mib_find_next(oid[i]);
if(!resource) {
switch(header->version) {
case SNMP_VERSION_1:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
/*
* Varbinds are 1 indexed
*/
header->error_index_max_repetitions.error_index = i + 1;
break;
case SNMP_VERSION_2C:
(&varbinds[i])->value_type = SNMP_DATA_TYPE_END_OF_MIB_VIEW;
break;
default:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
header->error_index_max_repetitions.error_index = 0;
}
} else {
if(*varbinds_length < SNMP_MAX_NR_VALUES) {
resource->handler(&varbinds[*varbinds_length], resource->oid);
(*varbinds_length)++;
}
}
}
for(i = 0; i < header->error_index_max_repetitions.max_repetitions; i++) {
repeater = 0;
for(j = header->error_status_non_repeaters.non_repeaters; j < original_varbinds_length; j++) {
resource = snmp_mib_find_next(oid[j]);
if(!resource) {
switch(header->version) {
case SNMP_VERSION_1:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
/*
* Varbinds are 1 indexed
*/
header->error_index_max_repetitions.error_index = *varbinds_length + 1;
break;
case SNMP_VERSION_2C:
if(*varbinds_length < SNMP_MAX_NR_VALUES) {
(&varbinds[*varbinds_length])->value_type = SNMP_DATA_TYPE_END_OF_MIB_VIEW;
snmp_oid_copy((&varbinds[*varbinds_length])->oid, oid[j]);
(*varbinds_length)++;
}
break;
default:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
header->error_index_max_repetitions.error_index = 0;
}
} else {
if(*varbinds_length < SNMP_MAX_NR_VALUES) {
resource->handler(&varbinds[*varbinds_length], resource->oid);
(*varbinds_length)++;
snmp_oid_copy(oid[j], resource->oid);
repeater++;
}
}
}
if(repeater == 0) {
break;
}
}
return 0;
} | 448 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_engine_get_next | snmp_engine_get_next( snmp_header_t * header , snmp_varbind_t * varbinds , uint32_t varbinds_length) | ['header', 'varbinds', 'varbinds_length'] | snmp_engine_get_next(snmp_header_t *header, snmp_varbind_t *varbinds, uint32_t varbinds_length)
{
snmp_mib_resource_t *resource;
uint32_t i;
for(i = 0; i < varbinds_length; i++) {
resource = snmp_mib_find_next(varbinds[i].oid);
if(!resource) {
switch(header->version) {
case SNMP_VERSION_1:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
/*
* Varbinds are 1 indexed
*/
header->error_index_max_repetitions.error_index = i + 1;
break;
case SNMP_VERSION_2C:
(&varbinds[i])->value_type = SNMP_DATA_TYPE_END_OF_MIB_VIEW;
break;
default:
header->error_status_non_repeaters.error_status = SNMP_STATUS_NO_SUCH_NAME;
header->error_index_max_repetitions.error_index = 0;
}
} else {
resource->handler(&varbinds[i], resource->oid);
}
}
return 0;
} | 143 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_message_decode | snmp_message_decode( uint8_t * buf , uint32_t buf_len , snmp_header_t * header , snmp_varbind_t * varbinds , uint32_t * varbind_num) | ['buf', 'buf_len', 'header', 'varbinds', 'varbind_num'] | snmp_message_decode(uint8_t *buf, uint32_t buf_len, snmp_header_t *header,
snmp_varbind_t *varbinds, uint32_t *varbind_num)
{
uint8_t type, len;
uint32_t i, oid_len = SNMP_MSG_OID_MAX_LEN;
buf = snmp_ber_decode_type(buf, &buf_len, &type);
if(buf == NULL) {
LOG_DBG("Could not decode type\n");
return NULL;
}
if(type != BER_DATA_TYPE_SEQUENCE) {
LOG_DBG("Invalid type\n");
return NULL;
}
buf = snmp_ber_decode_length(buf, &buf_len, &len);
if(buf == NULL) {
LOG_DBG("Could not decode length\n");
return NULL;
}
buf = snmp_ber_decode_integer(buf, &buf_len, &header->version);
if(buf == NULL) {
LOG_DBG("Could not decode version\n");
return NULL;
}
buf = snmp_ber_decode_string_len_buffer(buf, &buf_len, &header->community.community, &header->community.length);
if(buf == NULL) {
LOG_DBG("Could not decode community\n");
return NULL;
}
if(header->version != SNMP_VERSION_1 &&
header->version != SNMP_VERSION_2C) {
LOG_DBG("Invalid version\n");
return NULL;
}
buf = snmp_ber_decode_type(buf, &buf_len, &type);
if(buf == NULL) {
LOG_DBG("Could not decode type\n");
return NULL;
}
header->pdu_type = type;
if(header->pdu_type != SNMP_DATA_TYPE_PDU_GET_REQUEST &&
header->pdu_type != SNMP_DATA_TYPE_PDU_GET_NEXT_REQUEST &&
header->pdu_type != SNMP_DATA_TYPE_PDU_GET_RESPONSE &&
header->pdu_type != SNMP_DATA_TYPE_PDU_SET_REQUEST &&
header->pdu_type != SNMP_DATA_TYPE_PDU_GET_BULK) {
LOG_DBG("Invalid pdu type\n");
return NULL;
}
buf = snmp_ber_decode_length(buf, &buf_len, &len);
if(buf == NULL) {
LOG_DBG("Could not decode length\n");
return NULL;
}
buf = snmp_ber_decode_integer(buf, &buf_len, &header->request_id);
if(buf == NULL) {
LOG_DBG("Could not decode request id\n");
return NULL;
}
if(header->pdu_type == SNMP_DATA_TYPE_PDU_GET_BULK) {
buf = snmp_ber_decode_integer(buf, &buf_len, &header->error_status_non_repeaters.non_repeaters);
if(buf == NULL) {
LOG_DBG("Could not decode error status\n");
return NULL;
}
buf = snmp_ber_decode_integer(buf, &buf_len, &header->error_index_max_repetitions.max_repetitions);
if(buf == NULL) {
LOG_DBG("Could not decode error index\n");
return NULL;
}
} else {
buf = snmp_ber_decode_integer(buf, &buf_len, &header->error_status_non_repeaters.error_status);
if(buf == NULL) {
LOG_DBG("Could not decode error status\n");
return NULL;
}
buf = snmp_ber_decode_integer(buf, &buf_len, &header->error_index_max_repetitions.error_index);
if(buf == NULL) {
LOG_DBG("Could not decode error index\n");
return NULL;
}
}
buf = snmp_ber_decode_type(buf, &buf_len, &type);
if(buf == NULL) {
LOG_DBG("Could not decode type\n");
return NULL;
}
if(type != BER_DATA_TYPE_SEQUENCE) {
LOG_DBG("Invalid type\n");
return NULL;
}
buf = snmp_ber_decode_length(buf, &buf_len, &len);
if(buf == NULL) {
LOG_DBG("Could not decode length\n");
return NULL;
}
for(i = 0; buf_len > 0; ++i) {
if(i >= *varbind_num) {
return NULL;
}
buf = snmp_ber_decode_type(buf, &buf_len, &type);
if(buf == NULL) {
LOG_DBG("Could not decode type\n");
return NULL;
}
if(type != BER_DATA_TYPE_SEQUENCE) {
LOG_DBG("Invalid (%X) type\n", type);
return NULL;
}
buf = snmp_ber_decode_length(buf, &buf_len, &len);
if(buf == NULL) {
LOG_DBG("Could not decode length\n");
return NULL;
}
buf = snmp_oid_decode_oid(buf, &buf_len, varbinds[i].oid, &oid_len);
if(buf == NULL) {
LOG_DBG("Could not decode oid\n");
return NULL;
}
varbinds[i].value_type = *buf;
switch(varbinds[i].value_type) {
case BER_DATA_TYPE_INTEGER:
buf = snmp_ber_decode_integer(buf, &buf_len, &varbinds[i].value.integer);
break;
case SNMP_DATA_TYPE_TIME_TICKS:
buf = snmp_ber_decode_unsigned_integer(buf, &buf_len, varbinds[i].value_type, &varbinds[i].value.integer);
break;
case BER_DATA_TYPE_OCTET_STRING:
buf = snmp_ber_decode_string_len_buffer(buf, &buf_len, &varbinds[i].value.string.string, &varbinds[i].value.string.length);
break;
case BER_DATA_TYPE_NULL:
buf = snmp_ber_decode_null(buf, &buf_len);
break;
default:
LOG_DBG("Invalid varbind type\n");
return NULL;
}
if(buf == NULL) {
LOG_DBG("Could varbind type\n");
return NULL;
}
}
*varbind_num = i;
return buf;
} | 865 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_message_encode | snmp_message_encode( unsigned char * out , uint32_t * out_len , snmp_header_t * header , snmp_varbind_t * varbinds , uint32_t varbind_num) | ['out', 'out_len', 'header', 'varbinds', 'varbind_num'] | snmp_message_encode(unsigned char *out, uint32_t *out_len, snmp_header_t *header,
snmp_varbind_t *varbinds, uint32_t varbind_num)
{
snmp_varbind_t *varbind;
uint32_t original_out_len, last_out_len;
int8_t i;
original_out_len = *out_len;
for(i = varbind_num - 1; i >= 0; i--) {
varbind = &varbinds[i];
last_out_len = *out_len;
switch(varbind->value_type) {
case BER_DATA_TYPE_INTEGER:
out = snmp_ber_encode_integer(out, out_len, varbind->value.integer);
break;
case SNMP_DATA_TYPE_TIME_TICKS:
out = snmp_ber_encode_unsigned_integer(out, out_len, varbind->value_type, varbind->value.integer);
break;
case BER_DATA_TYPE_OCTET_STRING:
out = snmp_ber_encode_string_len(out, out_len, varbind->value.string.string, varbind->value.string.length);
break;
case BER_DATA_TYPE_OID:
out = snmp_oid_encode_oid(out, out_len, varbind->value.oid);
break;
case BER_DATA_TYPE_NULL:
case SNMP_DATA_TYPE_NO_SUCH_INSTANCE:
case SNMP_DATA_TYPE_END_OF_MIB_VIEW:
out = snmp_ber_encode_null(out, out_len, varbind->value_type);
break;
default:
return NULL;
}
out = snmp_oid_encode_oid(out, out_len, varbind->oid);
out = snmp_ber_encode_length(out, out_len, ((*out_len - last_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, BER_DATA_TYPE_SEQUENCE);
}
out = snmp_ber_encode_length(out, out_len, ((*out_len - original_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, BER_DATA_TYPE_SEQUENCE);
if(header->pdu_type == SNMP_DATA_TYPE_PDU_GET_BULK) {
out = snmp_ber_encode_integer(out, out_len, header->error_index_max_repetitions.max_repetitions);
out = snmp_ber_encode_integer(out, out_len, header->error_status_non_repeaters.non_repeaters);
} else {
out = snmp_ber_encode_integer(out, out_len, header->error_index_max_repetitions.error_index);
out = snmp_ber_encode_integer(out, out_len, header->error_status_non_repeaters.error_status);
}
out = snmp_ber_encode_integer(out, out_len, header->request_id);
out = snmp_ber_encode_length(out, out_len, ((*out_len - original_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, header->pdu_type);
out = snmp_ber_encode_string_len(out, out_len, header->community.community, header->community.length);
out = snmp_ber_encode_integer(out, out_len, header->version);
out = snmp_ber_encode_length(out, out_len, ((*out_len - original_out_len) & 0xFF));
out = snmp_ber_encode_type(out, out_len, BER_DATA_TYPE_SEQUENCE);
return out;
} | 464 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_mib_add | snmp_mib_add( snmp_mib_resource_t * new_resource) | ['new_resource'] | snmp_mib_add(snmp_mib_resource_t *new_resource)
{
snmp_mib_resource_t *resource;
for(resource = list_head(snmp_mib);
resource; resource = resource->next) {
if(snmp_oid_cmp_oid(resource->oid, new_resource->oid) > 0) {
break;
}
}
if(resource == NULL) {
list_add(snmp_mib, new_resource);
} else {
list_insert(snmp_mib, new_resource, resource);
}
#if LOG_LEVEL == LOG_LEVEL_DBG
/*
* We print the entire resource table
*/
LOG_DBG("Table after insert.\n");
for(resource = list_head(snmp_mib);
resource; resource = resource->next) {
snmp_oid_print(resource->oid);
}
#endif /* LOG_LEVEL == LOG_LEVEL_DBG */
} | 108 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_mib_find | snmp_mib_find( uint32_t * oid) | ['oid'] | snmp_mib_find(uint32_t *oid)
{
snmp_mib_resource_t *resource;
resource = NULL;
for(resource = list_head(snmp_mib);
resource; resource = resource->next) {
if(!snmp_oid_cmp_oid(oid, resource->oid)) {
return resource;
}
}
return NULL;
} | 55 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_mib_find_next | snmp_mib_find_next( uint32_t * oid) | ['oid'] | snmp_mib_find_next(uint32_t *oid)
{
snmp_mib_resource_t *resource;
resource = NULL;
for(resource = list_head(snmp_mib);
resource; resource = resource->next) {
if(snmp_oid_cmp_oid(resource->oid, oid) > 0) {
return resource;
}
}
return NULL;
} | 56 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | PROCESS_THREAD | PROCESS_THREAD( snmp_process , ev , data) | ['snmp_process', 'ev', 'data'] | PROCESS_THREAD(snmp_process, ev, data)
{
PROCESS_BEGIN();
/* new connection with remote host */
snmp_udp_conn = udp_new(NULL, 0, NULL);
udp_bind(snmp_udp_conn, SNMP_SERVER_PORT);
LOG_DBG("Listening on port %u\n", uip_ntohs(snmp_udp_conn->lport));
while(1) {
PROCESS_YIELD();
if(ev == tcpip_event) {
if(uip_newdata()) {
snmp_process_data();
}
}
} /* while (1) */
PROCESS_END();
} | 78 | True | 1 |
CVE-2020-12141 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'name': 'https://github.com/contiki-ng/contiki-ng/pull/1355', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'name': 'https://github.com/contiki-ng/contiki-ng/commit/12c824386ab60de757de5001974d73b32e19ad71#diff-32367fad664c6118fd5dda77cdf38eedc006cdd7544eca5bbeebe0b99653f8a0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://twitter.com/ScepticCtf', 'name': 'https://twitter.com/ScepticCtf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An out-of-bounds read in the SNMP stack in Contiki-NG 4.4 and earlier allows an attacker to cause a denial of service and potentially disclose information via crafted SNMP packets to snmp_ber_decode_string_len_buffer in os/net/app-layer/snmp/snmp-ber.c.'}] | 2021-10-22T19:09Z | 2021-10-19T16: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 | Yagoor | 2020-09-08 21:09:31+02:00 | Refactored SNMP engine after vulnerabilities | 12c824386ab60de757de5001974d73b32e19ad71 | False | contiki-ng/contiki-ng | Contiki-NG: The OS for Next Generation IoT Devices | 2017-05-13 17:37:59 | 2022-08-27 12:20:58 | https://www.contiki-ng.org/ | contiki-ng | 945.0 | 585.0 | snmp_process_data | snmp_process_data( void) | ['void'] | snmp_process_data(void)
{
static unsigned char packet[SNMP_MAX_PACKET_SIZE];
unsigned char *packet_end;
static uint32_t packet_len;
packet_end = packet + sizeof(packet) - 1;
packet_len = 0;
LOG_DBG("receiving UDP datagram from [");
LOG_DBG_6ADDR(&UIP_IP_BUF->srcipaddr);
LOG_DBG_("]:%u", uip_ntohs(UIP_UDP_BUF->srcport));
LOG_DBG_(" Length: %u\n", uip_datalen());
/*
* Handle the request
*/
if((packet_end = snmp_engine(uip_appdata, uip_datalen(), packet_end, &packet_len)) == NULL) {
LOG_DBG("Error while handling the request\n");
} else {
LOG_DBG("Sending response\n");
/*
* Send the response
*/
uip_udp_packet_sendto(snmp_udp_conn, packet_end, packet_len, &UIP_IP_BUF->srcipaddr, UIP_UDP_BUF->srcport);
}
} | 127 | True | 1 |
CVE-2020-12607 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:N | NETWORK | LOW | NONE | PARTIAL | NONE | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | NONE | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/AntonKueltz/fastecdsa/commit/4a16daeaf139be20654ef58a9fe4c79dc030458c', 'name': 'https://github.com/AntonKueltz/fastecdsa/commit/4a16daeaf139be20654ef58a9fe4c79dc030458c', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/AntonKueltz/fastecdsa/commit/7b64e3efaa806b4daaf73bb5172af3581812f8de', 'name': 'https://github.com/AntonKueltz/fastecdsa/commit/7b64e3efaa806b4daaf73bb5172af3581812f8de', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/AntonKueltz/fastecdsa/issues/52', 'name': 'https://github.com/AntonKueltz/fastecdsa/issues/52', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/AntonKueltz/fastecdsa/commit/e592f106edd5acf6dacedfab2ad16fe6c735c9d1', 'name': 'https://github.com/AntonKueltz/fastecdsa/commit/e592f106edd5acf6dacedfab2ad16fe6c735c9d1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-347'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:fastecdsa_project:fastecdsa:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.1.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in fastecdsa before 2.1.2. When using the NIST P-256 curve in the ECDSA implementation, the point at infinity is mishandled. This means that for an extreme value in k and s^-1, the signature verification fails even if the signature is correct. This behavior is not solely a usability problem. There are some threat models where an attacker can benefit by successfully guessing users for whom signature verification will fail.'}] | 2020-06-03T13:47Z | 2020-06-02T21:15Z | Improper Verification of Cryptographic Signature | The software does not verify, or incorrectly verifies, the cryptographic signature for data. | https://cwe.mitre.org/data/definitions/347.html | 0 | AntonKueltz | 2020-04-14 02:15:41-07:00 | Properly handle the point at infinity | e592f106edd5acf6dacedfab2ad16fe6c735c9d1 | False | AntonKueltz/fastecdsa | Python library for fast elliptic curve crypto | 2016-03-24 19:28:53 | 2022-06-27 18:49:02 | https://pypi.python.org/pypi/fastecdsa | AntonKueltz | 215.0 | 61.0 | pointZZ_pAdd | pointZZ_pAdd( PointZZ_p * rop , const PointZZ_p * op1 , const PointZZ_p * op2 , const CurveZZ_p * curve) | ['rop', 'op1', 'op2', 'curve'] | void pointZZ_pAdd(PointZZ_p * rop, const PointZZ_p * op1, const PointZZ_p * op2, const CurveZZ_p * curve) {
mpz_t xdiff, ydiff, lambda;
mpz_inits(xdiff, ydiff, lambda, NULL);
// calculate lambda
mpz_sub(ydiff, op2->y, op1->y);
mpz_sub(xdiff, op2->x, op1->x);
mpz_invert(xdiff, xdiff, curve->p); // TODO check status
mpz_mul(lambda, ydiff, xdiff);
mpz_mod(lambda, lambda, curve->p);
// calculate resulting x coord
mpz_mul(rop->x, lambda, lambda);
mpz_sub(rop->x, rop->x, op1->x);
mpz_sub(rop->x, rop->x, op2->x);
mpz_mod(rop->x, rop->x, curve->p);
//calculate resulting y coord
mpz_sub(rop->y, op1->x, rop->x);
mpz_mul(rop->y, lambda, rop->y);
mpz_sub(rop->y, rop->y, op1->y);
mpz_mod(rop->y, rop->y, curve->p);
mpz_clears(xdiff, ydiff, lambda, NULL);
} | 223 | True | 1 |
|
CVE-2020-12887 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'name': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'name': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}, {'lang': 'en', 'value': 'CWE-401'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:arm:mbed-coap:5.1.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:o:arm:mbed_os:5.15.3:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.'}] | 2021-07-21T11:39Z | 2020-06-18T19:15Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Maciej Jurczak | 2020-05-11 22:46:09+02:00 | Implemented measures to prevent memory leaks in sn_coap_parser_options_parse().
Added a helper uint16_t addition function with overflow detection. The function is used when calculating the extended length and option delta. The overlow detection is needed to avoid wrap-around of option number or length.
Additional checks in options using sn_coap_parser_options_parse_multiple_options() have been implemented to avoid overwriting of pointers pointing to previously allocated memory. | 4647a68e364401e81dbd370728127d844f221d93 | False | mjurczak/mbed-coap | CoAP C library - Builder and Parser for CoAP messages | 2020-05-01 10:49:43 | 2020-06-18 04:38:47 | null | mjurczak | 0.0 | 0.0 | parse_ext_option | parse_ext_option( uint16_t * dst , uint8_t ** packet_data_pptr , uint8_t * packet_data_start_ptr , uint16_t packet_len , uint16_t * message_left) | ['dst', 'packet_data_pptr', 'packet_data_start_ptr', 'packet_len', 'message_left'] | static int8_t parse_ext_option(uint16_t *dst, uint8_t **packet_data_pptr, uint8_t *packet_data_start_ptr, uint16_t packet_len, uint16_t *message_left)
{
uint16_t option_number = *dst;
if (option_number == 13) {
uint8_t option_ext;
int8_t read_result = sn_coap_parser_read_packet_u8(&option_ext,
*packet_data_pptr,
packet_data_start_ptr,
packet_len);
if (read_result != 0) {
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
else {
option_number += option_ext;
*message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
1);
}
} else if (option_number == 14) {
int8_t read_result = sn_coap_parser_read_packet_u16(&option_number,
*packet_data_pptr,
packet_data_start_ptr,
packet_len);
if (read_result != 0) {
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
else {
option_number += 269;
*message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
2);
}
}
/* Option number 15 reserved for payload marker. This is handled as a error! */
else if (option_number == 15) {
tr_error("sn_coap_parser_options_parse - invalid option number(15)!");
return -1;
}
*dst = option_number;
return 0;
} | 183 | True | 1 |
CVE-2020-12887 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'name': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'name': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}, {'lang': 'en', 'value': 'CWE-401'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:arm:mbed-coap:5.1.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:o:arm:mbed_os:5.15.3:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.'}] | 2021-07-21T11:39Z | 2020-06-18T19:15Z | Missing Release of Memory after Effective Lifetime | The software does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. | This is often triggered by improper handling of malformed data or unexpectedly interrupted sessions. In some languages, developers are responsible for tracking memory allocation and releasing the memory. If there are no more pointers or references to the memory, then it can no longer be tracked and identified for release.
| https://cwe.mitre.org/data/definitions/401.html | 0 | Maciej Jurczak | 2020-05-11 22:46:09+02:00 | Implemented measures to prevent memory leaks in sn_coap_parser_options_parse().
Added a helper uint16_t addition function with overflow detection. The function is used when calculating the extended length and option delta. The overlow detection is needed to avoid wrap-around of option number or length.
Additional checks in options using sn_coap_parser_options_parse_multiple_options() have been implemented to avoid overwriting of pointers pointing to previously allocated memory. | 4647a68e364401e81dbd370728127d844f221d93 | False | mjurczak/mbed-coap | CoAP C library - Builder and Parser for CoAP messages | 2020-05-01 10:49:43 | 2020-06-18 04:38:47 | null | mjurczak | 0.0 | 0.0 | parse_ext_option | parse_ext_option( uint16_t * dst , uint8_t ** packet_data_pptr , uint8_t * packet_data_start_ptr , uint16_t packet_len , uint16_t * message_left) | ['dst', 'packet_data_pptr', 'packet_data_start_ptr', 'packet_len', 'message_left'] | static int8_t parse_ext_option(uint16_t *dst, uint8_t **packet_data_pptr, uint8_t *packet_data_start_ptr, uint16_t packet_len, uint16_t *message_left)
{
uint16_t option_number = *dst;
if (option_number == 13) {
uint8_t option_ext;
int8_t read_result = sn_coap_parser_read_packet_u8(&option_ext,
*packet_data_pptr,
packet_data_start_ptr,
packet_len);
if (read_result != 0) {
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
else {
option_number += option_ext;
*message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
1);
}
} else if (option_number == 14) {
int8_t read_result = sn_coap_parser_read_packet_u16(&option_number,
*packet_data_pptr,
packet_data_start_ptr,
packet_len);
if (read_result != 0) {
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
else {
option_number += 269;
*message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
2);
}
}
/* Option number 15 reserved for payload marker. This is handled as a error! */
else if (option_number == 15) {
tr_error("sn_coap_parser_options_parse - invalid option number(15)!");
return -1;
}
*dst = option_number;
return 0;
} | 183 | True | 1 |
CVE-2020-12887 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'name': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'name': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}, {'lang': 'en', 'value': 'CWE-401'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:arm:mbed-coap:5.1.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:o:arm:mbed_os:5.15.3:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.'}] | 2021-07-21T11:39Z | 2020-06-18T19:15Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Maciej Jurczak | 2020-05-11 22:46:09+02:00 | Implemented measures to prevent memory leaks in sn_coap_parser_options_parse().
Added a helper uint16_t addition function with overflow detection. The function is used when calculating the extended length and option delta. The overlow detection is needed to avoid wrap-around of option number or length.
Additional checks in options using sn_coap_parser_options_parse_multiple_options() have been implemented to avoid overwriting of pointers pointing to previously allocated memory. | 4647a68e364401e81dbd370728127d844f221d93 | False | mjurczak/mbed-coap | CoAP C library - Builder and Parser for CoAP messages | 2020-05-01 10:49:43 | 2020-06-18 04:38:47 | null | mjurczak | 0.0 | 0.0 | sn_coap_parser_options_parse | sn_coap_parser_options_parse( struct coap_s * handle , uint8_t ** packet_data_pptr , sn_coap_hdr_s * dst_coap_msg_ptr , uint8_t * packet_data_start_ptr , uint16_t packet_len) | ['handle', 'packet_data_pptr', 'dst_coap_msg_ptr', 'packet_data_start_ptr', 'packet_len'] | static int8_t sn_coap_parser_options_parse(struct coap_s *handle, uint8_t **packet_data_pptr, sn_coap_hdr_s *dst_coap_msg_ptr, uint8_t *packet_data_start_ptr, uint16_t packet_len)
{
uint8_t previous_option_number = 0;
int8_t ret_status = 0;
uint16_t message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
0);
/* Parse token, if exists */
dst_coap_msg_ptr->token_len = *packet_data_start_ptr & COAP_HEADER_TOKEN_LENGTH_MASK;
if (dst_coap_msg_ptr->token_len) {
int8_t ptr_check_result;
if ((dst_coap_msg_ptr->token_len > 8) || dst_coap_msg_ptr->token_ptr) {
tr_error("sn_coap_parser_options_parse - token not valid!");
return -1;
}
ptr_check_result = sn_coap_parser_check_packet_ptr(*packet_data_pptr, packet_data_start_ptr, packet_len, dst_coap_msg_ptr->token_len);
if (0 != ptr_check_result) {
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
dst_coap_msg_ptr->token_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, dst_coap_msg_ptr->token_len);
if (dst_coap_msg_ptr->token_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - failed to allocate token!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
dst_coap_msg_ptr->token_len);
}
/* Loop all Options */
while (message_left && (**packet_data_pptr != 0xff)) {
/* Get option length WITHOUT extensions */
uint16_t option_len = (**packet_data_pptr & 0x0F);
/* Get option number WITHOUT extensions */
uint16_t option_number = (**packet_data_pptr >> COAP_OPTIONS_OPTION_NUMBER_SHIFT);
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, 1);
int8_t option_parse_result;
/* Add possible option delta extension */
option_parse_result = parse_ext_option(&option_number,
packet_data_pptr,
packet_data_start_ptr,
packet_len,
&message_left);
if (option_parse_result != 0) {
return -1;
}
/* Add previous option to option delta and get option number */
option_number += previous_option_number;
/* Add possible option length extension to resolve full length of the option */
option_parse_result = parse_ext_option(&option_len,
packet_data_pptr,
packet_data_start_ptr,
packet_len,
&message_left);
if (option_parse_result != 0) {
return -1;
}
/* * * Parse option itself * * */
/* Some options are handled independently in own functions */
previous_option_number = option_number;
/* Allocate options_list_ptr if needed */
switch (option_number) {
case COAP_OPTION_MAX_AGE:
case COAP_OPTION_PROXY_URI:
case COAP_OPTION_ETAG:
case COAP_OPTION_URI_HOST:
case COAP_OPTION_LOCATION_PATH:
case COAP_OPTION_URI_PORT:
case COAP_OPTION_LOCATION_QUERY:
case COAP_OPTION_OBSERVE:
case COAP_OPTION_URI_QUERY:
case COAP_OPTION_BLOCK2:
case COAP_OPTION_BLOCK1:
case COAP_OPTION_ACCEPT:
case COAP_OPTION_SIZE1:
case COAP_OPTION_SIZE2:
if (sn_coap_parser_alloc_options(handle, dst_coap_msg_ptr) == NULL) {
tr_error("sn_coap_parser_options_parse - failed to allocate options!");
return -1;
}
break;
}
if (message_left < option_len){
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr would overflow when parsing options!");
return -1;
}
/* Parse option */
switch (option_number) {
case COAP_OPTION_CONTENT_FORMAT:
if ((option_len > 2) || (dst_coap_msg_ptr->content_format != COAP_CT_NONE)) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_CONTENT_FORMAT not valid!");
return -1;
}
dst_coap_msg_ptr->content_format = (sn_coap_content_format_e) sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_MAX_AGE:
if (option_len > 4) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_MAX_AGE not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->max_age = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_PROXY_URI:
if ((option_len > 1034) || (option_len < 1) || dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_PROXY_URI not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->proxy_uri_len = option_len;
dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, option_len);
if (dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_PROXY_URI allocation failed!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, option_len);
break;
case COAP_OPTION_ETAG:
/* This is managed independently because User gives this option in one character table */
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr,
message_left,
&dst_coap_msg_ptr->options_list_ptr->etag_ptr,
(uint16_t *)&dst_coap_msg_ptr->options_list_ptr->etag_len,
COAP_OPTION_ETAG, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_ETAG not valid!");
return -1;
}
break;
case COAP_OPTION_URI_HOST:
if ((option_len > 255) || (option_len < 1) || dst_coap_msg_ptr->options_list_ptr->uri_host_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_HOST not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->uri_host_len = option_len;
dst_coap_msg_ptr->options_list_ptr->uri_host_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, option_len);
if (dst_coap_msg_ptr->options_list_ptr->uri_host_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_HOST allocation failed!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, option_len);
break;
case COAP_OPTION_LOCATION_PATH:
if (dst_coap_msg_ptr->options_list_ptr->location_path_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_PATH exists!");
return -1;
}
/* This is managed independently because User gives this option in one character table */
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->location_path_ptr, &dst_coap_msg_ptr->options_list_ptr->location_path_len,
COAP_OPTION_LOCATION_PATH, option_len);
if (ret_status <0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_PATH not valid!");
return -1;
}
break;
case COAP_OPTION_URI_PORT:
if ((option_len > 2) || dst_coap_msg_ptr->options_list_ptr->uri_port != COAP_OPTION_URI_PORT_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_PORT not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->uri_port = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_LOCATION_QUERY:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->location_query_ptr, &dst_coap_msg_ptr->options_list_ptr->location_query_len,
COAP_OPTION_LOCATION_QUERY, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_QUERY not valid!");
return -1;
}
break;
case COAP_OPTION_URI_PATH:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->uri_path_ptr, &dst_coap_msg_ptr->uri_path_len,
COAP_OPTION_URI_PATH, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_PATH not valid!");
return -1;
}
break;
case COAP_OPTION_OBSERVE:
if ((option_len > 2) || dst_coap_msg_ptr->options_list_ptr->observe != COAP_OBSERVE_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_OBSERVE not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->observe = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_URI_QUERY:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->uri_query_ptr, &dst_coap_msg_ptr->options_list_ptr->uri_query_len,
COAP_OPTION_URI_QUERY, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_QUERY not valid!");
return -1;
}
break;
case COAP_OPTION_BLOCK2:
if ((option_len > 3) || dst_coap_msg_ptr->options_list_ptr->block2 != COAP_OPTION_BLOCK_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_BLOCK2 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->block2 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_BLOCK1:
if ((option_len > 3) || dst_coap_msg_ptr->options_list_ptr->block1 != COAP_OPTION_BLOCK_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_BLOCK1 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->block1 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_ACCEPT:
if ((option_len > 2) || (dst_coap_msg_ptr->options_list_ptr->accept != COAP_CT_NONE)) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_ACCEPT not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->accept = (sn_coap_content_format_e) sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_SIZE1:
if ((option_len > 4) || dst_coap_msg_ptr->options_list_ptr->use_size1) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_SIZE1 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->use_size1 = true;
dst_coap_msg_ptr->options_list_ptr->size1 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_SIZE2:
if ((option_len > 4) || dst_coap_msg_ptr->options_list_ptr->use_size2) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_SIZE2 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->use_size2 = true;
dst_coap_msg_ptr->options_list_ptr->size2 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
default:
tr_error("sn_coap_parser_options_parse - unknown option!");
return -1;
}
/* Check for overflow */
if ((*packet_data_pptr - packet_data_start_ptr) > packet_len) {
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
0);
}
return 0;
} | 1306 | True | 1 |
CVE-2020-12887 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12957', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'name': 'https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'name': 'https://github.com/ARMmbed/mbed-os/issues/12930', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'name': 'https://github.com/ARMmbed/mbed-coap/pull/116', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}, {'lang': 'en', 'value': 'CWE-401'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:arm:mbed-coap:5.1.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:o:arm:mbed_os:5.15.3:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.'}] | 2021-07-21T11:39Z | 2020-06-18T19:15Z | Missing Release of Memory after Effective Lifetime | The software does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. | This is often triggered by improper handling of malformed data or unexpectedly interrupted sessions. In some languages, developers are responsible for tracking memory allocation and releasing the memory. If there are no more pointers or references to the memory, then it can no longer be tracked and identified for release.
| https://cwe.mitre.org/data/definitions/401.html | 0 | Maciej Jurczak | 2020-05-11 22:46:09+02:00 | Implemented measures to prevent memory leaks in sn_coap_parser_options_parse().
Added a helper uint16_t addition function with overflow detection. The function is used when calculating the extended length and option delta. The overlow detection is needed to avoid wrap-around of option number or length.
Additional checks in options using sn_coap_parser_options_parse_multiple_options() have been implemented to avoid overwriting of pointers pointing to previously allocated memory. | 4647a68e364401e81dbd370728127d844f221d93 | False | mjurczak/mbed-coap | CoAP C library - Builder and Parser for CoAP messages | 2020-05-01 10:49:43 | 2020-06-18 04:38:47 | null | mjurczak | 0.0 | 0.0 | sn_coap_parser_options_parse | sn_coap_parser_options_parse( struct coap_s * handle , uint8_t ** packet_data_pptr , sn_coap_hdr_s * dst_coap_msg_ptr , uint8_t * packet_data_start_ptr , uint16_t packet_len) | ['handle', 'packet_data_pptr', 'dst_coap_msg_ptr', 'packet_data_start_ptr', 'packet_len'] | static int8_t sn_coap_parser_options_parse(struct coap_s *handle, uint8_t **packet_data_pptr, sn_coap_hdr_s *dst_coap_msg_ptr, uint8_t *packet_data_start_ptr, uint16_t packet_len)
{
uint8_t previous_option_number = 0;
int8_t ret_status = 0;
uint16_t message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
0);
/* Parse token, if exists */
dst_coap_msg_ptr->token_len = *packet_data_start_ptr & COAP_HEADER_TOKEN_LENGTH_MASK;
if (dst_coap_msg_ptr->token_len) {
int8_t ptr_check_result;
if ((dst_coap_msg_ptr->token_len > 8) || dst_coap_msg_ptr->token_ptr) {
tr_error("sn_coap_parser_options_parse - token not valid!");
return -1;
}
ptr_check_result = sn_coap_parser_check_packet_ptr(*packet_data_pptr, packet_data_start_ptr, packet_len, dst_coap_msg_ptr->token_len);
if (0 != ptr_check_result) {
tr_error("sn_coap_parser_options_parse - **packet_data_pptr overflow !");
return -1;
}
dst_coap_msg_ptr->token_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, dst_coap_msg_ptr->token_len);
if (dst_coap_msg_ptr->token_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - failed to allocate token!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
dst_coap_msg_ptr->token_len);
}
/* Loop all Options */
while (message_left && (**packet_data_pptr != 0xff)) {
/* Get option length WITHOUT extensions */
uint16_t option_len = (**packet_data_pptr & 0x0F);
/* Get option number WITHOUT extensions */
uint16_t option_number = (**packet_data_pptr >> COAP_OPTIONS_OPTION_NUMBER_SHIFT);
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, 1);
int8_t option_parse_result;
/* Add possible option delta extension */
option_parse_result = parse_ext_option(&option_number,
packet_data_pptr,
packet_data_start_ptr,
packet_len,
&message_left);
if (option_parse_result != 0) {
return -1;
}
/* Add previous option to option delta and get option number */
option_number += previous_option_number;
/* Add possible option length extension to resolve full length of the option */
option_parse_result = parse_ext_option(&option_len,
packet_data_pptr,
packet_data_start_ptr,
packet_len,
&message_left);
if (option_parse_result != 0) {
return -1;
}
/* * * Parse option itself * * */
/* Some options are handled independently in own functions */
previous_option_number = option_number;
/* Allocate options_list_ptr if needed */
switch (option_number) {
case COAP_OPTION_MAX_AGE:
case COAP_OPTION_PROXY_URI:
case COAP_OPTION_ETAG:
case COAP_OPTION_URI_HOST:
case COAP_OPTION_LOCATION_PATH:
case COAP_OPTION_URI_PORT:
case COAP_OPTION_LOCATION_QUERY:
case COAP_OPTION_OBSERVE:
case COAP_OPTION_URI_QUERY:
case COAP_OPTION_BLOCK2:
case COAP_OPTION_BLOCK1:
case COAP_OPTION_ACCEPT:
case COAP_OPTION_SIZE1:
case COAP_OPTION_SIZE2:
if (sn_coap_parser_alloc_options(handle, dst_coap_msg_ptr) == NULL) {
tr_error("sn_coap_parser_options_parse - failed to allocate options!");
return -1;
}
break;
}
if (message_left < option_len){
/* packet_data_pptr would overflow! */
tr_error("sn_coap_parser_options_parse - **packet_data_pptr would overflow when parsing options!");
return -1;
}
/* Parse option */
switch (option_number) {
case COAP_OPTION_CONTENT_FORMAT:
if ((option_len > 2) || (dst_coap_msg_ptr->content_format != COAP_CT_NONE)) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_CONTENT_FORMAT not valid!");
return -1;
}
dst_coap_msg_ptr->content_format = (sn_coap_content_format_e) sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_MAX_AGE:
if (option_len > 4) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_MAX_AGE not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->max_age = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_PROXY_URI:
if ((option_len > 1034) || (option_len < 1) || dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_PROXY_URI not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->proxy_uri_len = option_len;
dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, option_len);
if (dst_coap_msg_ptr->options_list_ptr->proxy_uri_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_PROXY_URI allocation failed!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, option_len);
break;
case COAP_OPTION_ETAG:
/* This is managed independently because User gives this option in one character table */
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr,
message_left,
&dst_coap_msg_ptr->options_list_ptr->etag_ptr,
(uint16_t *)&dst_coap_msg_ptr->options_list_ptr->etag_len,
COAP_OPTION_ETAG, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_ETAG not valid!");
return -1;
}
break;
case COAP_OPTION_URI_HOST:
if ((option_len > 255) || (option_len < 1) || dst_coap_msg_ptr->options_list_ptr->uri_host_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_HOST not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->uri_host_len = option_len;
dst_coap_msg_ptr->options_list_ptr->uri_host_ptr = sn_coap_protocol_malloc_copy(handle, *packet_data_pptr, option_len);
if (dst_coap_msg_ptr->options_list_ptr->uri_host_ptr == NULL) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_HOST allocation failed!");
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, packet_data_start_ptr, packet_len, option_len);
break;
case COAP_OPTION_LOCATION_PATH:
if (dst_coap_msg_ptr->options_list_ptr->location_path_ptr) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_PATH exists!");
return -1;
}
/* This is managed independently because User gives this option in one character table */
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->location_path_ptr, &dst_coap_msg_ptr->options_list_ptr->location_path_len,
COAP_OPTION_LOCATION_PATH, option_len);
if (ret_status <0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_PATH not valid!");
return -1;
}
break;
case COAP_OPTION_URI_PORT:
if ((option_len > 2) || dst_coap_msg_ptr->options_list_ptr->uri_port != COAP_OPTION_URI_PORT_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_PORT not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->uri_port = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_LOCATION_QUERY:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->location_query_ptr, &dst_coap_msg_ptr->options_list_ptr->location_query_len,
COAP_OPTION_LOCATION_QUERY, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_LOCATION_QUERY not valid!");
return -1;
}
break;
case COAP_OPTION_URI_PATH:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->uri_path_ptr, &dst_coap_msg_ptr->uri_path_len,
COAP_OPTION_URI_PATH, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_PATH not valid!");
return -1;
}
break;
case COAP_OPTION_OBSERVE:
if ((option_len > 2) || dst_coap_msg_ptr->options_list_ptr->observe != COAP_OBSERVE_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_OBSERVE not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->observe = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_URI_QUERY:
ret_status = sn_coap_parser_options_parse_multiple_options(handle, packet_data_pptr, message_left,
&dst_coap_msg_ptr->options_list_ptr->uri_query_ptr, &dst_coap_msg_ptr->options_list_ptr->uri_query_len,
COAP_OPTION_URI_QUERY, option_len);
if (ret_status < 0) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_URI_QUERY not valid!");
return -1;
}
break;
case COAP_OPTION_BLOCK2:
if ((option_len > 3) || dst_coap_msg_ptr->options_list_ptr->block2 != COAP_OPTION_BLOCK_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_BLOCK2 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->block2 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_BLOCK1:
if ((option_len > 3) || dst_coap_msg_ptr->options_list_ptr->block1 != COAP_OPTION_BLOCK_NONE) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_BLOCK1 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->block1 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_ACCEPT:
if ((option_len > 2) || (dst_coap_msg_ptr->options_list_ptr->accept != COAP_CT_NONE)) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_ACCEPT not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->accept = (sn_coap_content_format_e) sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_SIZE1:
if ((option_len > 4) || dst_coap_msg_ptr->options_list_ptr->use_size1) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_SIZE1 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->use_size1 = true;
dst_coap_msg_ptr->options_list_ptr->size1 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
case COAP_OPTION_SIZE2:
if ((option_len > 4) || dst_coap_msg_ptr->options_list_ptr->use_size2) {
tr_error("sn_coap_parser_options_parse - COAP_OPTION_SIZE2 not valid!");
return -1;
}
dst_coap_msg_ptr->options_list_ptr->use_size2 = true;
dst_coap_msg_ptr->options_list_ptr->size2 = sn_coap_parser_options_parse_uint(packet_data_pptr, option_len);
break;
default:
tr_error("sn_coap_parser_options_parse - unknown option!");
return -1;
}
/* Check for overflow */
if ((*packet_data_pptr - packet_data_start_ptr) > packet_len) {
return -1;
}
message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr,
packet_data_start_ptr,
packet_len,
0);
}
return 0;
} | 1306 | True | 1 |
CVE-2020-13111 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://sourceforge.net/p/naviserver/bugs/89/', 'name': 'https://sourceforge.net/p/naviserver/bugs/89/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'name': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}, {'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:naviserver_project:naviserver:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.99.4', 'versionEndIncluding': '4.99.19', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NaviServer 4.99.4 to 4.99.19 allows denial of service due to the nsd/driver.c ChunkedDecode function not properly validating the length of a chunk. A remote attacker can craft a chunked-transfer request that will result in a negative value being passed to memmove via the size parameter, causing the process to crash.'}] | 2021-07-21T11:39Z | 2020-05-16T15:15Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Gustaf Neumann | 2020-05-16 13:34:36+02:00 | fix for bug https://sourceforge.net/p/naviserver/bugs/89/
A negative value provided as chunk encoding length led to a potential crash.
A test case for this case was added to the regression test. | a5c3079f1d8996d5f34c9384a440acf3519ca3bb | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | naviserver | visit repo url | visit repo url | ChunkedDecode | ChunkedDecode( Request * reqPtr , bool update) | ['reqPtr', 'update'] | ChunkedDecode(Request *reqPtr, bool update)
{
const Tcl_DString *bufPtr;
const char *end, *chunkStart;
bool success = NS_TRUE;
NS_NONNULL_ASSERT(reqPtr != NULL);
bufPtr = &reqPtr->buffer;
end = bufPtr->string + bufPtr->length;
chunkStart = bufPtr->string + reqPtr->chunkStartOff;
while (reqPtr->chunkStartOff < (size_t)bufPtr->length) {
char *p = strstr(chunkStart, "\r\n");
size_t chunk_length;
if (p == NULL) {
Ns_Log(DriverDebug, "ChunkedDecode: chunk did not find end-of-line");
success = NS_FALSE;
break;
}
*p = '\0';
chunk_length = (size_t)strtol(chunkStart, NULL, 16);
*p = '\r';
if (p + 2 + chunk_length > end) {
Ns_Log(DriverDebug, "ChunkedDecode: chunk length past end of buffer");
success = NS_FALSE;
break;
}
if (update) {
char *writeBuffer = bufPtr->string + reqPtr->chunkWriteOff;
memmove(writeBuffer, p + 2, chunk_length);
reqPtr->chunkWriteOff += chunk_length;
*(writeBuffer + chunk_length) = '\0';
}
reqPtr->chunkStartOff += (size_t)(p - chunkStart) + 4u + chunk_length;
chunkStart = bufPtr->string + reqPtr->chunkStartOff;
}
return success;
} | 236 | True | 1 |
CVE-2020-13111 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://sourceforge.net/p/naviserver/bugs/89/', 'name': 'https://sourceforge.net/p/naviserver/bugs/89/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'name': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}, {'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:naviserver_project:naviserver:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.99.4', 'versionEndIncluding': '4.99.19', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NaviServer 4.99.4 to 4.99.19 allows denial of service due to the nsd/driver.c ChunkedDecode function not properly validating the length of a chunk. A remote attacker can craft a chunked-transfer request that will result in a negative value being passed to memmove via the size parameter, causing the process to crash.'}] | 2021-07-21T11:39Z | 2020-05-16T15:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Gustaf Neumann | 2020-05-16 13:34:36+02:00 | fix for bug https://sourceforge.net/p/naviserver/bugs/89/
A negative value provided as chunk encoding length led to a potential crash.
A test case for this case was added to the regression test. | a5c3079f1d8996d5f34c9384a440acf3519ca3bb | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | naviserver | visit repo url | visit repo url | ChunkedDecode | ChunkedDecode( Request * reqPtr , bool update) | ['reqPtr', 'update'] | ChunkedDecode(Request *reqPtr, bool update)
{
const Tcl_DString *bufPtr;
const char *end, *chunkStart;
bool success = NS_TRUE;
NS_NONNULL_ASSERT(reqPtr != NULL);
bufPtr = &reqPtr->buffer;
end = bufPtr->string + bufPtr->length;
chunkStart = bufPtr->string + reqPtr->chunkStartOff;
while (reqPtr->chunkStartOff < (size_t)bufPtr->length) {
char *p = strstr(chunkStart, "\r\n");
size_t chunk_length;
if (p == NULL) {
Ns_Log(DriverDebug, "ChunkedDecode: chunk did not find end-of-line");
success = NS_FALSE;
break;
}
*p = '\0';
chunk_length = (size_t)strtol(chunkStart, NULL, 16);
*p = '\r';
if (p + 2 + chunk_length > end) {
Ns_Log(DriverDebug, "ChunkedDecode: chunk length past end of buffer");
success = NS_FALSE;
break;
}
if (update) {
char *writeBuffer = bufPtr->string + reqPtr->chunkWriteOff;
memmove(writeBuffer, p + 2, chunk_length);
reqPtr->chunkWriteOff += chunk_length;
*(writeBuffer + chunk_length) = '\0';
}
reqPtr->chunkStartOff += (size_t)(p - chunkStart) + 4u + chunk_length;
chunkStart = bufPtr->string + reqPtr->chunkStartOff;
}
return success;
} | 236 | True | 1 |
CVE-2020-13111 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://sourceforge.net/p/naviserver/bugs/89/', 'name': 'https://sourceforge.net/p/naviserver/bugs/89/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'name': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}, {'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:naviserver_project:naviserver:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.99.4', 'versionEndIncluding': '4.99.19', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NaviServer 4.99.4 to 4.99.19 allows denial of service due to the nsd/driver.c ChunkedDecode function not properly validating the length of a chunk. A remote attacker can craft a chunked-transfer request that will result in a negative value being passed to memmove via the size parameter, causing the process to crash.'}] | 2021-07-21T11:39Z | 2020-05-16T15:15Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Gustaf Neumann | 2020-05-16 13:34:36+02:00 | fix for bug https://sourceforge.net/p/naviserver/bugs/89/
A negative value provided as chunk encoding length led to a potential crash.
A test case for this case was added to the regression test. | a5c3079f1d8996d5f34c9384a440acf3519ca3bb | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | naviserver | visit repo url | visit repo url | SockParse | SockParse( Sock * sockPtr) | ['sockPtr'] | SockParse(Sock *sockPtr)
{
const Tcl_DString *bufPtr;
const Driver *drvPtr;
Request *reqPtr;
char save;
SockState result;
NS_NONNULL_ASSERT(sockPtr != NULL);
drvPtr = sockPtr->drvPtr;
NsUpdateProgress((Ns_Sock *) sockPtr);
reqPtr = sockPtr->reqPtr;
bufPtr = &reqPtr->buffer;
/*
* Scan lines (header) until start of content (body-part)
*/
while (reqPtr->coff == 0u) {
char *s, *e;
size_t cnt;
/*
* Find the next header line.
*/
s = bufPtr->string + reqPtr->roff;
e = memchr(s, INTCHAR('\n'), reqPtr->avail);
if (unlikely(e == NULL)) {
/*
* Input not yet newline terminated - request more data.
*/
return SOCK_MORE;
}
/*
* Check for max single line overflows.
*
* Previous versions if the driver returned here directly an
* error code, which was handled via HTTP error message
* provided via SockError(). However, the SockError() handling
* closes the connection immediately. This has the
* consequence, that the HTTP client might never see the error
* message, since the request was not yet fully transmitted,
* but it will see a "broken pipe: 13" message instead. We
* read now the full request and return the message via
* ConnRunRequest().
*/
if (unlikely((e - s) > drvPtr->maxline)) {
sockPtr->keep = NS_FALSE;
if (reqPtr->request.line == NULL) {
Ns_Log(DriverDebug, "SockParse: maxline reached of %d bytes",
drvPtr->maxline);
sockPtr->flags = NS_CONN_REQUESTURITOOLONG;
Ns_Log(Warning, "request line is too long (%d bytes)", (int)(e - s));
} else {
sockPtr->flags = NS_CONN_LINETOOLONG;
Ns_Log(Warning, "request header line is too long (%d bytes)", (int)(e - s));
}
}
/*
* Update next read pointer to end of this line.
*/
cnt = (size_t)(e - s) + 1u;
reqPtr->roff += cnt;
reqPtr->avail -= cnt;
/*
* Adjust end pointer to the last content character before the line
* terminator.
*/
if (likely(e > s) && likely(*(e-1) == '\r')) {
--e;
}
/*
* Check for end of headers in case we have not done it yet.
*/
if (unlikely(e == s) && (reqPtr->coff == 0u)) {
/*
* We are at end of headers.
*/
reqPtr->coff = EndOfHeader(sockPtr);
/*
* In cases the client sent "expect: 100-continue", report back that
* everything is fine with the headers.
*/
if ((sockPtr->flags & NS_CONN_CONTINUE) != 0u) {
Ns_Log(Ns_LogRequestDebug, "honoring 100-continue");
/*
* In case, the request entity (body) was too large, we can
* return immediately the error message, when the client has
* flagged this via "Expect:". Otherwise we have to read the
* full request (although it is too large) to drain the
* channel. Otherwise, the server might close the connection
* *before* it has received full request with its body from
* the client. We just keep the flag and let
* Ns_ConnRunRequest() handle the error message.
*/
if ((sockPtr->flags & NS_CONN_ENTITYTOOLARGE) != 0u) {
Ns_Log(Ns_LogRequestDebug, "100-continue: entity too large");
return SOCK_ENTITYTOOLARGE;
/*
* We have no other error message flagged (future ones
* have to be handled here).
*/
} else {
struct iovec iov[1];
ssize_t sent;
/*
* Reply with "100 continue".
*/
Ns_Log(Ns_LogRequestDebug, "100-continue: reply CONTINUE");
iov[0].iov_base = (char *)"HTTP/1.1 100 Continue\r\n\r\n";
iov[0].iov_len = strlen(iov[0].iov_base);
sent = Ns_SockSendBufs((Ns_Sock *)sockPtr, iov, 1,
NULL, 0u);
if (sent != (ssize_t)iov[0].iov_len) {
Ns_Log(Warning, "could not deliver response: 100 Continue");
/*
* Should we bail out here?
*/
}
}
}
} else {
/*
* We have the request-line or a header line to process.
*/
save = *e;
*e = '\0';
if (unlikely(reqPtr->request.line == NULL)) {
/*
* There is no request-line set. The received line must the
* the request-line.
*/
Ns_Log(DriverDebug, "SockParse (%d): parse request line <%s>", sockPtr->sock, s);
if (Ns_ParseRequest(&reqPtr->request, s) == NS_ERROR) {
/*
* Invalid request.
*/
return SOCK_BADREQUEST;
}
/*
* HTTP 0.9 did not have a HTTP-version number or request headers
* and no empty line terminating the request header.
*/
if (unlikely(reqPtr->request.version < 1.0)) {
/*
* Pre-HTTP/1.0 request.
*/
reqPtr->coff = reqPtr->roff;
Ns_Log(Notice, "pre-HTTP/1.0 request <%s>", reqPtr->request.line);
}
} else if (Ns_ParseHeader(reqPtr->headers, s, Preserve) != NS_OK) {
/*
* Invalid header.
*/
return SOCK_BADHEADER;
} else {
/*
* Check for max number of headers
*/
if (unlikely(Ns_SetSize(reqPtr->headers) > (size_t)drvPtr->maxheaders)) {
Ns_Log(DriverDebug, "SockParse (%d): maxheaders reached of %d bytes",
sockPtr->sock, drvPtr->maxheaders);
return SOCK_TOOMANYHEADERS;
}
}
*e = save;
}
}
if (unlikely(reqPtr->request.line == NULL)) {
/*
* We are at end of headers, but we have not parsed a request line
* (maybe just two linefeeds).
*/
return SOCK_BADREQUEST;
}
/*
* We are in the request body.
*/
assert(reqPtr->coff > 0u);
assert(reqPtr->request.line != NULL);
/*
* Check if all content has arrived.
*/
Ns_Log(Dev, "=== length < avail (length %" PRIuz
", avail %" PRIuz ") tfd %d tfile %p chunkStartOff %" PRIuz,
reqPtr->length, reqPtr->avail, sockPtr->tfd,
(void *)sockPtr->tfile, reqPtr->chunkStartOff);
if (reqPtr->chunkStartOff != 0u) {
/*
* Chunked encoding was provided.
*/
bool complete;
size_t currentContentLength;
complete = ChunkedDecode(reqPtr, NS_TRUE);
currentContentLength = reqPtr->chunkWriteOff - reqPtr->coff;
/*
* A chunk might be complete, but it might not be the last
* chunk from the client. The best thing would be to be able
* to read until EOF here. In cases, where the (optional)
* "expectedLength" was provided by the client, we terminate
* depending on that information
*/
if ((!complete)
|| (reqPtr->expectedLength != 0u && currentContentLength < reqPtr->expectedLength)) {
/*
* ChunkedDecode wants more data.
*/
return SOCK_MORE;
}
/*
* ChunkedDecode has enough data.
*/
reqPtr->length = (size_t)currentContentLength;
}
if (reqPtr->avail < reqPtr->length) {
Ns_Log(DriverDebug, "SockRead wait for more input");
/*
* Wait for more input.
*/
return SOCK_MORE;
}
Ns_Log(Dev, "=== all required data is available (avail %" PRIuz", length %" PRIuz ", "
"readahead %" TCL_LL_MODIFIER "d maxupload %" TCL_LL_MODIFIER "d) tfd %d",
reqPtr->avail, reqPtr->length, drvPtr->readahead, drvPtr->maxupload,
sockPtr->tfd);
/*
* We have all required data in the receive buffer or in a temporary file.
*
* - Uploads > "readahead": these are put into temporary files.
*
* - Uploads > "maxupload": these are put into temporary files
* without mmapping, no content parsing will be performed in memory.
*/
result = SOCK_READY;
if (sockPtr->tfile != NULL) {
reqPtr->content = NULL;
reqPtr->next = NULL;
reqPtr->avail = 0u;
Ns_Log(DriverDebug, "content spooled to file: size %" PRIdz ", file %s",
reqPtr->length, sockPtr->tfile);
/*
* Nothing more to do, return via SOCK_READY;
*/
} else {
/*
* Uploads < "maxupload" are spooled to files and mmapped in order to
* provide the usual interface via [ns_conn content].
*/
if (sockPtr->tfd > 0) {
#ifdef _WIN32
/*
* For _WIN32, tfd should never be set, since tfd-spooling is not
* implemented for windows.
*/
assert(0);
#else
int prot = PROT_READ | PROT_WRITE;
/*
* Add a byte to make sure, the string termination with \0 below falls
* always into the mmapped area. On some older OSes this might lead to
* crashes when we hitting page boundaries.
*/
ssize_t rc = ns_write(sockPtr->tfd, "\0", 1);
if (rc == -1) {
Ns_Log(Error, "socket: could not append terminating 0-byte");
}
sockPtr->tsize = reqPtr->length + 1;
sockPtr->taddr = mmap(0, sockPtr->tsize, prot, MAP_PRIVATE,
sockPtr->tfd, 0);
if (sockPtr->taddr == MAP_FAILED) {
sockPtr->taddr = NULL;
result = SOCK_ERROR;
} else {
reqPtr->content = sockPtr->taddr;
Ns_Log(Debug, "content spooled to mmapped file: readahead=%"
TCL_LL_MODIFIER "d, filesize=%" PRIdz,
drvPtr->readahead, sockPtr->tsize);
}
#endif
} else {
/*
* Set the content the begin of the remaining buffer (content offset).
* This happens as well when reqPtr->contentLength is 0, but it is
* needed for chunked input processing.
*/
reqPtr->content = bufPtr->string + reqPtr->coff;
}
reqPtr->next = reqPtr->content;
/*
* Add a terminating null character. The content might be from the receive
* buffer (Tcl_DString) or from the mmapped file. Non-mmapped files are handled
* above.
*/
if (reqPtr->length > 0u) {
Ns_Log(DriverDebug, "SockRead adds null terminating character at content[%" PRIuz "]", reqPtr->length);
reqPtr->savedChar = reqPtr->content[reqPtr->length];
reqPtr->content[reqPtr->length] = '\0';
if (sockPtr->taddr == NULL) {
LogBuffer(DriverDebug, "UPDATED BUFFER", sockPtr->reqPtr->buffer.string, (size_t)reqPtr->buffer.length);
}
}
}
return result;
} | 1093 | True | 1 |
CVE-2020-13111 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://sourceforge.net/p/naviserver/bugs/89/', 'name': 'https://sourceforge.net/p/naviserver/bugs/89/', 'refsource': 'MISC', 'tags': ['Permissions Required', 'Third Party Advisory']}, {'url': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'name': 'https://bitbucket.org/naviserver/naviserver/commits/a5c3079f1d8996d5f34c9384a440acf3519ca3bb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}, {'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:naviserver_project:naviserver:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.99.4', 'versionEndIncluding': '4.99.19', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NaviServer 4.99.4 to 4.99.19 allows denial of service due to the nsd/driver.c ChunkedDecode function not properly validating the length of a chunk. A remote attacker can craft a chunked-transfer request that will result in a negative value being passed to memmove via the size parameter, causing the process to crash.'}] | 2021-07-21T11:39Z | 2020-05-16T15:15Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Gustaf Neumann | 2020-05-16 13:34:36+02:00 | fix for bug https://sourceforge.net/p/naviserver/bugs/89/
A negative value provided as chunk encoding length led to a potential crash.
A test case for this case was added to the regression test. | a5c3079f1d8996d5f34c9384a440acf3519ca3bb | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | naviserver | visit repo url | visit repo url | SockParse | SockParse( Sock * sockPtr) | ['sockPtr'] | SockParse(Sock *sockPtr)
{
const Tcl_DString *bufPtr;
const Driver *drvPtr;
Request *reqPtr;
char save;
SockState result;
NS_NONNULL_ASSERT(sockPtr != NULL);
drvPtr = sockPtr->drvPtr;
NsUpdateProgress((Ns_Sock *) sockPtr);
reqPtr = sockPtr->reqPtr;
bufPtr = &reqPtr->buffer;
/*
* Scan lines (header) until start of content (body-part)
*/
while (reqPtr->coff == 0u) {
char *s, *e;
size_t cnt;
/*
* Find the next header line.
*/
s = bufPtr->string + reqPtr->roff;
e = memchr(s, INTCHAR('\n'), reqPtr->avail);
if (unlikely(e == NULL)) {
/*
* Input not yet newline terminated - request more data.
*/
return SOCK_MORE;
}
/*
* Check for max single line overflows.
*
* Previous versions if the driver returned here directly an
* error code, which was handled via HTTP error message
* provided via SockError(). However, the SockError() handling
* closes the connection immediately. This has the
* consequence, that the HTTP client might never see the error
* message, since the request was not yet fully transmitted,
* but it will see a "broken pipe: 13" message instead. We
* read now the full request and return the message via
* ConnRunRequest().
*/
if (unlikely((e - s) > drvPtr->maxline)) {
sockPtr->keep = NS_FALSE;
if (reqPtr->request.line == NULL) {
Ns_Log(DriverDebug, "SockParse: maxline reached of %d bytes",
drvPtr->maxline);
sockPtr->flags = NS_CONN_REQUESTURITOOLONG;
Ns_Log(Warning, "request line is too long (%d bytes)", (int)(e - s));
} else {
sockPtr->flags = NS_CONN_LINETOOLONG;
Ns_Log(Warning, "request header line is too long (%d bytes)", (int)(e - s));
}
}
/*
* Update next read pointer to end of this line.
*/
cnt = (size_t)(e - s) + 1u;
reqPtr->roff += cnt;
reqPtr->avail -= cnt;
/*
* Adjust end pointer to the last content character before the line
* terminator.
*/
if (likely(e > s) && likely(*(e-1) == '\r')) {
--e;
}
/*
* Check for end of headers in case we have not done it yet.
*/
if (unlikely(e == s) && (reqPtr->coff == 0u)) {
/*
* We are at end of headers.
*/
reqPtr->coff = EndOfHeader(sockPtr);
/*
* In cases the client sent "expect: 100-continue", report back that
* everything is fine with the headers.
*/
if ((sockPtr->flags & NS_CONN_CONTINUE) != 0u) {
Ns_Log(Ns_LogRequestDebug, "honoring 100-continue");
/*
* In case, the request entity (body) was too large, we can
* return immediately the error message, when the client has
* flagged this via "Expect:". Otherwise we have to read the
* full request (although it is too large) to drain the
* channel. Otherwise, the server might close the connection
* *before* it has received full request with its body from
* the client. We just keep the flag and let
* Ns_ConnRunRequest() handle the error message.
*/
if ((sockPtr->flags & NS_CONN_ENTITYTOOLARGE) != 0u) {
Ns_Log(Ns_LogRequestDebug, "100-continue: entity too large");
return SOCK_ENTITYTOOLARGE;
/*
* We have no other error message flagged (future ones
* have to be handled here).
*/
} else {
struct iovec iov[1];
ssize_t sent;
/*
* Reply with "100 continue".
*/
Ns_Log(Ns_LogRequestDebug, "100-continue: reply CONTINUE");
iov[0].iov_base = (char *)"HTTP/1.1 100 Continue\r\n\r\n";
iov[0].iov_len = strlen(iov[0].iov_base);
sent = Ns_SockSendBufs((Ns_Sock *)sockPtr, iov, 1,
NULL, 0u);
if (sent != (ssize_t)iov[0].iov_len) {
Ns_Log(Warning, "could not deliver response: 100 Continue");
/*
* Should we bail out here?
*/
}
}
}
} else {
/*
* We have the request-line or a header line to process.
*/
save = *e;
*e = '\0';
if (unlikely(reqPtr->request.line == NULL)) {
/*
* There is no request-line set. The received line must the
* the request-line.
*/
Ns_Log(DriverDebug, "SockParse (%d): parse request line <%s>", sockPtr->sock, s);
if (Ns_ParseRequest(&reqPtr->request, s) == NS_ERROR) {
/*
* Invalid request.
*/
return SOCK_BADREQUEST;
}
/*
* HTTP 0.9 did not have a HTTP-version number or request headers
* and no empty line terminating the request header.
*/
if (unlikely(reqPtr->request.version < 1.0)) {
/*
* Pre-HTTP/1.0 request.
*/
reqPtr->coff = reqPtr->roff;
Ns_Log(Notice, "pre-HTTP/1.0 request <%s>", reqPtr->request.line);
}
} else if (Ns_ParseHeader(reqPtr->headers, s, Preserve) != NS_OK) {
/*
* Invalid header.
*/
return SOCK_BADHEADER;
} else {
/*
* Check for max number of headers
*/
if (unlikely(Ns_SetSize(reqPtr->headers) > (size_t)drvPtr->maxheaders)) {
Ns_Log(DriverDebug, "SockParse (%d): maxheaders reached of %d bytes",
sockPtr->sock, drvPtr->maxheaders);
return SOCK_TOOMANYHEADERS;
}
}
*e = save;
}
}
if (unlikely(reqPtr->request.line == NULL)) {
/*
* We are at end of headers, but we have not parsed a request line
* (maybe just two linefeeds).
*/
return SOCK_BADREQUEST;
}
/*
* We are in the request body.
*/
assert(reqPtr->coff > 0u);
assert(reqPtr->request.line != NULL);
/*
* Check if all content has arrived.
*/
Ns_Log(Dev, "=== length < avail (length %" PRIuz
", avail %" PRIuz ") tfd %d tfile %p chunkStartOff %" PRIuz,
reqPtr->length, reqPtr->avail, sockPtr->tfd,
(void *)sockPtr->tfile, reqPtr->chunkStartOff);
if (reqPtr->chunkStartOff != 0u) {
/*
* Chunked encoding was provided.
*/
bool complete;
size_t currentContentLength;
complete = ChunkedDecode(reqPtr, NS_TRUE);
currentContentLength = reqPtr->chunkWriteOff - reqPtr->coff;
/*
* A chunk might be complete, but it might not be the last
* chunk from the client. The best thing would be to be able
* to read until EOF here. In cases, where the (optional)
* "expectedLength" was provided by the client, we terminate
* depending on that information
*/
if ((!complete)
|| (reqPtr->expectedLength != 0u && currentContentLength < reqPtr->expectedLength)) {
/*
* ChunkedDecode wants more data.
*/
return SOCK_MORE;
}
/*
* ChunkedDecode has enough data.
*/
reqPtr->length = (size_t)currentContentLength;
}
if (reqPtr->avail < reqPtr->length) {
Ns_Log(DriverDebug, "SockRead wait for more input");
/*
* Wait for more input.
*/
return SOCK_MORE;
}
Ns_Log(Dev, "=== all required data is available (avail %" PRIuz", length %" PRIuz ", "
"readahead %" TCL_LL_MODIFIER "d maxupload %" TCL_LL_MODIFIER "d) tfd %d",
reqPtr->avail, reqPtr->length, drvPtr->readahead, drvPtr->maxupload,
sockPtr->tfd);
/*
* We have all required data in the receive buffer or in a temporary file.
*
* - Uploads > "readahead": these are put into temporary files.
*
* - Uploads > "maxupload": these are put into temporary files
* without mmapping, no content parsing will be performed in memory.
*/
result = SOCK_READY;
if (sockPtr->tfile != NULL) {
reqPtr->content = NULL;
reqPtr->next = NULL;
reqPtr->avail = 0u;
Ns_Log(DriverDebug, "content spooled to file: size %" PRIdz ", file %s",
reqPtr->length, sockPtr->tfile);
/*
* Nothing more to do, return via SOCK_READY;
*/
} else {
/*
* Uploads < "maxupload" are spooled to files and mmapped in order to
* provide the usual interface via [ns_conn content].
*/
if (sockPtr->tfd > 0) {
#ifdef _WIN32
/*
* For _WIN32, tfd should never be set, since tfd-spooling is not
* implemented for windows.
*/
assert(0);
#else
int prot = PROT_READ | PROT_WRITE;
/*
* Add a byte to make sure, the string termination with \0 below falls
* always into the mmapped area. On some older OSes this might lead to
* crashes when we hitting page boundaries.
*/
ssize_t rc = ns_write(sockPtr->tfd, "\0", 1);
if (rc == -1) {
Ns_Log(Error, "socket: could not append terminating 0-byte");
}
sockPtr->tsize = reqPtr->length + 1;
sockPtr->taddr = mmap(0, sockPtr->tsize, prot, MAP_PRIVATE,
sockPtr->tfd, 0);
if (sockPtr->taddr == MAP_FAILED) {
sockPtr->taddr = NULL;
result = SOCK_ERROR;
} else {
reqPtr->content = sockPtr->taddr;
Ns_Log(Debug, "content spooled to mmapped file: readahead=%"
TCL_LL_MODIFIER "d, filesize=%" PRIdz,
drvPtr->readahead, sockPtr->tsize);
}
#endif
} else {
/*
* Set the content the begin of the remaining buffer (content offset).
* This happens as well when reqPtr->contentLength is 0, but it is
* needed for chunked input processing.
*/
reqPtr->content = bufPtr->string + reqPtr->coff;
}
reqPtr->next = reqPtr->content;
/*
* Add a terminating null character. The content might be from the receive
* buffer (Tcl_DString) or from the mmapped file. Non-mmapped files are handled
* above.
*/
if (reqPtr->length > 0u) {
Ns_Log(DriverDebug, "SockRead adds null terminating character at content[%" PRIuz "]", reqPtr->length);
reqPtr->savedChar = reqPtr->content[reqPtr->length];
reqPtr->content[reqPtr->length] = '\0';
if (sockPtr->taddr == NULL) {
LogBuffer(DriverDebug, "UPDATED BUFFER", sockPtr->reqPtr->buffer.string, (size_t)reqPtr->buffer.length);
}
}
}
return result;
} | 1093 | True | 1 |
CVE-2020-13249 | 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:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 8.8 | HIGH | 2.8 | 5.9 | False | [{'url': 'https://github.com/mariadb-corporation/mariadb-connector-c/commit/2759b87d72926b7c9b5426437a7c8dd15ff57945', 'name': 'https://github.com/mariadb-corporation/mariadb-connector-c/commit/2759b87d72926b7c9b5426437a7c8dd15ff57945', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/mariadb-corporation/mariadb-connector-c/compare/v3.1.7...v3.1.8', 'name': 'https://github.com/mariadb-corporation/mariadb-connector-c/compare/v3.1.7...v3.1.8', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00064.html', 'name': 'openSUSE-SU-2020:0738', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/UW2ED32VEUHXFN2J3YQE27JIBV4SC2PI/', 'name': 'FEDORA-2020-35f52d9370', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00054.html', 'name': 'openSUSE-SU-2020:0870', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/X4X2BMF3EILMTXGOZDTPYS3KT5VWLA2P/', 'name': 'FEDORA-2020-ac2d47d89a', 'refsource': 'FEDORA', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mariadb:connector\\/c:*:*:*:*:*:*:*:*', 'versionEndExcluding': '3.1.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'libmariadb/mariadb_lib.c in MariaDB Connector/C before 3.1.8 does not properly validate the content of an OK packet received from a server. NOTE: although mariadb_lib.c was originally based on code shipped for MySQL, this issue does not affect any MySQL components supported by Oracle.'}] | 2020-11-11T03:15Z | 2020-05-20T19:15Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Sergei Golubchik | 2020-05-07 14:57:00+02:00 | sanity checks for client-supplied OK packet content
reported by Matthias Kaiser, Apple Information Security | 2759b87d72926b7c9b5426437a7c8dd15ff57945 | False | mariadb-corporation/mariadb-connector-c | MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases.The client library is LGPL licensed. | 2015-01-30 12:43:31 | 2022-08-25 14:21:40 | null | mariadb-corporation | 226.0 | 219.0 | ma_read_ok_packet | ma_read_ok_packet( MYSQL * mysql , uchar * pos , ulong length) | ['mysql', 'pos', 'length'] | int ma_read_ok_packet(MYSQL *mysql, uchar *pos, ulong length)
{
size_t item_len;
mysql->affected_rows= net_field_length_ll(&pos);
mysql->insert_id= net_field_length_ll(&pos);
mysql->server_status=uint2korr(pos);
pos+=2;
mysql->warning_count=uint2korr(pos);
pos+=2;
if (pos < mysql->net.read_pos+length)
{
if ((item_len= net_field_length(&pos)))
mysql->info=(char*) pos;
/* check if server supports session tracking */
if (mysql->server_capabilities & CLIENT_SESSION_TRACKING)
{
ma_clear_session_state(mysql);
pos+= item_len;
if (mysql->server_status & SERVER_SESSION_STATE_CHANGED)
{
int i;
if (pos < mysql->net.read_pos + length)
{
LIST *session_item;
MYSQL_LEX_STRING *str= NULL;
enum enum_session_state_type si_type;
uchar *old_pos= pos;
size_t item_len= net_field_length(&pos); /* length for all items */
/* length was already set, so make sure that info will be zero terminated */
if (mysql->info)
*old_pos= 0;
while (item_len > 0)
{
size_t plen;
char *data;
old_pos= pos;
si_type= (enum enum_session_state_type)net_field_length(&pos);
switch(si_type) {
case SESSION_TRACK_SCHEMA:
case SESSION_TRACK_STATE_CHANGE:
case SESSION_TRACK_TRANSACTION_CHARACTERISTICS:
case SESSION_TRACK_SYSTEM_VARIABLES:
if (si_type != SESSION_TRACK_STATE_CHANGE)
net_field_length(&pos); /* ignore total length, item length will follow next */
plen= net_field_length(&pos);
if (!(session_item= ma_multi_malloc(0,
&session_item, sizeof(LIST),
&str, sizeof(MYSQL_LEX_STRING),
&data, plen,
NULL)))
{
ma_clear_session_state(mysql);
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return -1;
}
str->length= plen;
str->str= data;
memcpy(str->str, (char *)pos, plen);
pos+= plen;
session_item->data= str;
mysql->extension->session_state[si_type].list= list_add(mysql->extension->session_state[si_type].list, session_item);
/* in case schema has changed, we have to update mysql->db */
if (si_type == SESSION_TRACK_SCHEMA)
{
free(mysql->db);
mysql->db= malloc(plen + 1);
memcpy(mysql->db, str->str, plen);
mysql->db[plen]= 0;
}
else if (si_type == SESSION_TRACK_SYSTEM_VARIABLES)
{
my_bool set_charset= 0;
/* make sure that we update charset in case it has changed */
if (!strncmp(str->str, "character_set_client", str->length))
set_charset= 1;
plen= net_field_length(&pos);
if (!(session_item= ma_multi_malloc(0,
&session_item, sizeof(LIST),
&str, sizeof(MYSQL_LEX_STRING),
&data, plen,
NULL)))
{
ma_clear_session_state(mysql);
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return -1;
}
str->length= plen;
str->str= data;
memcpy(str->str, (char *)pos, plen);
pos+= plen;
session_item->data= str;
mysql->extension->session_state[si_type].list= list_add(mysql->extension->session_state[si_type].list, session_item);
if (set_charset &&
strncmp(mysql->charset->csname, str->str, str->length) != 0)
{
char cs_name[64];
MARIADB_CHARSET_INFO *cs_info;
memcpy(cs_name, str->str, str->length);
cs_name[str->length]= 0;
if ((cs_info = (MARIADB_CHARSET_INFO *)mysql_find_charset_name(cs_name)))
mysql->charset= cs_info;
}
}
break;
default:
/* not supported yet */
plen= net_field_length(&pos);
pos+= plen;
break;
}
item_len-= (pos - old_pos);
}
}
for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++)
{
mysql->extension->session_state[i].list= list_reverse(mysql->extension->session_state[i].list);
mysql->extension->session_state[i].current= mysql->extension->session_state[i].list;
}
}
}
}
/* CONC-351: clear session state information */
else if (mysql->server_capabilities & CLIENT_SESSION_TRACKING)
ma_clear_session_state(mysql);
return(0);
} | 772 | True | 1 |
CVE-2020-13848 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/pupnp/pupnp/commit/c805c1de1141cb22f74c0d94dd5664bda37398e0', 'name': 'https://github.com/pupnp/pupnp/commit/c805c1de1141cb22f74c0d94dd5664bda37398e0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pupnp/pupnp/issues/177', 'name': 'https://github.com/pupnp/pupnp/issues/177', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/06/msg00006.html', 'name': '[debian-lts-announce] 20200608 [SECURITY] [DLA 2238-1] libupnp security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00030.html', 'name': 'openSUSE-SU-2020:0821', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00033.html', 'name': 'openSUSE-SU-2020:0805', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2021/03/msg00007.html', 'name': '[debian-lts-announce] 20210307 [SECURITY] [DLA 2585-1] libupnp security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libupnp_project:libupnp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Portable UPnP SDK (aka libupnp) 1.12.1 and earlier allows remote attackers to cause a denial of service (crash) via a crafted SSDP message due to a NULL pointer dereference in the functions FindServiceControlURLPath and FindServiceEventURLPath in genlib/service_table/service_table.c.'}] | 2021-03-08T01:15Z | 2020-06-04T20:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Marcelo Roberto Jimenez | 2020-06-04 12:03:03-03:00 | Fixes #177: NULL pointer dereference in FindServiceControlURLPath
Also fixes its dual bug in FindServiceEventURLPath. | c805c1de1141cb22f74c0d94dd5664bda37398e0 | False | pupnp/pupnp | libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems. | 2010-08-23 03:03:20 | 2022-08-04 22:46:00 | https://pupnp.github.io/pupnp | pupnp | 262.0 | 99.0 | FindServiceControlURLPath | FindServiceControlURLPath( service_table * table , const char * controlURLPath) | ['table', 'controlURLPath'] | service_info *FindServiceControlURLPath(
service_table *table, const char *controlURLPath)
{
service_info *finger = NULL;
uri_type parsed_url;
uri_type parsed_url_in;
if (table && parse_uri(controlURLPath,
strlen(controlURLPath),
&parsed_url_in) == HTTP_SUCCESS) {
finger = table->serviceList;
while (finger) {
if (finger->controlURL) {
if (parse_uri(finger->controlURL,
strlen(finger->controlURL),
&parsed_url) == HTTP_SUCCESS) {
if (!token_cmp(&parsed_url.pathquery,
&parsed_url_in.pathquery)) {
return finger;
}
}
}
finger = finger->next;
}
}
return NULL;
} | 119 | True | 1 |
CVE-2020-13848 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/pupnp/pupnp/commit/c805c1de1141cb22f74c0d94dd5664bda37398e0', 'name': 'https://github.com/pupnp/pupnp/commit/c805c1de1141cb22f74c0d94dd5664bda37398e0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pupnp/pupnp/issues/177', 'name': 'https://github.com/pupnp/pupnp/issues/177', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/06/msg00006.html', 'name': '[debian-lts-announce] 20200608 [SECURITY] [DLA 2238-1] libupnp security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00030.html', 'name': 'openSUSE-SU-2020:0821', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00033.html', 'name': 'openSUSE-SU-2020:0805', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2021/03/msg00007.html', 'name': '[debian-lts-announce] 20210307 [SECURITY] [DLA 2585-1] libupnp security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libupnp_project:libupnp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Portable UPnP SDK (aka libupnp) 1.12.1 and earlier allows remote attackers to cause a denial of service (crash) via a crafted SSDP message due to a NULL pointer dereference in the functions FindServiceControlURLPath and FindServiceEventURLPath in genlib/service_table/service_table.c.'}] | 2021-03-08T01:15Z | 2020-06-04T20:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Marcelo Roberto Jimenez | 2020-06-04 12:03:03-03:00 | Fixes #177: NULL pointer dereference in FindServiceControlURLPath
Also fixes its dual bug in FindServiceEventURLPath. | c805c1de1141cb22f74c0d94dd5664bda37398e0 | False | pupnp/pupnp | libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems. | 2010-08-23 03:03:20 | 2022-08-04 22:46:00 | https://pupnp.github.io/pupnp | pupnp | 262.0 | 99.0 | FindServiceEventURLPath | FindServiceEventURLPath( service_table * table , const char * eventURLPath) | ['table', 'eventURLPath'] | service_info *FindServiceEventURLPath(
service_table *table, const char *eventURLPath)
{
service_info *finger = NULL;
uri_type parsed_url;
uri_type parsed_url_in;
if (table &&
parse_uri(eventURLPath, strlen(eventURLPath), &parsed_url_in) ==
HTTP_SUCCESS) {
finger = table->serviceList;
while (finger) {
if (finger->eventURL) {
if (parse_uri(finger->eventURL,
strlen(finger->eventURL),
&parsed_url) == HTTP_SUCCESS) {
if (!token_cmp(&parsed_url.pathquery,
&parsed_url_in.pathquery)) {
return finger;
}
}
}
finger = finger->next;
}
}
return NULL;
} | 119 | True | 1 |
CVE-2020-14156 | False | False | False | False | AV:N/AC:L/Au:S/C:P/I:P/A:P | NETWORK | LOW | SINGLE | PARTIAL | PARTIAL | PARTIAL | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.8 | HIGH | 2.8 | 5.9 | False | [{'url': 'https://github.com/openbmc/phosphor-host-ipmid/commit/b265455a2518ece7c004b43c144199ec980fc620', 'name': 'https://github.com/openbmc/phosphor-host-ipmid/commit/b265455a2518ece7c004b43c144199ec980fc620', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openbmc/openbmc/issues/3670', 'name': 'https://github.com/openbmc/openbmc/issues/3670', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.ozlabs.org/pipermail/openbmc/2020-June/022020.html', 'name': 'https://lists.ozlabs.org/pipermail/openbmc/2020-June/022020.html', 'refsource': 'CONFIRM', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-276'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openbmc-project:openbmc:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2020-04-03', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'user_channel/passwd_mgr.cpp in OpenBMC phosphor-host-ipmid before 2020-04-03 does not ensure that /etc/ipmi-pass has strong file permissions.'}] | 2020-06-22T18:33Z | 2020-06-15T18:15Z | Incorrect Default Permissions | During installation, installed file permissions are set to allow anyone to modify those files. | https://cwe.mitre.org/data/definitions/276.html | 0 | Vernon Mauery | 2020-04-03 14:28:53-07:00 | Use more restrictive permissions on /etc/ipmi-pass
This forces the permissions on /etc/ipmi-pass to be 0600 or RW only by
owner. This is to prevent non-owners from reading the file, even though
it is obfuscated to make it harder for ipmi passwords to leak.
Tested: change ipmi passwords and see that the /etc/ipmi-pass file has
0600 permissions.
Change-Id: I4be0b8a65f98ced031493f7767879eb054e1ee84
Signed-off-by: Vernon Mauery <[email protected]> | b265455a2518ece7c004b43c144199ec980fc620 | False | openbmc/phosphor-host-ipmid | dbus-based ipmid for host-endpoint IPMI commands | 2015-09-23 15:57:29 | 2022-08-26 11:26:37 | null | openbmc | 25.0 | 67.0 | ipmi::PasswdMgr::updatePasswdSpecialFile | ipmi::PasswdMgr::updatePasswdSpecialFile( const std :: string & userName , const std :: string & newUserName) | ['userName', 'newUserName'] | int PasswdMgr::updatePasswdSpecialFile(const std::string& userName,
const std::string& newUserName)
{
phosphor::user::shadow::Lock lock();
size_t bytesWritten = 0;
size_t inBytesLen = 0;
size_t isUsrFound = false;
const EVP_CIPHER* cipher = EVP_aes_128_cbc();
std::vector<uint8_t> dataBuf;
// Read the encrypted file and get the file data
// Check user existance and return if not exist.
if (readPasswdFileData(dataBuf) != 0)
{
log<level::DEBUG>("Error in reading the encrypted pass file");
return -EIO;
}
if (dataBuf.size() != 0)
{
inBytesLen =
dataBuf.size() + newUserName.size() + EVP_CIPHER_block_size(cipher);
}
std::vector<uint8_t> inBytes(inBytesLen);
if (inBytesLen != 0)
{
char* outPtr = reinterpret_cast<char*>(dataBuf.data());
char* nToken = NULL;
char* linePtr = strtok_r(outPtr, "\n", &nToken);
while (linePtr != NULL)
{
size_t userEPos = 0;
std::string lineStr(linePtr);
if ((userEPos = lineStr.find(":")) != std::string::npos)
{
if (userName.compare(lineStr.substr(0, userEPos)) == 0)
{
isUsrFound = true;
if (!newUserName.empty())
{
bytesWritten += std::snprintf(
reinterpret_cast<char*>(&inBytes[0]) + bytesWritten,
(inBytesLen - bytesWritten), "%s%s\n",
newUserName.c_str(),
lineStr.substr(userEPos, lineStr.size()).data());
}
}
else
{
bytesWritten += std::snprintf(
reinterpret_cast<char*>(&inBytes[0]) + bytesWritten,
(inBytesLen - bytesWritten), "%s\n", lineStr.data());
}
}
linePtr = strtok_r(NULL, "\n", &nToken);
}
inBytesLen = bytesWritten;
}
if (!isUsrFound)
{
log<level::DEBUG>("User doesn't exist");
return 0;
}
// Read the key buff from key file
std::array<uint8_t, maxKeySize> keyBuff;
std::ifstream keyFile(encryptKeyFileName, std::ios::in | std::ios::binary);
if (!keyFile.good())
{
log<level::DEBUG>("Error in opening encryption key file");
return -EIO;
}
keyFile.read(reinterpret_cast<char*>(keyBuff.data()), keyBuff.size());
if (keyFile.fail())
{
log<level::DEBUG>("Error in reading encryption key file");
return -EIO;
}
keyFile.close();
// Read the original passwd file mode
struct stat st = {};
if (stat(passwdFileName, &st) != 0)
{
log<level::DEBUG>("Error in getting password file fstat()");
return -EIO;
}
// Create temporary file for write
std::string pwdFile(passwdFileName);
std::vector<char> tempFileName(pwdFile.begin(), pwdFile.end());
std::vector<char> fileTemplate = {'_', '_', 'X', 'X', 'X',
'X', 'X', 'X', '\0'};
tempFileName.insert(tempFileName.end(), fileTemplate.begin(),
fileTemplate.end());
int fd = mkstemp((char*)tempFileName.data());
if (fd == -1)
{
log<level::DEBUG>("Error creating temp file");
return -EIO;
}
std::string strTempFileName(tempFileName.data());
// Open the temp file for writing from provided fd
// By "true", remove it at exit if still there.
// This is needed to cleanup the temp file at exception
phosphor::user::File temp(fd, strTempFileName, "w", true);
if ((temp)() == NULL)
{
close(fd);
log<level::DEBUG>("Error creating temp file");
return -EIO;
}
// Set the file mode as of actual ipmi-pass file.
if (fchmod(fileno((temp)()), st.st_mode) < 0)
{
log<level::DEBUG>("Error setting fchmod for temp file");
return -EIO;
}
const EVP_MD* digest = EVP_sha256();
size_t hashLen = EVP_MD_block_size(digest);
std::vector<uint8_t> hash(hashLen);
size_t ivLen = EVP_CIPHER_iv_length(cipher);
std::vector<uint8_t> iv(ivLen);
std::array<uint8_t, EVP_MAX_KEY_LENGTH> key;
size_t keyLen = key.size();
std::array<uint8_t, EVP_MAX_MD_SIZE> mac;
size_t macLen = mac.size();
// Create random hash and generate hash key which will be used for
// encryption.
if (RAND_bytes(hash.data(), hashLen) != 1)
{
log<level::DEBUG>("Hash genertion failed, bailing out");
return -EIO;
}
if (NULL == HMAC(digest, keyBuff.data(), keyBuff.size(), hash.data(),
hashLen, key.data(),
reinterpret_cast<unsigned int*>(&keyLen)))
{
log<level::DEBUG>("Failed to create MAC for authentication");
return -EIO;
}
// Generate IV values
if (RAND_bytes(iv.data(), ivLen) != 1)
{
log<level::DEBUG>("UV genertion failed, bailing out");
return -EIO;
}
// Encrypt the input data
std::vector<uint8_t> outBytes(inBytesLen + EVP_MAX_BLOCK_LENGTH);
size_t outBytesLen = 0;
if (inBytesLen != 0)
{
if (encryptDecryptData(true, EVP_aes_128_cbc(), key.data(), keyLen,
iv.data(), ivLen, inBytes.data(), inBytesLen,
mac.data(), &macLen, outBytes.data(),
&outBytesLen) != 0)
{
log<level::DEBUG>("Error while encrypting the data");
return -EIO;
}
outBytes[outBytesLen] = 0;
}
OPENSSL_cleanse(key.data(), keyLen);
// Update the meta password structure.
MetaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0};
metaData.hashSize = hashLen;
metaData.ivSize = ivLen;
metaData.dataSize = bytesWritten;
metaData.padSize = outBytesLen - bytesWritten;
metaData.macSize = macLen;
if (fwrite(&metaData, 1, sizeof(metaData), (temp)()) != sizeof(metaData))
{
log<level::DEBUG>("Error in writing meta data");
return -EIO;
}
if (fwrite(&hash[0], 1, hashLen, (temp)()) != hashLen)
{
log<level::DEBUG>("Error in writing hash data");
return -EIO;
}
if (fwrite(&iv[0], 1, ivLen, (temp)()) != ivLen)
{
log<level::DEBUG>("Error in writing IV data");
return -EIO;
}
if (fwrite(&outBytes[0], 1, outBytesLen, (temp)()) != outBytesLen)
{
log<level::DEBUG>("Error in writing encrypted data");
return -EIO;
}
if (fwrite(&mac[0], 1, macLen, (temp)()) != macLen)
{
log<level::DEBUG>("Error in writing MAC data");
return -EIO;
}
if (fflush((temp)()))
{
log<level::DEBUG>(
"File fflush error while writing entries to special file");
return -EIO;
}
OPENSSL_cleanse(iv.data(), ivLen);
// Rename the tmp file to actual file
if (std::rename(strTempFileName.data(), passwdFileName) != 0)
{
log<level::DEBUG>("Failed to rename tmp file to ipmi-pass");
return -EIO;
}
return 0;
} | 1389 | True | 1 |
|
CVE-2020-14976 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:N/A:N | LOCAL | LOW | NONE | COMPLETE | NONE | NONE | 4.9 | 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 | False | [{'url': 'https://github.com/GNS3/ubridge/commit/2eb0d1dab6a6de76cf3556130a2d52af101077db', 'name': 'https://github.com/GNS3/ubridge/commit/2eb0d1dab6a6de76cf3556130a2d52af101077db', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://theevilbit.github.io/posts/', 'name': 'https://theevilbit.github.io/posts/', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/GNS3/gns3-server/releases/tag/v2.1.17', 'name': 'https://github.com/GNS3/gns3-server/releases/tag/v2.1.17', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.gns3.com/', 'name': 'https://www.gns3.com/', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-269'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gns3:ubridge:*:*:*:*:*:macos:*:*', 'versionEndIncluding': '0.9.18', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:gns3:gns3:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.1.17', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'GNS3 ubridge through 0.9.18 on macOS, as used in GNS3 server before 2.1.17, allows a local attacker to read arbitrary files because it handles configuration-file errors by printing the configuration file while executing in a setuid root context.'}] | 2021-07-21T11:39Z | 2020-06-23T20:15Z | Improper Privilege Management | The software does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. | https://cwe.mitre.org/data/definitions/269.html | 0 | ziajka | 2019-05-08 16:48:24+02:00 | Hide errored line content during parsing configuration INI file on default | 2eb0d1dab6a6de76cf3556130a2d52af101077db | False | GNS3/ubridge | Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces. | 2015-05-15 22:16:06 | 2022-04-17 10:04:24 | GNS3 | 87.0 | 38.0 | iniparser_load | iniparser_load( const char * ininame) | ['ininame'] | dictionary * iniparser_load(const char * ininame)
{
FILE * in ;
char line [ASCIILINESZ+1] ;
char section [ASCIILINESZ+1] ;
char key [ASCIILINESZ+1] ;
char tmp [(ASCIILINESZ * 2) + 1] ;
char val [ASCIILINESZ+1] ;
int last=0 ;
int len ;
int lineno=0 ;
int errs=0;
dictionary * dict ;
if ((in=fopen(ininame, "r"))==NULL) {
fprintf(stderr, "iniparser: cannot open %s\n", ininame);
return NULL ;
}
dict = dictionary_new(0) ;
if (!dict) {
fclose(in);
return NULL ;
}
memset(line, 0, ASCIILINESZ);
memset(section, 0, ASCIILINESZ);
memset(key, 0, ASCIILINESZ);
memset(val, 0, ASCIILINESZ);
last=0 ;
while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
lineno++ ;
len = (int)strlen(line)-1;
if (len==0)
continue;
/* Safety check against buffer overflows */
if (line[len]!='\n' && !feof(in)) {
fprintf(stderr,
"iniparser: input line too long in %s (%d)\n",
ininame,
lineno);
dictionary_del(dict);
fclose(in);
return NULL ;
}
/* Get rid of \n and spaces at end of line */
while ((len>=0) &&
((line[len]=='\n') || (isspace(line[len])))) {
line[len]=0 ;
len-- ;
}
if (len < 0) { /* Line was entirely \n and/or spaces */
len = 0;
}
/* Detect multi-line */
if (line[len]=='\\') {
/* Multi-line value */
last=len ;
continue ;
} else {
last=0 ;
}
switch (iniparser_line(line, section, key, val)) {
case LINE_EMPTY:
case LINE_COMMENT:
break ;
case LINE_SECTION:
errs = dictionary_set(dict, section, NULL);
break ;
case LINE_VALUE:
sprintf(tmp, "%s:%s", section, key);
errs = dictionary_set(dict, tmp, val) ;
break ;
case LINE_ERROR:
fprintf(stderr, "iniparser: syntax error in %s (%d):\n",
ininame,
lineno);
fprintf(stderr, "-> %s\n", line);
errs++ ;
break;
default:
break ;
}
memset(line, 0, ASCIILINESZ);
last=0;
if (errs<0) {
fprintf(stderr, "iniparser: memory allocation failure\n");
break ;
}
}
if (errs) {
dictionary_del(dict);
dict = NULL ;
}
fclose(in);
return dict ;
} | 481 | True | 1 |
||
CVE-2020-14976 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:N/A:N | LOCAL | LOW | NONE | COMPLETE | NONE | NONE | 4.9 | 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 | False | [{'url': 'https://github.com/GNS3/ubridge/commit/2eb0d1dab6a6de76cf3556130a2d52af101077db', 'name': 'https://github.com/GNS3/ubridge/commit/2eb0d1dab6a6de76cf3556130a2d52af101077db', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://theevilbit.github.io/posts/', 'name': 'https://theevilbit.github.io/posts/', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/GNS3/gns3-server/releases/tag/v2.1.17', 'name': 'https://github.com/GNS3/gns3-server/releases/tag/v2.1.17', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.gns3.com/', 'name': 'https://www.gns3.com/', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-269'}]}] | MEDIUM | [{'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gns3:ubridge:*:*:*:*:*:macos:*:*', 'versionEndIncluding': '0.9.18', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:a:gns3:gns3:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.1.17', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'GNS3 ubridge through 0.9.18 on macOS, as used in GNS3 server before 2.1.17, allows a local attacker to read arbitrary files because it handles configuration-file errors by printing the configuration file while executing in a setuid root context.'}] | 2021-07-21T11:39Z | 2020-06-23T20:15Z | Improper Privilege Management | The software does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. | https://cwe.mitre.org/data/definitions/269.html | 0 | ziajka | 2019-05-08 16:48:24+02:00 | Hide errored line content during parsing configuration INI file on default | 2eb0d1dab6a6de76cf3556130a2d52af101077db | False | GNS3/ubridge | Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces. | 2015-05-15 22:16:06 | 2022-04-17 10:04:24 | GNS3 | 87.0 | 38.0 | parse_config | parse_config( char * filename , bridge_t ** bridges) | ['filename', 'bridges'] | int parse_config(char *filename, bridge_t **bridges)
{
dictionary *ubridge_config = NULL;
const char *value;
const char *bridge_name;
int i, nsec;
if ((ubridge_config = iniparser_load(filename)) == NULL) {
return FALSE;
}
nsec = iniparser_getnsec(ubridge_config);
for (i = 0; i < nsec; i++) {
bridge_t *bridge;
nio_t *source_nio = NULL;
nio_t *destination_nio = NULL;
bridge_name = iniparser_getsecname(ubridge_config, i);
printf("Parsing %s\n", bridge_name);
if (getstr(ubridge_config, bridge_name, "source_udp", &value))
source_nio = create_udp_tunnel(value);
else if (getstr(ubridge_config, bridge_name, "source_unix", &value))
source_nio = create_unix_socket(value);
else if (getstr(ubridge_config, bridge_name, "source_ethernet", &value))
source_nio = open_ethernet_device(value);
else if (getstr(ubridge_config, bridge_name, "source_tap", &value))
source_nio = open_tap_device(value);
#ifdef LINUX_RAW
else if (getstr(ubridge_config, bridge_name, "source_linux_raw", &value))
source_nio = open_linux_raw(value);
#endif
#ifdef __APPLE__
else if (getstr(ubridge_config, bridge_name, "source_fusion_vmnet", &value))
source_nio = open_fusion_vmnet(value);
#endif
else
fprintf(stderr, "source NIO not found\n");
if (getstr(ubridge_config, bridge_name, "destination_udp", &value))
destination_nio = create_udp_tunnel(value);
else if (getstr(ubridge_config, bridge_name, "destination_unix", &value))
destination_nio = create_unix_socket(value);
else if (getstr(ubridge_config, bridge_name, "destination_ethernet", &value))
destination_nio = open_ethernet_device(value);
else if (getstr(ubridge_config, bridge_name, "destination_tap", &value))
destination_nio = open_tap_device(value);
#ifdef LINUX_RAW
else if (getstr(ubridge_config, bridge_name, "destination_linux_raw", &value))
source_nio = open_linux_raw(value);
#endif
#ifdef __APPLE__
else if (getstr(ubridge_config, bridge_name, "destination_fusion_vmnet", &value))
destination_nio = open_fusion_vmnet(value);
#endif
else
fprintf(stderr, "destination NIO not found\n");
if (source_nio && destination_nio) {
bridge = add_bridge(bridges);
bridge->source_nio = source_nio;
bridge->destination_nio = destination_nio;
if (!(bridge->name = strdup(bridge_name))) {
fprintf(stderr, "bridge creation: insufficient memory\n");
return FALSE;
}
parse_capture(ubridge_config, bridge_name, bridge);
parse_filter(ubridge_config, bridge_name, bridge);
}
else if (source_nio != NULL)
free_nio(source_nio);
else if (destination_nio != NULL)
free_nio(destination_nio);
}
iniparser_freedict(ubridge_config);
return TRUE;
} | 486 | True | 1 |
||
CVE-2020-15007 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://twitter.com/notrevenant/status/1268654123903340544', 'name': 'https://twitter.com/notrevenant/status/1268654123903340544', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/AXDOOMER/doom-vanille/commit/8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec', 'name': 'https://github.com/AXDOOMER/doom-vanille/commit/8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:idsoftware:tech_1:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:doom_vanille_project:doom_vanille:*:*:*:*:*:*:*:*', 'versionEndExcluding': '671', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A buffer overflow in the M_LoadDefaults function in m_misc.c in id Tech 1 (aka Doom engine) allows arbitrary code execution via an unsafe usage of fscanf, because it does not limit the number of characters to be read in a format argument.'}] | 2020-07-08T14:33Z | 2020-06-24T11:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Alexandre-Xavier Labonté-Lamoureux | 2020-06-11 01:57:07-04:00 | Fix buffer overflow in M_LoadDefaults
Too much data will most likely result in a crash or freeze, but you can overwrite the stack which can be used to do an arbitrary code execution. (https://twitter.com/notrevenant/status/1268654123903340544) | 8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec | False | AXDOOMER/doom-vanille | DOS source port of Doom with DMX features support. 100% vanilla-compatible with any IWAD. | 2017-03-12 02:05:45 | 2020-06-24 05:29:18 | AXDOOMER | 13.0 | 1.0 | M_LoadDefaults | M_LoadDefaults( void) | ['void'] | void M_LoadDefaults (void)
{
int i;
int len;
FILE* f;
char def[80];
char strparm[100];
char* newstring;
int parm;
boolean isstring;
// set everything to base values
numdefaults = sizeof(defaults)/sizeof(defaults[0]);
for (i=0 ; i<numdefaults ; i++)
*defaults[i].location = defaults[i].defaultvalue;
// check for a custom default file
i = M_CheckParm ("-config");
if (i && i<myargc-1)
{
defaultfile = myargv[i+1];
printf (" default file: %s\n",defaultfile);
}
else
defaultfile = basedefault;
// read the file in, overriding any set defaults
f = fopen (defaultfile, "r");
if (f)
{
while (!feof(f))
{
isstring = false;
if (fscanf (f, "%79s %[^\n]\n", def, strparm) == 2)
{
if (strparm[0] == '"')
{
// get a string default
isstring = true;
len = strlen(strparm);
newstring = (char *) malloc(len);
strparm[len-1] = 0;
strcpy(newstring, strparm+1);
}
else if (strparm[0] == '0' && strparm[1] == 'x')
sscanf(strparm+2, "%x", &parm);
else
sscanf(strparm, "%i", &parm);
for (i=0 ; i<numdefaults ; i++)
if (!strcmp(def, defaults[i].name))
{
if (!isstring)
*defaults[i].location = parm;
else
*defaults[i].location =
(int) newstring;
break;
}
}
}
fclose (f);
}
for (i = 0; i < numdefaults; i++)
{
if (defaults[i].scantranslate)
{
parm = *defaults[i].location;
defaults[i].untranslated = parm;
*defaults[i].location = scantokey[parm];
}
}
} | 382 | True | 1 |
|
CVE-2020-15173 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'name': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'name': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:accel-ppp:accel-ppp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.0-92-g38b6104', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In ACCEL-PPP (an implementation of PPTP/PPPoE/L2TP/SSTP), there is a buffer overflow when receiving an l2tp control packet ith an AVP which type is a string and no hidden flags, length set to less than 6. If your application is used in open networks or there are untrusted nodes in the network it is highly recommended to apply the patch. The problem was patched with commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b As a workaround changes of commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b can be applied to older versions.'}] | 2021-11-18T17:48Z | 2020-09-09T23:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Vladislav Grishenko | 2020-09-06 02:38:35+05:00 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
Order of struct bitfields is implementation-defined so current code
doesn't play well with big-endian arch. switch to explicit flag bit
checking/gathering to fix the issue.
RFC 2661 and 3931 requires that length, seqeuence flags must be set
and offset flag must not be set, so avp-premissive can't help in
this cases. | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | False | accel-ppp/accel-ppp | High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux | 2020-03-07 12:58:24 | 2022-08-22 21:44:43 | https://accel-ppp.org/ | accel-ppp | 130.0 | 36.0 | decode_avp | decode_avp( struct l2tp_avp_t * avp , const struct l2tp_attr_t * RV , const char * secret , size_t secret_len) | ['avp', 'RV', 'secret', 'secret_len'] | static int decode_avp(struct l2tp_avp_t *avp, const struct l2tp_attr_t *RV,
const char *secret, size_t secret_len)
{
MD5_CTX md5_ctx;
uint8_t md5[MD5_DIGEST_LENGTH];
uint8_t p1[MD5_DIGEST_LENGTH];
uint8_t *prev_block = NULL;
uint16_t attr_len;
uint16_t orig_attr_len;
uint16_t bytes_left;
uint16_t blocks_left;
uint16_t last_block_len;
if (avp->length < sizeof(struct l2tp_avp_t) + 2) {
/* Hidden AVPs must contain at least two bytes
for storing original attribute length */
log_warn("l2tp: incorrect hidden avp received (type %hu):"
" length too small (%hu bytes)\n",
ntohs(avp->type), avp->length);
return -1;
}
attr_len = avp->length - sizeof(struct l2tp_avp_t);
/* Decode first block */
MD5_Init(&md5_ctx);
MD5_Update(&md5_ctx, &avp->type, sizeof(avp->type));
MD5_Update(&md5_ctx, secret, secret_len);
MD5_Update(&md5_ctx, RV->val.octets, RV->length);
MD5_Final(p1, &md5_ctx);
if (attr_len <= MD5_DIGEST_LENGTH) {
memxor(avp->val, p1, attr_len);
return 0;
}
memxor(p1, avp->val, MD5_DIGEST_LENGTH);
orig_attr_len = ntohs(*(uint16_t *)p1);
if (orig_attr_len <= MD5_DIGEST_LENGTH - 2) {
/* Enough bytes decoded already, no need to decode padding */
memcpy(avp->val, p1, MD5_DIGEST_LENGTH);
return 0;
}
if (orig_attr_len > attr_len - 2) {
log_warn("l2tp: incorrect hidden avp received (type %hu):"
" original attribute length too big (ciphered"
" attribute length: %hu bytes, advertised original"
" attribute length: %hu bytes)\n",
ntohs(avp->type), attr_len, orig_attr_len);
return -1;
}
/* Decode remaining blocks. Start from the last block as
preceding blocks must be kept hidden for computing MD5s */
bytes_left = orig_attr_len + 2 - MD5_DIGEST_LENGTH;
last_block_len = bytes_left % MD5_DIGEST_LENGTH;
blocks_left = bytes_left / MD5_DIGEST_LENGTH;
if (last_block_len) {
prev_block = avp->val + blocks_left * MD5_DIGEST_LENGTH;
MD5_Init(&md5_ctx);
MD5_Update(&md5_ctx, secret, secret_len);
MD5_Update(&md5_ctx, prev_block, MD5_DIGEST_LENGTH);
MD5_Final(md5, &md5_ctx);
memxor(prev_block + MD5_DIGEST_LENGTH, md5, last_block_len);
prev_block -= MD5_DIGEST_LENGTH;
} else
prev_block = avp->val + (blocks_left - 1) * MD5_DIGEST_LENGTH;
while (prev_block >= avp->val) {
MD5_Init(&md5_ctx);
MD5_Update(&md5_ctx, secret, secret_len);
MD5_Update(&md5_ctx, prev_block, MD5_DIGEST_LENGTH);
MD5_Final(md5, &md5_ctx);
memxor(prev_block + MD5_DIGEST_LENGTH, md5, MD5_DIGEST_LENGTH);
prev_block -= MD5_DIGEST_LENGTH;
}
memcpy(avp->val, p1, MD5_DIGEST_LENGTH);
return 0;
} | 441 | True | 1 |
CVE-2020-15173 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'name': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'name': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:accel-ppp:accel-ppp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.0-92-g38b6104', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In ACCEL-PPP (an implementation of PPTP/PPPoE/L2TP/SSTP), there is a buffer overflow when receiving an l2tp control packet ith an AVP which type is a string and no hidden flags, length set to less than 6. If your application is used in open networks or there are untrusted nodes in the network it is highly recommended to apply the patch. The problem was patched with commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b As a workaround changes of commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b can be applied to older versions.'}] | 2021-11-18T17:48Z | 2020-09-09T23:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Vladislav Grishenko | 2020-09-06 02:38:35+05:00 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
Order of struct bitfields is implementation-defined so current code
doesn't play well with big-endian arch. switch to explicit flag bit
checking/gathering to fix the issue.
RFC 2661 and 3931 requires that length, seqeuence flags must be set
and offset flag must not be set, so avp-premissive can't help in
this cases. | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | False | accel-ppp/accel-ppp | High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux | 2020-03-07 12:58:24 | 2022-08-22 21:44:43 | https://accel-ppp.org/ | accel-ppp | 130.0 | 36.0 | l2tp_packet_alloc | l2tp_packet_alloc( int ver , int msg_type , const struct sockaddr_in * addr , int H , const char * secret , size_t secret_len) | ['ver', 'msg_type', 'addr', 'H', 'secret', 'secret_len'] | struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type,
const struct sockaddr_in *addr, int H,
const char *secret, size_t secret_len)
{
struct l2tp_packet_t *pack = mempool_alloc(pack_pool);
if (!pack)
return NULL;
memset(pack, 0, sizeof(*pack));
INIT_LIST_HEAD(&pack->attrs);
pack->hdr.ver = ver;
pack->hdr.T = 1;
pack->hdr.L = 1;
pack->hdr.S = 1;
memcpy(&pack->addr, addr, sizeof(*addr));
pack->hide_avps = H;
pack->secret = secret;
pack->secret_len = secret_len;
if (msg_type) {
if (l2tp_packet_add_int16(pack, Message_Type, msg_type, 1)) {
mempool_free(pack);
return NULL;
}
}
return pack;
} | 164 | True | 1 |
CVE-2020-15173 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'name': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'name': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:accel-ppp:accel-ppp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.0-92-g38b6104', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In ACCEL-PPP (an implementation of PPTP/PPPoE/L2TP/SSTP), there is a buffer overflow when receiving an l2tp control packet ith an AVP which type is a string and no hidden flags, length set to less than 6. If your application is used in open networks or there are untrusted nodes in the network it is highly recommended to apply the patch. The problem was patched with commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b As a workaround changes of commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b can be applied to older versions.'}] | 2021-11-18T17:48Z | 2020-09-09T23:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Vladislav Grishenko | 2020-09-06 02:38:35+05:00 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
Order of struct bitfields is implementation-defined so current code
doesn't play well with big-endian arch. switch to explicit flag bit
checking/gathering to fix the issue.
RFC 2661 and 3931 requires that length, seqeuence flags must be set
and offset flag must not be set, so avp-premissive can't help in
this cases. | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | False | accel-ppp/accel-ppp | High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux | 2020-03-07 12:58:24 | 2022-08-22 21:44:43 | https://accel-ppp.org/ | accel-ppp | 130.0 | 36.0 | l2tp_packet_print | l2tp_packet_print( const struct l2tp_packet_t * pack , void(*print)(const char*fmt,...)) | ['pack', 'void'] | void l2tp_packet_print(const struct l2tp_packet_t *pack,
void (*print)(const char *fmt, ...))
{
const struct l2tp_attr_t *attr;
const struct l2tp_dict_value_t *val;
if (pack->hdr.ver == 2) {
print("[L2TP tid=%u sid=%u", ntohs(pack->hdr.tid), ntohs(pack->hdr.sid));
log_ppp_debug(" Ns=%u Nr=%u", ntohs(pack->hdr.Ns), ntohs(pack->hdr.Nr));
} else {
print("[L2TP cid=%u", pack->hdr.cid);
log_ppp_debug(" Ns=%u Nr=%u", ntohs(pack->hdr.Ns), ntohs(pack->hdr.Nr));
}
list_for_each_entry(attr, &pack->attrs, entry) {
print(" <%s", attr->attr->name);
val = l2tp_dict_find_value(attr->attr, attr->val);
if (val)
print(" %s", val->name);
else if (attr->H)
print(" (hidden, %hu bytes)", attr->length);
else {
switch (attr->attr->type) {
case ATTR_TYPE_INT16:
print(" %i", attr->val.int16);
break;
case ATTR_TYPE_INT32:
print(" %i", attr->val.int32);
break;
case ATTR_TYPE_STRING:
print(" %s", attr->val.string);
break;
}
}
print(">");
}
print("]\n");
} | 268 | True | 1 |
CVE-2020-15173 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'name': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'name': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:accel-ppp:accel-ppp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.0-92-g38b6104', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In ACCEL-PPP (an implementation of PPTP/PPPoE/L2TP/SSTP), there is a buffer overflow when receiving an l2tp control packet ith an AVP which type is a string and no hidden flags, length set to less than 6. If your application is used in open networks or there are untrusted nodes in the network it is highly recommended to apply the patch. The problem was patched with commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b As a workaround changes of commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b can be applied to older versions.'}] | 2021-11-18T17:48Z | 2020-09-09T23:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Vladislav Grishenko | 2020-09-06 02:38:35+05:00 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
Order of struct bitfields is implementation-defined so current code
doesn't play well with big-endian arch. switch to explicit flag bit
checking/gathering to fix the issue.
RFC 2661 and 3931 requires that length, seqeuence flags must be set
and offset flag must not be set, so avp-premissive can't help in
this cases. | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | False | accel-ppp/accel-ppp | High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux | 2020-03-07 12:58:24 | 2022-08-22 21:44:43 | https://accel-ppp.org/ | accel-ppp | 130.0 | 36.0 | l2tp_packet_send | l2tp_packet_send( int sock , struct l2tp_packet_t * pack) | ['sock', 'pack'] | int l2tp_packet_send(int sock, struct l2tp_packet_t *pack)
{
uint8_t *buf = mempool_alloc(buf_pool);
struct l2tp_avp_t *avp;
struct l2tp_attr_t *attr;
uint8_t *ptr;
int n;
int len = sizeof(pack->hdr);
if (!buf) {
log_emerg("l2tp: out of memory\n");
return -1;
}
memset(buf, 0, L2TP_MAX_PACKET_SIZE);
ptr = buf + sizeof(pack->hdr);
list_for_each_entry(attr, &pack->attrs, entry) {
if (len + sizeof(*avp) + attr->length >= L2TP_MAX_PACKET_SIZE) {
log_error("l2tp: cann't send packet (exceeds maximum size)\n");
mempool_free(buf);
return -1;
}
avp = (struct l2tp_avp_t *)ptr;
avp->type = htons(attr->attr->id);
avp->M = attr->M;
avp->H = attr->H;
avp->length = sizeof(*avp) + attr->length;
*(uint16_t *)ptr = htons(*(uint16_t *)ptr);
if (attr->H)
memcpy(avp->val, attr->val.octets, attr->length);
else
switch (attr->attr->type) {
case ATTR_TYPE_INT16:
*(int16_t *)avp->val = htons(attr->val.int16);
break;
case ATTR_TYPE_INT32:
*(int32_t *)avp->val = htonl(attr->val.int32);
break;
case ATTR_TYPE_INT64:
*(uint64_t *)avp->val = htobe64(attr->val.uint64);
break;
case ATTR_TYPE_STRING:
case ATTR_TYPE_OCTETS:
memcpy(avp->val, attr->val.string, attr->length);
break;
}
ptr += sizeof(*avp) + attr->length;
len += sizeof(*avp) + attr->length;
}
pack->hdr.length = htons(len);
memcpy(buf, &pack->hdr, sizeof(pack->hdr));
n = sendto(sock, buf, ntohs(pack->hdr.length), 0,
&pack->addr, sizeof(pack->addr));
mempool_free(buf);
if (n < 0) {
if (errno == EAGAIN) {
if (conf_verbose)
log_warn("l2tp: buffer overflow (packet lost)\n");
} else {
if (conf_verbose)
log_warn("l2tp: sendto: %s\n", strerror(errno));
return -1;
}
}
if (n != ntohs(pack->hdr.length)) {
if (conf_verbose)
log_warn("l2tp: short write (%i/%i)\n", n, ntohs(pack->hdr.length));
}
return 0;
} | 499 | True | 1 |
CVE-2020-15173 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'name': 'https://github.com/accel-ppp/accel-ppp/security/advisories/GHSA-rr68-fchr-69vf', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'name': 'https://github.com/accel-ppp/accel-ppp/commit/2324bcd5ba12cf28f47357a8f03cd41b7c04c52b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:accel-ppp:accel-ppp:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.12.0-92-g38b6104', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In ACCEL-PPP (an implementation of PPTP/PPPoE/L2TP/SSTP), there is a buffer overflow when receiving an l2tp control packet ith an AVP which type is a string and no hidden flags, length set to less than 6. If your application is used in open networks or there are untrusted nodes in the network it is highly recommended to apply the patch. The problem was patched with commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b As a workaround changes of commit 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b can be applied to older versions.'}] | 2021-11-18T17:48Z | 2020-09-09T23:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Vladislav Grishenko | 2020-09-06 02:38:35+05:00 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
Order of struct bitfields is implementation-defined so current code
doesn't play well with big-endian arch. switch to explicit flag bit
checking/gathering to fix the issue.
RFC 2661 and 3931 requires that length, seqeuence flags must be set
and offset flag must not be set, so avp-premissive can't help in
this cases. | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | False | accel-ppp/accel-ppp | High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux | 2020-03-07 12:58:24 | 2022-08-22 21:44:43 | https://accel-ppp.org/ | accel-ppp | 130.0 | 36.0 | l2tp_recv | l2tp_recv( int fd , struct l2tp_packet_t ** p , struct in_pktinfo * pkt_info , const char * secret , size_t secret_len) | ['fd', 'p', 'pkt_info', 'secret', 'secret_len'] | int l2tp_recv(int fd, struct l2tp_packet_t **p, struct in_pktinfo *pkt_info,
const char *secret, size_t secret_len)
{
int n, length;
uint8_t *buf;
struct l2tp_hdr_t *hdr;
struct l2tp_avp_t *avp;
struct l2tp_dict_attr_t *da;
struct l2tp_attr_t *attr, *RV = NULL;
uint8_t *ptr;
struct l2tp_packet_t *pack;
struct sockaddr_in addr;
socklen_t len = sizeof(addr);
struct msghdr msg;
char msg_control[128];
struct cmsghdr *cmsg;
uint16_t orig_avp_len;
void *orig_avp_val;
*p = NULL;
if (pkt_info) {
memset(&msg, 0, sizeof(msg));
msg.msg_control = msg_control;
msg.msg_controllen = 128;
n = recvmsg(fd, &msg, MSG_PEEK);
if (n < 0) {
if (errno == EAGAIN)
return -1;
log_error("l2tp: recvmsg: %s\n", strerror(errno));
return 0;
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) {
memcpy(pkt_info, CMSG_DATA(cmsg), sizeof(*pkt_info));
break;
}
}
}
buf = mempool_alloc(buf_pool);
if (!buf) {
log_emerg("l2tp: out of memory\n");
return 0;
}
hdr = (struct l2tp_hdr_t *)buf;
ptr = (uint8_t *)(hdr + 1);
n = recvfrom(fd, buf, L2TP_MAX_PACKET_SIZE, 0, &addr, &len);
if (n < 0) {
mempool_free(buf);
if (errno == EAGAIN) {
return -1;
} else if (errno == ECONNREFUSED) {
return -2;
}
log_error("l2tp: recv: %s\n", strerror(errno));
return 0;
}
if (n < 6) {
if (conf_verbose)
log_warn("l2tp: short packet received (%i/%zu)\n", n, sizeof(*hdr));
goto out_err_hdr;
}
if (hdr->T == 0)
goto out_err_hdr;
if (n < ntohs(hdr->length)) {
if (conf_verbose)
log_warn("l2tp: short packet received (%i/%i)\n", n, ntohs(hdr->length));
goto out_err_hdr;
}
if (hdr->ver == 2) {
if (hdr->L == 0) {
if (conf_verbose)
log_warn("l2tp: incorrect message received (L=0)\n");
if (!conf_avp_permissive)
goto out_err_hdr;
}
if (hdr->S == 0) {
if (conf_verbose)
log_warn("l2tp: incorrect message received (S=0)\n");
if (!conf_avp_permissive)
goto out_err_hdr;
}
if (hdr->O == 1) {
if (conf_verbose)
log_warn("l2tp: incorrect message received (O=1)\n");
if (!conf_avp_permissive)
goto out_err_hdr;
}
} else if (hdr->ver != 3) {
if (conf_verbose)
log_warn("l2tp: protocol version %i is not supported\n", hdr->ver);
goto out_err_hdr;
}
pack = mempool_alloc(pack_pool);
if (!pack) {
log_emerg("l2tp: out of memory\n");
goto out_err_hdr;
}
memset(pack, 0, sizeof(*pack));
INIT_LIST_HEAD(&pack->attrs);
memcpy(&pack->addr, &addr, sizeof(addr));
memcpy(&pack->hdr, hdr, sizeof(*hdr));
length = ntohs(hdr->length) - sizeof(*hdr);
while (length) {
*(uint16_t *)ptr = ntohs(*(uint16_t *)ptr);
avp = (struct l2tp_avp_t *)ptr;
if (avp->length > length) {
if (conf_verbose)
log_warn("l2tp: incorrect avp received (exceeds message length)\n");
goto out_err;
}
if (avp->vendor)
goto skip;
da = l2tp_dict_find_attr_by_id(ntohs(avp->type));
if (!da) {
if (conf_verbose)
log_warn("l2tp: unknown avp received (type=%i, M=%u)\n", ntohs(avp->type), avp->M);
if (avp->M && !conf_avp_permissive)
goto out_err;
} else {
if (da->M != -1 && da->M != avp->M) {
if (conf_verbose)
log_warn("l2tp: incorrect avp received (type=%i, M=%i, must be %i)\n", ntohs(avp->type), avp->M, da->M);
if (!conf_avp_permissive)
goto out_err;
}
if (da->H != -1 && da->H != avp->H) {
if (conf_verbose)
log_warn("l2tp: incorrect avp received (type=%i, H=%i, must be %i)\n", ntohs(avp->type), avp->H, da->H);
if (!conf_avp_permissive)
goto out_err;
}
if (avp->H) {
if (!RV) {
if (conf_verbose)
log_warn("l2tp: incorrect avp received (type=%i, H=1, but Random-Vector is not received)\n", ntohs(avp->type));
goto out_err;
}
if (secret == NULL || secret_len == 0) {
log_error("l2tp: impossible to decode"
" hidden avp (type %hu): no"
" secret set)\n",
ntohs(avp->type));
goto out_err;
}
if (decode_avp(avp, RV, secret, secret_len) < 0)
goto out_err;
}
attr = mempool_alloc(attr_pool);
memset(attr, 0, sizeof(*attr));
list_add_tail(&attr->entry, &pack->attrs);
if (avp->H) {
orig_avp_len = ntohs(*(uint16_t *)avp->val) + sizeof(*avp);
orig_avp_val = avp->val + sizeof(uint16_t);
} else {
orig_avp_len = avp->length;
orig_avp_val = avp->val;
}
attr->attr = da;
attr->M = avp->M;
attr->H = 0;
attr->length = orig_avp_len - sizeof(*avp);
if (attr->attr->id == Random_Vector)
RV = attr;
switch (da->type) {
case ATTR_TYPE_INT16:
if (orig_avp_len != sizeof(*avp) + 2)
goto out_err_len;
attr->val.uint16 = ntohs(*(uint16_t *)orig_avp_val);
break;
case ATTR_TYPE_INT32:
if (orig_avp_len != sizeof(*avp) + 4)
goto out_err_len;
attr->val.uint32 = ntohl(*(uint32_t *)orig_avp_val);
break;
case ATTR_TYPE_INT64:
if (orig_avp_len != sizeof(*avp) + 8)
goto out_err_len;
attr->val.uint64 = be64toh(*(uint64_t *)orig_avp_val);
break;
case ATTR_TYPE_OCTETS:
attr->val.octets = _malloc(attr->length);
if (!attr->val.octets)
goto out_err_mem;
memcpy(attr->val.octets, orig_avp_val, attr->length);
break;
case ATTR_TYPE_STRING:
attr->val.string = _malloc(attr->length + 1);
if (!attr->val.string)
goto out_err_mem;
memcpy(attr->val.string, orig_avp_val, attr->length);
attr->val.string[attr->length] = 0;
break;
}
}
skip:
ptr += avp->length;
length -= avp->length;
}
*p = pack;
mempool_free(buf);
return 0;
out_err:
l2tp_packet_free(pack);
out_err_hdr:
mempool_free(buf);
return 0;
out_err_len:
if (conf_verbose)
log_warn("l2tp: incorrect avp received (type=%i, incorrect length %i)\n", ntohs(avp->type), orig_avp_len);
goto out_err;
out_err_mem:
log_emerg("l2tp: out of memory\n");
goto out_err;
} | 1366 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _consolefs_read | _consolefs_read( oe_fd_t * file_ , void * buf , size_t count) | ['file_', 'buf', 'count'] | static ssize_t _consolefs_read(oe_fd_t* file_, void* buf, size_t count)
{
ssize_t ret = -1;
file_t* file = _cast_file(file_);
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_read_ocall(&ret, file->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 68 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _consolefs_readv | _consolefs_readv( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _consolefs_readv(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_readv_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Synchronize data read with IO vector. */
if (oe_iov_sync(iov, iovcnt, buf, buf_size) != 0)
OE_RAISE_ERRNO(OE_EINVAL);
done:
if (buf)
oe_free(buf);
return ret;
} | 147 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _consolefs_write | _consolefs_write( oe_fd_t * file_ , const void * buf , size_t count) | ['file_', 'buf', 'count'] | static ssize_t _consolefs_write(oe_fd_t* file_, const void* buf, size_t count)
{
ssize_t ret = -1;
file_t* file = _cast_file(file_);
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_write_ocall(&ret, file->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 69 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _consolefs_writev | _consolefs_writev( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _consolefs_writev(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || (!iov && iovcnt) || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_writev_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 131 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _epoll_read | _epoll_read( oe_fd_t * epoll_ , void * buf , size_t count) | ['epoll_', 'buf', 'count'] | static ssize_t _epoll_read(oe_fd_t* epoll_, void* buf, size_t count)
{
ssize_t ret = -1;
epoll_t* file = _cast_epoll(epoll_);
oe_errno = 0;
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
/* Call the host. */
if (oe_syscall_read_ocall(&ret, file->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 72 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _epoll_readv | _epoll_readv( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _epoll_readv(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
epoll_t* file = _cast_epoll(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || (iovcnt && !iov) || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_readv_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Synchronize data read with IO vector. */
if (oe_iov_sync(iov, iovcnt, buf, buf_size) != 0)
OE_RAISE_ERRNO(OE_EINVAL);
done:
if (buf)
oe_free(buf);
return ret;
} | 151 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _epoll_write | _epoll_write( oe_fd_t * epoll_ , const void * buf , size_t count) | ['epoll_', 'buf', 'count'] | static ssize_t _epoll_write(oe_fd_t* epoll_, const void* buf, size_t count)
{
ssize_t ret = -1;
epoll_t* epoll = _cast_epoll(epoll_);
oe_errno = 0;
/* Call the host. */
if (oe_syscall_write_ocall(&ret, epoll->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 63 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _epoll_writev | _epoll_writev( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _epoll_writev(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
epoll_t* file = _cast_epoll(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || (iovcnt && !iov) || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_writev_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 131 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_pread | _hostfs_pread( oe_fd_t * desc , void * buf , size_t count , oe_off_t offset) | ['desc', 'buf', 'count', 'offset'] | static ssize_t _hostfs_pread(
oe_fd_t* desc,
void* buf,
size_t count,
oe_off_t offset)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_pread_ocall(&ret, file->host_fd, buf, count, offset) !=
OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 73 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_pwrite | _hostfs_pwrite( oe_fd_t * desc , const void * buf , size_t count , oe_off_t offset) | ['desc', 'buf', 'count', 'offset'] | static ssize_t _hostfs_pwrite(
oe_fd_t* desc,
const void* buf,
size_t count,
oe_off_t offset)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_pwrite_ocall(&ret, file->host_fd, buf, count, offset) !=
OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 74 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_read | _hostfs_read( oe_fd_t * desc , void * buf , size_t count) | ['desc', 'buf', 'count'] | static ssize_t _hostfs_read(oe_fd_t* desc, void* buf, size_t count)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
if (!file)
OE_RAISE_ERRNO(OE_EINVAL);
/* Call the host to perform the read(). */
if (oe_syscall_read_ocall(&ret, file->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 68 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_readv | _hostfs_readv( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _hostfs_readv(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || (!iov && iovcnt) || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_readv_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Synchronize data read with IO vector. */
if (ret > 0)
{
if (oe_iov_sync(iov, iovcnt, buf, buf_size) != 0)
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 159 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_write | _hostfs_write( oe_fd_t * desc , const void * buf , size_t count) | ['desc', 'buf', 'count'] | static ssize_t _hostfs_write(oe_fd_t* desc, const void* buf, size_t count)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
/* Check parameters. */
if (!file || (count && !buf))
OE_RAISE_ERRNO(OE_EINVAL);
/* Call the host. */
if (oe_syscall_write_ocall(&ret, file->host_fd, buf, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 76 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostfs_writev | _hostfs_writev( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _hostfs_writev(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
file_t* file = _cast_file(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!file || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_writev_ocall(&ret, file->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 127 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostresolver_getaddrinfo | _hostresolver_getaddrinfo( oe_resolver_t * resolver , const char * node , const char * service , const struct oe_addrinfo * hints , struct oe_addrinfo ** res) | ['resolver', 'node', 'service', 'hints', 'res'] | static int _hostresolver_getaddrinfo(
oe_resolver_t* resolver,
const char* node,
const char* service,
const struct oe_addrinfo* hints,
struct oe_addrinfo** res)
{
int ret = OE_EAI_FAIL;
uint64_t handle = 0;
struct oe_addrinfo* head = NULL;
struct oe_addrinfo* tail = NULL;
struct oe_addrinfo* p = NULL;
OE_UNUSED(resolver);
if (res)
*res = NULL;
if (!res)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Get the handle for enumerating addrinfo structures. */
{
int retval = OE_EAI_FAIL;
if (oe_syscall_getaddrinfo_open_ocall(
&retval, node, service, hints, &handle) != OE_OK)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
if (!handle)
{
ret = retval;
goto done;
}
}
/* Enumerate addrinfo structures. */
for (;;)
{
int retval = 0;
size_t canonnamelen = 0;
if (!(p = oe_calloc(1, sizeof(struct oe_addrinfo))))
{
ret = OE_EAI_MEMORY;
goto done;
}
/* Determine required size ai_addr and ai_canonname buffers. */
if (oe_syscall_getaddrinfo_read_ocall(
&retval,
handle,
&p->ai_flags,
&p->ai_family,
&p->ai_socktype,
&p->ai_protocol,
p->ai_addrlen,
&p->ai_addrlen,
NULL,
canonnamelen,
&canonnamelen,
NULL) != OE_OK)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
/* If this is the final element in the enumeration. */
if (retval == 1)
break;
/* Expecting that addr and canonname buffers were too small. */
if (retval != -1 || oe_errno != OE_ENAMETOOLONG)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(oe_errno);
}
if (p->ai_addrlen && !(p->ai_addr = oe_calloc(1, p->ai_addrlen)))
{
ret = OE_EAI_MEMORY;
goto done;
}
if (canonnamelen && !(p->ai_canonname = oe_calloc(1, canonnamelen)))
{
ret = OE_EAI_MEMORY;
goto done;
}
if (oe_syscall_getaddrinfo_read_ocall(
&retval,
handle,
&p->ai_flags,
&p->ai_family,
&p->ai_socktype,
&p->ai_protocol,
p->ai_addrlen,
&p->ai_addrlen,
p->ai_addr,
canonnamelen,
&canonnamelen,
p->ai_canonname) != OE_OK)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Append to the list. */
if (tail)
{
tail->ai_next = p;
tail = p;
}
else
{
head = p;
tail = p;
}
p = NULL;
}
/* Close the enumeration. */
if (handle)
{
int retval = -1;
if (oe_syscall_getaddrinfo_close_ocall(&retval, handle) != OE_OK)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
handle = 0;
if (retval != 0)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(oe_errno);
}
}
/* If the list is empty. */
if (!head)
{
ret = OE_EAI_SYSTEM;
OE_RAISE_ERRNO(OE_EINVAL);
}
*res = head;
head = NULL;
tail = NULL;
ret = 0;
done:
if (handle)
{
int retval;
oe_syscall_getaddrinfo_close_ocall(&retval, handle);
}
if (head)
oe_freeaddrinfo(head);
if (p)
oe_freeaddrinfo(p);
return ret;
} | 559 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_getpeername | _hostsock_getpeername( oe_fd_t * sock_ , struct oe_sockaddr * addr , oe_socklen_t * addrlen) | ['sock_', 'addr', 'addrlen'] | static int _hostsock_getpeername(
oe_fd_t* sock_,
struct oe_sockaddr* addr,
oe_socklen_t* addrlen)
{
int ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_socklen_t addrlen_in = 0;
oe_errno = 0;
if (!sock)
OE_RAISE_ERRNO(OE_EINVAL);
if (addrlen)
addrlen_in = *addrlen;
if (oe_syscall_getpeername_ocall(
&ret,
sock->host_fd,
(struct oe_sockaddr*)addr,
addrlen_in,
addrlen) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
return ret;
} | 97 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_getsockname | _hostsock_getsockname( oe_fd_t * sock_ , struct oe_sockaddr * addr , oe_socklen_t * addrlen) | ['sock_', 'addr', 'addrlen'] | static int _hostsock_getsockname(
oe_fd_t* sock_,
struct oe_sockaddr* addr,
oe_socklen_t* addrlen)
{
int ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_socklen_t addrlen_in = 0;
oe_errno = 0;
if (!sock)
OE_RAISE_ERRNO(OE_EINVAL);
if (addrlen)
addrlen_in = *addrlen;
if (oe_syscall_getsockname_ocall(
&ret,
sock->host_fd,
(struct oe_sockaddr*)addr,
addrlen_in,
addrlen) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
return ret;
} | 97 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_getsockopt | _hostsock_getsockopt( oe_fd_t * sock_ , int level , int optname , void * optval , oe_socklen_t * optlen) | ['sock_', 'level', 'optname', 'optval', 'optlen'] | static int _hostsock_getsockopt(
oe_fd_t* sock_,
int level,
int optname,
void* optval,
oe_socklen_t* optlen)
{
int ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_socklen_t optlen_in = 0;
oe_errno = 0;
if (!sock)
OE_RAISE_ERRNO(OE_EINVAL);
if (optlen)
optlen_in = *optlen;
if (oe_syscall_getsockopt_ocall(
&ret, sock->host_fd, level, optname, optval, optlen_in, optlen) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
return ret;
} | 101 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_readv | _hostsock_readv( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _hostsock_readv(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!sock || (!iov && iovcnt) || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_recvv_ocall(&ret, sock->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
/* Synchronize data read with IO vector. */
if (ret > 0)
{
if (oe_iov_sync(iov, iovcnt, buf, buf_size) != 0)
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 159 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_recv | _hostsock_recv( oe_fd_t * sock_ , void * buf , size_t count , int flags) | ['sock_', 'buf', 'count', 'flags'] | static ssize_t _hostsock_recv(
oe_fd_t* sock_,
void* buf,
size_t count,
int flags)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_errno = 0;
if (!sock || (count && !buf))
OE_RAISE_ERRNO(OE_EINVAL);
if (buf)
{
if (oe_memset_s(buf, count, 0, count) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
}
if (oe_syscall_recv_ocall(&ret, sock->host_fd, buf, count, flags) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 110 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_recvfrom | _hostsock_recvfrom( oe_fd_t * sock_ , void * buf , size_t count , int flags , const struct oe_sockaddr * src_addr , oe_socklen_t * addrlen) | ['sock_', 'buf', 'count', 'flags', 'src_addr', 'addrlen'] | static ssize_t _hostsock_recvfrom(
oe_fd_t* sock_,
void* buf,
size_t count,
int flags,
const struct oe_sockaddr* src_addr,
oe_socklen_t* addrlen)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_socklen_t addrlen_in = 0;
oe_errno = 0;
if (!sock || (count && !buf))
OE_RAISE_ERRNO(OE_EINVAL);
if (addrlen)
addrlen_in = *addrlen;
if (oe_syscall_recvfrom_ocall(
&ret,
sock->host_fd,
buf,
count,
flags,
(struct oe_sockaddr*)src_addr,
addrlen_in,
addrlen) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
return ret;
} | 121 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_recvmsg | _hostsock_recvmsg( oe_fd_t * sock_ , struct oe_msghdr * msg , int flags) | ['sock_', 'msg', 'flags'] | static ssize_t _hostsock_recvmsg(
oe_fd_t* sock_,
struct oe_msghdr* msg,
int flags)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_errno = 0;
void* buf = NULL;
size_t buf_size = 0;
/* Check the parameters. */
if (!sock || !msg || (msg->msg_iovlen && !msg->msg_iov))
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(msg->msg_iov, (int)msg->msg_iovlen, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
{
if (oe_syscall_recvmsg_ocall(
&ret,
sock->host_fd,
msg->msg_name,
msg->msg_namelen,
&msg->msg_namelen,
buf,
msg->msg_iovlen,
buf_size,
msg->msg_control,
msg->msg_controllen,
&msg->msg_controllen,
flags) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
if (ret == -1)
OE_RAISE_ERRNO(oe_errno);
}
/* Synchronize data read with IO vector. */
if (oe_iov_sync(msg->msg_iov, (int)msg->msg_iovlen, buf, buf_size) != 0)
OE_RAISE_ERRNO(OE_EINVAL);
done:
if (buf)
oe_free(buf);
return ret;
} | 211 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_send | _hostsock_send( oe_fd_t * sock_ , const void * buf , size_t count , int flags) | ['sock_', 'buf', 'count', 'flags'] | static ssize_t _hostsock_send(
oe_fd_t* sock_,
const void* buf,
size_t count,
int flags)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_errno = 0;
if (!sock || (count && !buf))
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_send_ocall(&ret, sock->host_fd, buf, count, flags) != OE_OK)
OE_RAISE_ERRNO(OE_EINVAL);
done:
return ret;
} | 85 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_sendmsg | _hostsock_sendmsg( oe_fd_t * sock_ , const struct oe_msghdr * msg , int flags) | ['sock_', 'msg', 'flags'] | static ssize_t _hostsock_sendmsg(
oe_fd_t* sock_,
const struct oe_msghdr* msg,
int flags)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
void* buf = NULL;
size_t buf_size = 0;
oe_errno = 0;
/* Check the parameters. */
if (!sock || !msg || (msg->msg_iovlen && !msg->msg_iov))
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(msg->msg_iov, (int)msg->msg_iovlen, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_sendmsg_ocall(
&ret,
sock->host_fd,
msg->msg_name,
msg->msg_namelen,
buf,
msg->msg_iovlen,
buf_size,
msg->msg_control,
msg->msg_controllen,
flags) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 161 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_sendto | _hostsock_sendto( oe_fd_t * sock_ , const void * buf , size_t count , int flags , const struct oe_sockaddr * dest_addr , oe_socklen_t addrlen) | ['sock_', 'buf', 'count', 'flags', 'dest_addr', 'addrlen'] | static ssize_t _hostsock_sendto(
oe_fd_t* sock_,
const void* buf,
size_t count,
int flags,
const struct oe_sockaddr* dest_addr,
oe_socklen_t addrlen)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(sock_);
oe_errno = 0;
if (!sock || (count && !buf))
OE_RAISE_ERRNO(OE_EINVAL);
if (oe_syscall_sendto_ocall(
&ret,
sock->host_fd,
buf,
count,
flags,
(struct oe_sockaddr*)dest_addr,
addrlen) != OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
return ret;
} | 105 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _hostsock_writev | _hostsock_writev( oe_fd_t * desc , const struct oe_iovec * iov , int iovcnt) | ['desc', 'iov', 'iovcnt'] | static ssize_t _hostsock_writev(
oe_fd_t* desc,
const struct oe_iovec* iov,
int iovcnt)
{
ssize_t ret = -1;
sock_t* sock = _cast_sock(desc);
void* buf = NULL;
size_t buf_size = 0;
if (!sock || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX)
OE_RAISE_ERRNO(OE_EINVAL);
/* Flatten the IO vector into contiguous heap memory. */
if (oe_iov_pack(iov, iovcnt, &buf, &buf_size) != 0)
OE_RAISE_ERRNO(OE_ENOMEM);
/* Call the host. */
if (oe_syscall_sendv_ocall(&ret, sock->host_fd, buf, iovcnt, buf_size) !=
OE_OK)
{
OE_RAISE_ERRNO(OE_EINVAL);
}
done:
if (buf)
oe_free(buf);
return ret;
} | 127 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | oe_iov_pack | oe_iov_pack( const struct oe_iovec * iov , int iovcnt , void ** buf_out , size_t * buf_size_out) | ['iov', 'iovcnt', 'buf_out', 'buf_size_out'] | int oe_iov_pack(
const struct oe_iovec* iov,
int iovcnt,
void** buf_out,
size_t* buf_size_out)
{
int ret = -1;
struct oe_iovec* buf = NULL;
size_t buf_size = 0;
size_t data_size = 0;
if (buf_out)
*buf_out = NULL;
if (buf_size_out)
*buf_size_out = 0;
/* Reject invalid parameters. */
if (iovcnt < 0 || (iovcnt > 0 && !iov) || !buf_out || !buf_size_out)
goto done;
/* Handle zero-sized iovcnt up front. */
if (iovcnt == 0)
{
if (iov)
{
if (!(buf = oe_calloc(1, sizeof(uint64_t))))
goto done;
buf_size = sizeof(uint64_t);
}
*buf_out = buf;
*buf_size_out = buf_size;
buf = NULL;
ret = 0;
goto done;
}
/* Calculate the total number of data bytes. */
for (int i = 0; i < iovcnt; i++)
data_size += iov[i].iov_len;
/* Calculate the total size of the resulting buffer. */
buf_size = (sizeof(struct oe_iovec) * (size_t)iovcnt) + data_size;
/* Allocate the output buffer. */
if (!(buf = oe_calloc(1, buf_size)))
goto done;
/* Initialize the array elements. */
{
uint8_t* p = (uint8_t*)&buf[iovcnt];
size_t n = data_size;
int i;
for (i = 0; i < iovcnt; i++)
{
const size_t iov_len = iov[i].iov_len;
const void* iov_base = iov[i].iov_base;
if (iov_len)
{
buf[i].iov_len = iov_len;
buf[i].iov_base = (void*)(p - (uint8_t*)buf);
if (!iov_base)
goto done;
if (oe_memcpy_s(p, n, iov_base, iov_len) != OE_OK)
goto done;
p += iov_len;
n -= iov_len;
}
}
/* Fail if the data was not exhausted. */
if (n != 0)
goto done;
}
*buf_out = buf;
*buf_size_out = buf_size;
buf = NULL;
ret = 0;
done:
if (buf)
oe_free(buf);
return ret;
} | 378 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | oe_iov_sync | oe_iov_sync( const struct oe_iovec * iov , int iovcnt , const void * buf_ , size_t buf_size) | ['iov', 'iovcnt', 'buf_', 'buf_size'] | int oe_iov_sync(
const struct oe_iovec* iov,
int iovcnt,
const void* buf_,
size_t buf_size)
{
struct oe_iovec* buf = (struct oe_iovec*)buf_;
int ret = -1;
int i;
size_t n;
/* Reject invalid parameters. */
if (iovcnt < 0 || (iovcnt > 0 && !iov))
goto done;
/* Synchronize the data. */
for (i = 0, n = buf_size; i < iovcnt; i++)
{
if (buf[i].iov_len != iov[i].iov_len)
goto done;
if (buf[i].iov_len)
{
if (buf[i].iov_base && !iov[i].iov_base)
goto done;
if (!buf[i].iov_base && iov[i].iov_base)
goto done;
if (!buf[i].iov_base)
continue;
/* Fail if buffer data is exhausted. */
if (n < buf[i].iov_len)
goto done;
/* Sync the base data for this element. */
{
/* Note: buf[i].iov_base is an offset here (not a pointer). */
uint8_t* src = (uint8_t*)buf[i].iov_base + (uint64_t)buf;
size_t src_size = buf[i].iov_len;
uint8_t* dest = (uint8_t*)iov[i].iov_base;
size_t dest_size = iov[i].iov_len;
if (src_size != dest_size)
goto done;
if (src < (uint8_t*)buf || src > (uint8_t*)buf + buf_size)
goto done;
if (oe_memcpy_s(dest, dest_size, src, src_size) != OE_OK)
goto done;
}
}
n -= buf[i].iov_len;
}
ret = 0;
done:
return ret;
} | 303 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | oe_recvfrom | oe_recvfrom( int sockfd , void * buf , size_t len , int flags , const struct oe_sockaddr * src_addr , oe_socklen_t * addrlen) | ['sockfd', 'buf', 'len', 'flags', 'src_addr', 'addrlen'] | ssize_t oe_recvfrom(
int sockfd,
void* buf,
size_t len,
int flags,
const struct oe_sockaddr* src_addr,
oe_socklen_t* addrlen)
{
ssize_t ret = -1;
oe_fd_t* sock;
if (!(sock = oe_fdtable_get(sockfd, OE_FD_TYPE_SOCKET)))
OE_RAISE_ERRNO(oe_errno);
ret = sock->ops.socket.recvfrom(sock, buf, len, flags, src_addr, addrlen);
done:
return ret;
} | 84 | True | 1 |
CVE-2020-15224 | False | False | False | False | AV:A/AC:L/Au:S/C:P/I:N/A:N | ADJACENT_NETWORK | LOW | SINGLE | PARTIAL | NONE | NONE | 2.7 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | ADJACENT_NETWORK | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.8 | MEDIUM | 2.3 | 4.0 | False | [{'url': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'name': 'https://github.com/openenclave/openenclave/commit/bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'name': 'https://github.com/openenclave/openenclave/security/advisories/GHSA-525h-wxcc-f66m', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'name': 'https://github.com/openenclave/openenclave/blob/master/CHANGELOG.md#v0120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:openenclave:openenclave:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.12.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In Open Enclave before version 0.12.0, an information disclosure vulnerability exists when an enclave application using the syscalls provided by the sockets.edl is loaded by a malicious host application. An attacker who successfully exploited the vulnerability could read privileged data from the enclave heap across trust boundaries. To exploit this vulnerability, an attacker would have to log on to an affected system and run a specially crafted application. The vulnerability would not allow an attacker to elevate user rights directly, but it could be used to obtain information otherwise considered confidential in an enclave, which could be used in further compromises. The issue has been addressed in version 0.12.0 and the current master branch. Users will need to to recompile their applications against the patched libraries to be protected from this vulnerability.'}] | 2021-11-18T17:00Z | 2020-10-14T19:15Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Ming-Wei Shih | 2020-10-12 13:40:03-07:00 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <[email protected]> | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | False | openenclave/openenclave | SDK for developing enclaves | 2017-08-29 20:31:38 | 2022-08-26 07:56:08 | https://openenclave.io/sdk/ | openenclave | 820.0 | 307.0 | _syscall | _syscall( long num , long arg1 , long arg2 , long arg3 , long arg4 , long arg5 , long arg6) | ['num', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6'] | static long _syscall(
long num,
long arg1,
long arg2,
long arg3,
long arg4,
long arg5,
long arg6)
{
long ret = -1;
oe_errno = 0;
/* Handle the software system call. */
switch (num)
{
#if defined(OE_SYS_creat)
case OE_SYS_creat:
{
const char* pathname = (const char*)arg1;
oe_mode_t mode = (oe_mode_t)arg2;
int flags = (OE_O_CREAT | OE_O_WRONLY | OE_O_TRUNC);
ret = oe_open(pathname, flags, mode);
if (oe_errno == OE_ENOENT)
{
/* If the file was not found, give the caller (libc) a chance
* to handle this syscall.
*/
oe_errno = OE_ENOSYS;
goto done;
}
goto done;
}
#endif
#if defined(OE_SYS_open)
case OE_SYS_open:
{
const char* pathname = (const char*)arg1;
int flags = (int)arg2;
uint32_t mode = (uint32_t)arg3;
ret = oe_open(pathname, flags, mode);
if (ret < 0 && oe_errno == OE_ENOENT)
goto done;
goto done;
}
#endif
case OE_SYS_openat:
{
int dirfd = (int)arg1;
const char* pathname = (const char*)arg2;
int flags = (int)arg3;
uint32_t mode = (uint32_t)arg4;
if (dirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
ret = oe_open(pathname, flags, mode);
if (ret < 0 && oe_errno == OE_ENOENT)
goto done;
goto done;
}
case OE_SYS_lseek:
{
int fd = (int)arg1;
ssize_t off = (ssize_t)arg2;
int whence = (int)arg3;
ret = oe_lseek(fd, off, whence);
goto done;
}
case OE_SYS_pread64:
{
const int fd = (int)arg1;
void* const buf = (void*)arg2;
const size_t count = (size_t)arg3;
const oe_off_t offset = (oe_off_t)arg4;
ret = oe_pread(fd, buf, count, offset);
goto done;
}
case OE_SYS_pwrite64:
{
const int fd = (int)arg1;
const void* const buf = (void*)arg2;
const size_t count = (size_t)arg3;
const oe_off_t offset = (oe_off_t)arg4;
ret = oe_pwrite(fd, buf, count, offset);
goto done;
}
case OE_SYS_readv:
{
int fd = (int)arg1;
const struct oe_iovec* iov = (const struct oe_iovec*)arg2;
int iovcnt = (int)arg3;
ret = oe_readv(fd, iov, iovcnt);
goto done;
}
case OE_SYS_writev:
{
int fd = (int)arg1;
const struct oe_iovec* iov = (const struct oe_iovec*)arg2;
int iovcnt = (int)arg3;
ret = oe_writev(fd, iov, iovcnt);
goto done;
}
case OE_SYS_read:
{
int fd = (int)arg1;
void* buf = (void*)arg2;
size_t count = (size_t)arg3;
ret = oe_read(fd, buf, count);
goto done;
}
case OE_SYS_write:
{
int fd = (int)arg1;
const void* buf = (void*)arg2;
size_t count = (size_t)arg3;
ret = oe_write(fd, buf, count);
goto done;
}
case OE_SYS_close:
{
int fd = (int)arg1;
ret = oe_close(fd);
goto done;
}
case OE_SYS_dup:
{
int fd = (int)arg1;
ret = oe_dup(fd);
goto done;
}
case OE_SYS_flock:
{
int fd = (int)arg1;
int operation = (int)arg2;
ret = oe_flock(fd, operation);
goto done;
}
case OE_SYS_fsync:
{
const int fd = (int)arg1;
ret = oe_fsync(fd);
goto done;
}
case OE_SYS_fdatasync:
{
const int fd = (int)arg1;
ret = oe_fdatasync(fd);
goto done;
}
#if defined(OE_SYS_dup2)
case OE_SYS_dup2:
{
int oldfd = (int)arg1;
int newfd = (int)arg2;
ret = oe_dup2(oldfd, newfd);
goto done;
}
#endif
case OE_SYS_dup3:
{
int oldfd = (int)arg1;
int newfd = (int)arg2;
int flags = (int)arg3;
if (flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
ret = oe_dup2(oldfd, newfd);
goto done;
}
#if defined(OE_SYS_stat)
case OE_SYS_stat:
{
const char* pathname = (const char*)arg1;
struct oe_stat_t* buf = (struct oe_stat_t*)arg2;
ret = oe_stat(pathname, buf);
goto done;
}
#endif
case OE_SYS_newfstatat:
{
int dirfd = (int)arg1;
const char* pathname = (const char*)arg2;
struct oe_stat_t* buf = (struct oe_stat_t*)arg3;
int flags = (int)arg4;
if (dirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
ret = oe_stat(pathname, buf);
goto done;
}
case OE_SYS_fstat:
{
const int fd = (int)arg1;
struct oe_stat_t* const buf = (struct oe_stat_t*)arg2;
ret = oe_fstat(fd, buf);
goto done;
}
#if defined(OE_SYS_link)
case OE_SYS_link:
{
const char* oldpath = (const char*)arg1;
const char* newpath = (const char*)arg2;
ret = oe_link(oldpath, newpath);
goto done;
}
#endif
case OE_SYS_linkat:
{
int olddirfd = (int)arg1;
const char* oldpath = (const char*)arg2;
int newdirfd = (int)arg3;
const char* newpath = (const char*)arg4;
int flags = (int)arg5;
if (olddirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (newdirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
ret = oe_link(oldpath, newpath);
goto done;
}
#if defined(OE_SYS_unlink)
case OE_SYS_unlink:
{
const char* pathname = (const char*)arg1;
ret = oe_unlink(pathname);
goto done;
}
#endif
case OE_SYS_unlinkat:
{
int dirfd = (int)arg1;
const char* pathname = (const char*)arg2;
int flags = (int)arg3;
if (dirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (flags != OE_AT_REMOVEDIR && flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
if (flags == OE_AT_REMOVEDIR)
ret = oe_rmdir(pathname);
else
ret = oe_unlink(pathname);
goto done;
}
#if defined(OE_SYS_rename)
case OE_SYS_rename:
{
const char* oldpath = (const char*)arg1;
const char* newpath = (const char*)arg2;
ret = oe_rename(oldpath, newpath);
goto done;
}
#endif
case OE_SYS_renameat:
{
int olddirfd = (int)arg1;
const char* oldpath = (const char*)arg2;
int newdirfd = (int)arg3;
const char* newpath = (const char*)arg4;
int flags = (int)arg5;
if (olddirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (newdirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
ret = oe_rename(oldpath, newpath);
goto done;
}
case OE_SYS_truncate:
{
const char* path = (const char*)arg1;
ssize_t length = (ssize_t)arg2;
ret = oe_truncate(path, length);
goto done;
}
#if defined(OE_SYS_mkdir)
case OE_SYS_mkdir:
{
const char* pathname = (const char*)arg1;
uint32_t mode = (uint32_t)arg2;
ret = oe_mkdir(pathname, mode);
goto done;
}
#endif
case OE_SYS_mkdirat:
{
int dirfd = (int)arg1;
const char* pathname = (const char*)arg2;
uint32_t mode = (uint32_t)arg3;
if (dirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
ret = oe_mkdir(pathname, mode);
goto done;
}
#if defined(OE_SYS_rmdir)
case OE_SYS_rmdir:
{
const char* pathname = (const char*)arg1;
ret = oe_rmdir(pathname);
goto done;
}
#endif
#if defined(OE_SYS_access)
case OE_SYS_access:
{
const char* pathname = (const char*)arg1;
int mode = (int)arg2;
ret = oe_access(pathname, mode);
goto done;
}
#endif
case OE_SYS_faccessat:
{
int dirfd = (int)arg1;
const char* pathname = (const char*)arg2;
int mode = (int)arg3;
int flags = (int)arg4;
if (dirfd != OE_AT_FDCWD)
{
oe_errno = OE_EBADF;
goto done;
}
if (flags != 0)
{
oe_errno = OE_EINVAL;
goto done;
}
ret = oe_access(pathname, mode);
goto done;
}
case OE_SYS_getdents64:
{
unsigned int fd = (unsigned int)arg1;
struct oe_dirent* ent = (struct oe_dirent*)arg2;
unsigned int count = (unsigned int)arg3;
ret = oe_getdents64(fd, ent, count);
goto done;
}
case OE_SYS_ioctl:
{
int fd = (int)arg1;
unsigned long request = (unsigned long)arg2;
long p1 = arg3;
long p2 = arg4;
long p3 = arg5;
long p4 = arg6;
ret = oe_ioctl(fd, request, p1, p2, p3, p4);
goto done;
}
case OE_SYS_fcntl:
{
int fd = (int)arg1;
int cmd = (int)arg2;
uint64_t arg = (uint64_t)arg3;
ret = oe_fcntl(fd, cmd, arg);
goto done;
}
case OE_SYS_mount:
{
const char* source = (const char*)arg1;
const char* target = (const char*)arg2;
const char* fstype = (const char*)arg3;
unsigned long flags = (unsigned long)arg4;
void* data = (void*)arg5;
ret = oe_mount(source, target, fstype, flags, data);
goto done;
}
case OE_SYS_umount2:
{
const char* target = (const char*)arg1;
int flags = (int)arg2;
(void)flags;
ret = oe_umount(target);
goto done;
}
case OE_SYS_getcwd:
{
char* buf = (char*)arg1;
size_t size = (size_t)arg2;
if (!oe_getcwd(buf, size))
{
ret = -1;
}
else
{
ret = (long)size;
}
goto done;
}
case OE_SYS_chdir:
{
char* path = (char*)arg1;
ret = oe_chdir(path);
goto done;
}
case OE_SYS_socket:
{
int domain = (int)arg1;
int type = (int)arg2;
int protocol = (int)arg3;
ret = oe_socket(domain, type, protocol);
goto done;
}
case OE_SYS_connect:
{
int sd = (int)arg1;
const struct oe_sockaddr* addr = (const struct oe_sockaddr*)arg2;
oe_socklen_t addrlen = (oe_socklen_t)arg3;
ret = oe_connect(sd, addr, addrlen);
goto done;
}
case OE_SYS_setsockopt:
{
int sockfd = (int)arg1;
int level = (int)arg2;
int optname = (int)arg3;
void* optval = (void*)arg4;
oe_socklen_t optlen = (oe_socklen_t)arg5;
ret = oe_setsockopt(sockfd, level, optname, optval, optlen);
goto done;
}
case OE_SYS_getsockopt:
{
int sockfd = (int)arg1;
int level = (int)arg2;
int optname = (int)arg3;
void* optval = (void*)arg4;
oe_socklen_t* optlen = (oe_socklen_t*)arg5;
ret = oe_getsockopt(sockfd, level, optname, optval, optlen);
goto done;
}
case OE_SYS_getpeername:
{
int sockfd = (int)arg1;
struct sockaddr* addr = (struct sockaddr*)arg2;
oe_socklen_t* addrlen = (oe_socklen_t*)arg3;
ret = oe_getpeername(sockfd, (struct oe_sockaddr*)addr, addrlen);
goto done;
}
case OE_SYS_getsockname:
{
int sockfd = (int)arg1;
struct sockaddr* addr = (struct sockaddr*)arg2;
oe_socklen_t* addrlen = (oe_socklen_t*)arg3;
ret = oe_getsockname(sockfd, (struct oe_sockaddr*)addr, addrlen);
goto done;
}
case OE_SYS_bind:
{
int sockfd = (int)arg1;
struct oe_sockaddr* addr = (struct oe_sockaddr*)arg2;
oe_socklen_t addrlen = (oe_socklen_t)arg3;
ret = oe_bind(sockfd, addr, addrlen);
goto done;
}
case OE_SYS_listen:
{
int sockfd = (int)arg1;
int backlog = (int)arg2;
ret = oe_listen(sockfd, backlog);
goto done;
}
case OE_SYS_accept:
{
int sockfd = (int)arg1;
struct oe_sockaddr* addr = (struct oe_sockaddr*)arg2;
oe_socklen_t* addrlen = (oe_socklen_t*)arg3;
ret = oe_accept(sockfd, addr, addrlen);
goto done;
}
case OE_SYS_sendto:
{
int sockfd = (int)arg1;
const void* buf = (void*)arg2;
size_t len = (size_t)arg3;
int flags = (int)arg4;
const struct oe_sockaddr* dest_add =
(const struct oe_sockaddr*)arg5;
oe_socklen_t addrlen = (oe_socklen_t)arg6;
ret = oe_sendto(sockfd, buf, len, flags, dest_add, addrlen);
goto done;
}
case OE_SYS_recvfrom:
{
int sockfd = (int)arg1;
void* buf = (void*)arg2;
size_t len = (size_t)arg3;
int flags = (int)arg4;
const struct oe_sockaddr* dest_add =
(const struct oe_sockaddr*)arg5;
oe_socklen_t* addrlen = (oe_socklen_t*)arg6;
ret = oe_recvfrom(sockfd, buf, len, flags, dest_add, addrlen);
goto done;
}
case OE_SYS_sendmsg:
{
int sockfd = (int)arg1;
struct msghdr* buf = (struct msghdr*)arg2;
int flags = (int)arg3;
ret = oe_sendmsg(sockfd, (struct oe_msghdr*)buf, flags);
goto done;
}
case OE_SYS_recvmsg:
{
int sockfd = (int)arg1;
struct msghdr* buf = (struct msghdr*)arg2;
int flags = (int)arg3;
ret = oe_recvmsg(sockfd, (struct oe_msghdr*)buf, flags);
goto done;
}
case OE_SYS_socketpair:
{
int domain = (int)arg1;
int type = (int)arg2;
int protocol = (int)arg3;
int* sv = (int*)arg4;
ret = oe_socketpair(domain, type, protocol, sv);
goto done;
}
case OE_SYS_shutdown:
{
int sockfd = (int)arg1;
int how = (int)arg2;
ret = oe_shutdown(sockfd, how);
goto done;
}
case OE_SYS_uname:
{
struct oe_utsname* buf = (struct oe_utsname*)arg1;
ret = oe_uname(buf);
goto done;
}
#if defined(OE_SYS_select)
case OE_SYS_select:
{
int nfds = (int)arg1;
oe_fd_set* readfds = (oe_fd_set*)arg2;
oe_fd_set* writefds = (oe_fd_set*)arg3;
oe_fd_set* efds = (oe_fd_set*)arg4;
struct oe_timeval* timeout = (struct oe_timeval*)arg5;
ret = oe_select(nfds, readfds, writefds, efds, timeout);
goto done;
}
#endif
case OE_SYS_pselect6:
{
int nfds = (int)arg1;
oe_fd_set* readfds = (oe_fd_set*)arg2;
oe_fd_set* writefds = (oe_fd_set*)arg3;
oe_fd_set* exceptfds = (oe_fd_set*)arg4;
struct oe_timespec* ts = (struct oe_timespec*)arg5;
struct oe_timeval buf;
struct oe_timeval* tv = NULL;
if (ts)
{
tv = &buf;
tv->tv_sec = ts->tv_sec;
tv->tv_usec = ts->tv_nsec / 1000;
}
ret = oe_select(nfds, readfds, writefds, exceptfds, tv);
goto done;
}
#if defined(OE_SYS_poll)
case OE_SYS_poll:
{
struct oe_pollfd* fds = (struct oe_pollfd*)arg1;
oe_nfds_t nfds = (oe_nfds_t)arg2;
int millis = (int)arg3;
ret = oe_poll(fds, nfds, millis);
goto done;
}
#endif
case OE_SYS_ppoll:
{
struct oe_pollfd* fds = (struct oe_pollfd*)arg1;
oe_nfds_t nfds = (oe_nfds_t)arg2;
struct oe_timespec* ts = (struct oe_timespec*)arg3;
void* sigmask = (void*)arg4;
int timeout = -1;
if (sigmask != NULL)
{
oe_errno = OE_EINVAL;
goto done;
}
if (ts)
{
int64_t mul;
int64_t div;
int64_t sum;
if (oe_safe_mul_s64(ts->tv_sec, 1000, &mul) != OE_OK)
{
oe_errno = OE_EINVAL;
goto done;
}
div = ts->tv_nsec / 1000000;
if (oe_safe_add_s64(mul, div, &sum) != OE_OK)
{
oe_errno = OE_EINVAL;
goto done;
}
if (sum < OE_INT_MIN || sum > OE_INT_MAX)
{
oe_errno = OE_EINVAL;
goto done;
}
timeout = (int)sum;
}
ret = oe_poll(fds, nfds, timeout);
goto done;
}
#if defined(OE_SYS_epoll_create)
case OE_SYS_epoll_create:
{
int size = (int)arg1;
ret = oe_epoll_create(size);
goto done;
}
#endif
case OE_SYS_epoll_create1:
{
int flags = (int)arg1;
ret = oe_epoll_create1(flags);
goto done;
}
#if defined(OE_SYS_epoll_wait)
case OE_SYS_epoll_wait:
{
int epfd = (int)arg1;
struct oe_epoll_event* events = (struct oe_epoll_event*)arg2;
int maxevents = (int)arg3;
int timeout = (int)arg4;
ret = oe_epoll_wait(epfd, events, maxevents, timeout);
goto done;
}
#endif
case OE_SYS_epoll_pwait:
{
int epfd = (int)arg1;
struct oe_epoll_event* events = (struct oe_epoll_event*)arg2;
int maxevents = (int)arg3;
int timeout = (int)arg4;
const oe_sigset_t* sigmask = (const oe_sigset_t*)arg5;
ret = oe_epoll_pwait(epfd, events, maxevents, timeout, sigmask);
goto done;
}
case OE_SYS_epoll_ctl:
{
int epfd = (int)arg1;
int op = (int)arg2;
int fd = (int)arg3;
struct oe_epoll_event* event = (struct oe_epoll_event*)arg4;
ret = oe_epoll_ctl(epfd, op, fd, event);
goto done;
}
case OE_SYS_exit_group:
{
ret = 0;
goto done;
}
case OE_SYS_exit:
{
int status = (int)arg1;
oe_exit(status);
goto done;
}
case OE_SYS_getpid:
{
ret = (long)oe_getpid();
goto done;
}
case OE_SYS_getuid:
{
ret = (long)oe_getuid();
goto done;
}
case OE_SYS_geteuid:
{
ret = (long)oe_geteuid();
goto done;
}
case OE_SYS_getgid:
{
ret = (long)oe_getgid();
goto done;
}
case OE_SYS_getpgid:
{
int pid = (int)arg1;
ret = (long)oe_getpgid(pid);
goto done;
}
case OE_SYS_getgroups:
{
int size = (int)arg1;
oe_gid_t* list = (oe_gid_t*)arg2;
ret = (long)oe_getgroups(size, list);
goto done;
}
case OE_SYS_getegid:
{
ret = (long)oe_getegid();
goto done;
}
case OE_SYS_getppid:
{
ret = (long)oe_getppid();
goto done;
}
#if defined(OE_SYS_getpgrp)
case OE_SYS_getpgrp:
{
ret = (long)oe_getpgrp();
goto done;
}
#endif
case OE_SYS_nanosleep:
{
struct oe_timespec* req = (struct oe_timespec*)arg1;
struct oe_timespec* rem = (struct oe_timespec*)arg2;
ret = (long)oe_nanosleep(req, rem);
goto done;
}
default:
{
oe_errno = OE_ENOSYS;
OE_TRACE_WARNING("syscall num=%ld not handled", num);
goto done;
}
}
/* Unreachable */
done:
return ret;
} | 3809 | True | 1 |
CVE-2021-21375 | 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/pjsip/pjproject/commit/97b3d7addbaa720b7ddb0af9bf6f3e443e664365', 'name': 'https://github.com/pjsip/pjproject/commit/97b3d7addbaa720b7ddb0af9bf6f3e443e664365', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-hvq6-f89p-frvp', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-hvq6-f89p-frvp', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2021/04/msg00023.html', 'name': '[debian-lts-announce] 20210423 [SECURITY] [DLA 2636-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2021/05/msg00020.html', 'name': '[debian-lts-announce] 20210523 [SECURITY] [DLA 2665-1] ring security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-42', 'name': 'GLSA-202107-42', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}, {'lang': 'en', 'value': 'CWE-400'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP version 2.10 and earlier, after an initial INVITE has been sent, when two 183 responses are received, with the first one causing negotiation failure, a crash will occur. This results in a denial of service.'}] | 2021-09-02T18:33Z | 2021-03-10T23:15Z | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the software, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.
There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the resource.
| https://cwe.mitre.org/data/definitions/400.html | 0 | Nanang Izzuddin | 2021-03-08 16:09:34+07:00 | Merge pull request from GHSA-hvq6-f89p-frvp | 97b3d7addbaa720b7ddb0af9bf6f3e443e664365 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjmedia_sdp_neg_modify_local_offer2 | pjmedia_sdp_neg_modify_local_offer2( pj_pool_t * pool , pjmedia_sdp_neg * neg , unsigned flags , const pjmedia_sdp_session * local) | ['pool', 'neg', 'flags', 'local'] | PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2(
pj_pool_t *pool,
pjmedia_sdp_neg *neg,
unsigned flags,
const pjmedia_sdp_session *local)
{
pjmedia_sdp_session *new_offer;
pjmedia_sdp_session *old_offer;
char media_used[PJMEDIA_MAX_SDP_MEDIA];
unsigned oi; /* old offer media index */
pj_status_t status;
/* Check arguments are valid. */
PJ_ASSERT_RETURN(pool && neg && local, PJ_EINVAL);
/* Can only do this in STATE_DONE. */
PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_DONE,
PJMEDIA_SDPNEG_EINSTATE);
/* Validate the new offer */
status = pjmedia_sdp_validate(local);
if (status != PJ_SUCCESS)
return status;
/* Change state to STATE_LOCAL_OFFER */
neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
/* Init vars */
pj_bzero(media_used, sizeof(media_used));
old_offer = neg->active_local_sdp;
new_offer = pjmedia_sdp_session_clone(pool, local);
/* RFC 3264 Section 8: When issuing an offer that modifies the session,
* the "o=" line of the new SDP MUST be identical to that in the
* previous SDP, except that the version in the origin field MUST
* increment by one from the previous SDP.
*/
pj_strdup(pool, &new_offer->origin.user, &old_offer->origin.user);
new_offer->origin.id = old_offer->origin.id;
pj_strdup(pool, &new_offer->origin.net_type, &old_offer->origin.net_type);
pj_strdup(pool, &new_offer->origin.addr_type,&old_offer->origin.addr_type);
pj_strdup(pool, &new_offer->origin.addr, &old_offer->origin.addr);
if ((flags & PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE) == 0) {
/* Generating the new offer, in the case media lines doesn't match the
* active SDP (e.g. current/active SDP's have m=audio and m=video lines,
* and the new offer only has m=audio line), the negotiator will fix
* the new offer by reordering and adding the missing media line with
* port number set to zero.
*/
for (oi = 0; oi < old_offer->media_count; ++oi) {
pjmedia_sdp_media *om;
pjmedia_sdp_media *nm;
unsigned ni; /* new offer media index */
pj_bool_t found = PJ_FALSE;
om = old_offer->media[oi];
for (ni = oi; ni < new_offer->media_count; ++ni) {
nm = new_offer->media[ni];
if (pj_strcmp(&nm->desc.media, &om->desc.media) == 0) {
if (ni != oi) {
/* The same media found but the position unmatched to
* the old offer, so let's put this media in the right
* place, and keep the order of the rest.
*/
pj_array_insert(
new_offer->media, /* array */
sizeof(new_offer->media[0]), /* elmt size*/
ni, /* count */
oi, /* pos */
&nm); /* new elmt */
}
found = PJ_TRUE;
break;
}
}
if (!found) {
pjmedia_sdp_media *m;
m = sdp_media_clone_deactivate(pool, om, om, local);
pj_array_insert(new_offer->media, sizeof(new_offer->media[0]),
new_offer->media_count++, oi, &m);
}
}
} else {
/* If media type change is allowed, the negotiator only needs to fix
* the new offer by adding the missing media line(s) with port number
* set to zero.
*/
for (oi = new_offer->media_count; oi < old_offer->media_count; ++oi) {
pjmedia_sdp_media *m;
m = sdp_media_clone_deactivate(pool, old_offer->media[oi],
old_offer->media[oi], local);
pj_array_insert(new_offer->media, sizeof(new_offer->media[0]),
new_offer->media_count++, oi, &m);
}
}
/* New_offer fixed */
#if PJMEDIA_SDP_NEG_COMPARE_BEFORE_INC_VERSION
new_offer->origin.version = old_offer->origin.version;
if (pjmedia_sdp_session_cmp(new_offer, neg->initial_sdp, 0) != PJ_SUCCESS)
{
++new_offer->origin.version;
}
#else
new_offer->origin.version = old_offer->origin.version + 1;
#endif
neg->initial_sdp_tmp = neg->initial_sdp;
neg->initial_sdp = new_offer;
neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, new_offer);
return PJ_SUCCESS;
} | 542 | True | 1 |
CVE-2020-15260 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:P/A:N | NETWORK | MEDIUM | NONE | NONE | PARTIAL | NONE | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N | NETWORK | HIGH | NONE | NONE | CHANGED | NONE | HIGH | NONE | 6.8 | MEDIUM | 2.2 | 4.0 | False | [{'url': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'name': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2663', 'name': 'https://github.com/pjsip/pjproject/pull/2663', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-42', 'name': 'GLSA-202107-42', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-295'}, {'lang': 'en', 'value': 'CWE-297'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In version 2.10 and earlier, PJSIP transport can be reused if they have the same IP address + port + protocol. However, this is insufficient for secure transport since it lacks remote hostname authentication. Suppose we have created a TLS connection to `sip.foo.com`, which has an IP address `100.1.1.1`. If we want to create a TLS connection to another hostname, say `sip.bar.com`, which has the same IP address, then it will reuse that existing connection, even though `100.1.1.1` does not have certificate to authenticate as `sip.bar.com`. The vulnerability allows for an insecure interaction without user awareness. It affects users who need access to connections to different destinations that translate to the same address, and allows man-in-the-middle attack if attacker can route a connection to another destination such as in the case of DNS spoofing.'}] | 2022-07-22T12:49Z | 2021-03-10T23:15Z | Improper Certificate Validation | The software does not validate, or incorrectly validates, a certificate. | When a certificate is invalid or malicious, it might allow an attacker to spoof a trusted entity by interfering in the communication path between the host and client. The software might connect to a malicious host while believing it is a trusted host, or the software might be deceived into accepting spoofed data that appears to originate from a trusted host.
| https://cwe.mitre.org/data/definitions/295.html | 0 | sauwming | 2021-03-08 17:39:36+08:00 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjsip_endpt_send_request_stateless | pjsip_endpt_send_request_stateless( pjsip_endpoint * endpt , pjsip_tx_data * tdata , void * token , pjsip_send_callback cb) | ['endpt', 'tdata', 'token', 'cb'] | PJ_DEF(pj_status_t) pjsip_endpt_send_request_stateless(pjsip_endpoint *endpt,
pjsip_tx_data *tdata,
void *token,
pjsip_send_callback cb)
{
pjsip_host_info dest_info;
pjsip_send_state *stateless_data;
pj_status_t status;
PJ_ASSERT_RETURN(endpt && tdata, PJ_EINVAL);
/* Get destination name to contact. */
status = pjsip_process_route_set(tdata, &dest_info);
if (status != PJ_SUCCESS)
return status;
/* Keep stateless data. */
stateless_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsip_send_state);
stateless_data->token = token;
stateless_data->endpt = endpt;
stateless_data->tdata = tdata;
stateless_data->app_cb = cb;
/* If destination info has not been initialized (this applies for most
* all requests except CANCEL), resolve destination host. The processing
* then resumed when the resolving callback is called. For CANCEL, the
* destination info must have been copied from the original INVITE so
* proceed to sending the request directly.
*/
if (tdata->dest_info.addr.count == 0) {
/* Copy the destination host name to TX data */
pj_strdup(tdata->pool, &tdata->dest_info.name, &dest_info.addr.host);
pjsip_endpt_resolve( endpt, tdata->pool, &dest_info, stateless_data,
&stateless_send_resolver_callback);
} else {
PJ_LOG(5,(THIS_FILE, "%s: skipping target resolution because "
"address is already set",
pjsip_tx_data_get_info(tdata)));
stateless_send_resolver_callback(PJ_SUCCESS, stateless_data,
&tdata->dest_info.addr);
}
return PJ_SUCCESS;
} | 180 | True | 1 |
CVE-2020-15260 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:P/A:N | NETWORK | MEDIUM | NONE | NONE | PARTIAL | NONE | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N | NETWORK | HIGH | NONE | NONE | CHANGED | NONE | HIGH | NONE | 6.8 | MEDIUM | 2.2 | 4.0 | False | [{'url': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'name': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2663', 'name': 'https://github.com/pjsip/pjproject/pull/2663', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-42', 'name': 'GLSA-202107-42', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-295'}, {'lang': 'en', 'value': 'CWE-297'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In version 2.10 and earlier, PJSIP transport can be reused if they have the same IP address + port + protocol. However, this is insufficient for secure transport since it lacks remote hostname authentication. Suppose we have created a TLS connection to `sip.foo.com`, which has an IP address `100.1.1.1`. If we want to create a TLS connection to another hostname, say `sip.bar.com`, which has the same IP address, then it will reuse that existing connection, even though `100.1.1.1` does not have certificate to authenticate as `sip.bar.com`. The vulnerability allows for an insecure interaction without user awareness. It affects users who need access to connections to different destinations that translate to the same address, and allows man-in-the-middle attack if attacker can route a connection to another destination such as in the case of DNS spoofing.'}] | 2022-07-22T12:49Z | 2021-03-10T23:15Z | Improper Validation of Certificate with Host Mismatch | The software communicates with a host that provides a certificate, but the software does not properly ensure that the certificate is actually associated with that host. |
Even if a certificate is well-formed, signed, and follows the chain of trust, it may simply be a valid certificate for a different site than the site that the software is interacting with. If the certificate's host-specific data is not properly checked - such as the Common Name (CN) in the Subject or the Subject Alternative Name (SAN) extension of an X.509 certificate - it may be possible for a redirection or spoofing attack to allow a malicious host with a valid certificate to provide data, impersonating a trusted host. In order to ensure data integrity, the certificate must be valid and it must pertain to the site that is being accessed.
Even if the software attempts to check the hostname, it is still possible to incorrectly check the hostname. For example, attackers could create a certificate with a name that begins with a trusted name followed by a NUL byte, which could cause some string-based comparisons to only examine the portion that contains the trusted name.
This weakness can occur even when the software uses Certificate Pinning, if the software does not verify the hostname at the time a certificate is pinned.
| https://cwe.mitre.org/data/definitions/297.html | 0 | sauwming | 2021-03-08 17:39:36+08:00 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjsip_endpt_send_request_stateless | pjsip_endpt_send_request_stateless( pjsip_endpoint * endpt , pjsip_tx_data * tdata , void * token , pjsip_send_callback cb) | ['endpt', 'tdata', 'token', 'cb'] | PJ_DEF(pj_status_t) pjsip_endpt_send_request_stateless(pjsip_endpoint *endpt,
pjsip_tx_data *tdata,
void *token,
pjsip_send_callback cb)
{
pjsip_host_info dest_info;
pjsip_send_state *stateless_data;
pj_status_t status;
PJ_ASSERT_RETURN(endpt && tdata, PJ_EINVAL);
/* Get destination name to contact. */
status = pjsip_process_route_set(tdata, &dest_info);
if (status != PJ_SUCCESS)
return status;
/* Keep stateless data. */
stateless_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsip_send_state);
stateless_data->token = token;
stateless_data->endpt = endpt;
stateless_data->tdata = tdata;
stateless_data->app_cb = cb;
/* If destination info has not been initialized (this applies for most
* all requests except CANCEL), resolve destination host. The processing
* then resumed when the resolving callback is called. For CANCEL, the
* destination info must have been copied from the original INVITE so
* proceed to sending the request directly.
*/
if (tdata->dest_info.addr.count == 0) {
/* Copy the destination host name to TX data */
pj_strdup(tdata->pool, &tdata->dest_info.name, &dest_info.addr.host);
pjsip_endpt_resolve( endpt, tdata->pool, &dest_info, stateless_data,
&stateless_send_resolver_callback);
} else {
PJ_LOG(5,(THIS_FILE, "%s: skipping target resolution because "
"address is already set",
pjsip_tx_data_get_info(tdata)));
stateless_send_resolver_callback(PJ_SUCCESS, stateless_data,
&tdata->dest_info.addr);
}
return PJ_SUCCESS;
} | 180 | True | 1 |
CVE-2020-15260 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:P/A:N | NETWORK | MEDIUM | NONE | NONE | PARTIAL | NONE | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N | NETWORK | HIGH | NONE | NONE | CHANGED | NONE | HIGH | NONE | 6.8 | MEDIUM | 2.2 | 4.0 | False | [{'url': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'name': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2663', 'name': 'https://github.com/pjsip/pjproject/pull/2663', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-42', 'name': 'GLSA-202107-42', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-295'}, {'lang': 'en', 'value': 'CWE-297'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In version 2.10 and earlier, PJSIP transport can be reused if they have the same IP address + port + protocol. However, this is insufficient for secure transport since it lacks remote hostname authentication. Suppose we have created a TLS connection to `sip.foo.com`, which has an IP address `100.1.1.1`. If we want to create a TLS connection to another hostname, say `sip.bar.com`, which has the same IP address, then it will reuse that existing connection, even though `100.1.1.1` does not have certificate to authenticate as `sip.bar.com`. The vulnerability allows for an insecure interaction without user awareness. It affects users who need access to connections to different destinations that translate to the same address, and allows man-in-the-middle attack if attacker can route a connection to another destination such as in the case of DNS spoofing.'}] | 2022-07-22T12:49Z | 2021-03-10T23:15Z | Improper Certificate Validation | The software does not validate, or incorrectly validates, a certificate. | When a certificate is invalid or malicious, it might allow an attacker to spoof a trusted entity by interfering in the communication path between the host and client. The software might connect to a malicious host while believing it is a trusted host, or the software might be deceived into accepting spoofed data that appears to originate from a trusted host.
| https://cwe.mitre.org/data/definitions/295.html | 0 | sauwming | 2021-03-08 17:39:36+08:00 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjsip_endpt_send_response | pjsip_endpt_send_response( pjsip_endpoint * endpt , pjsip_response_addr * res_addr , pjsip_tx_data * tdata , void * token , pjsip_send_callback cb) | ['endpt', 'res_addr', 'tdata', 'token', 'cb'] | PJ_DEF(pj_status_t) pjsip_endpt_send_response( pjsip_endpoint *endpt,
pjsip_response_addr *res_addr,
pjsip_tx_data *tdata,
void *token,
pjsip_send_callback cb)
{
/* Determine which transports and addresses to send the response,
* based on Section 18.2.2 of RFC 3261.
*/
pjsip_send_state *send_state;
pj_status_t status;
/* Create structure to keep the sending state. */
send_state = PJ_POOL_ZALLOC_T(tdata->pool, pjsip_send_state);
send_state->endpt = endpt;
send_state->tdata = tdata;
send_state->token = token;
send_state->app_cb = cb;
if (res_addr->transport != NULL) {
send_state->cur_transport = res_addr->transport;
pjsip_transport_add_ref(send_state->cur_transport);
status = pjsip_transport_send( send_state->cur_transport, tdata,
&res_addr->addr,
res_addr->addr_len,
send_state,
&send_response_transport_cb );
if (status == PJ_SUCCESS) {
pj_ssize_t sent = tdata->buf.cur - tdata->buf.start;
send_response_transport_cb(send_state, tdata, sent);
return PJ_SUCCESS;
} else if (status == PJ_EPENDING) {
/* Callback will be called later. */
return PJ_SUCCESS;
} else {
pjsip_transport_dec_ref(send_state->cur_transport);
return status;
}
} else {
/* Copy the destination host name to TX data */
pj_strdup(tdata->pool, &tdata->dest_info.name,
&res_addr->dst_host.addr.host);
pjsip_endpt_resolve(endpt, tdata->pool, &res_addr->dst_host,
send_state, &send_response_resolver_cb);
return PJ_SUCCESS;
}
} | 222 | True | 1 |
CVE-2020-15260 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:P/A:N | NETWORK | MEDIUM | NONE | NONE | PARTIAL | NONE | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N | NETWORK | HIGH | NONE | NONE | CHANGED | NONE | HIGH | NONE | 6.8 | MEDIUM | 2.2 | 4.0 | False | [{'url': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'name': 'https://github.com/pjsip/pjproject/commit/67e46c1ac45ad784db5b9080f5ed8b133c122872', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2663', 'name': 'https://github.com/pjsip/pjproject/pull/2663', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8hcp-hm38-mfph', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202107-42', 'name': 'GLSA-202107-42', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-295'}, {'lang': 'en', 'value': 'CWE-297'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.10', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In version 2.10 and earlier, PJSIP transport can be reused if they have the same IP address + port + protocol. However, this is insufficient for secure transport since it lacks remote hostname authentication. Suppose we have created a TLS connection to `sip.foo.com`, which has an IP address `100.1.1.1`. If we want to create a TLS connection to another hostname, say `sip.bar.com`, which has the same IP address, then it will reuse that existing connection, even though `100.1.1.1` does not have certificate to authenticate as `sip.bar.com`. The vulnerability allows for an insecure interaction without user awareness. It affects users who need access to connections to different destinations that translate to the same address, and allows man-in-the-middle attack if attacker can route a connection to another destination such as in the case of DNS spoofing.'}] | 2022-07-22T12:49Z | 2021-03-10T23:15Z | Improper Validation of Certificate with Host Mismatch | The software communicates with a host that provides a certificate, but the software does not properly ensure that the certificate is actually associated with that host. |
Even if a certificate is well-formed, signed, and follows the chain of trust, it may simply be a valid certificate for a different site than the site that the software is interacting with. If the certificate's host-specific data is not properly checked - such as the Common Name (CN) in the Subject or the Subject Alternative Name (SAN) extension of an X.509 certificate - it may be possible for a redirection or spoofing attack to allow a malicious host with a valid certificate to provide data, impersonating a trusted host. In order to ensure data integrity, the certificate must be valid and it must pertain to the site that is being accessed.
Even if the software attempts to check the hostname, it is still possible to incorrectly check the hostname. For example, attackers could create a certificate with a name that begins with a trusted name followed by a NUL byte, which could cause some string-based comparisons to only examine the portion that contains the trusted name.
This weakness can occur even when the software uses Certificate Pinning, if the software does not verify the hostname at the time a certificate is pinned.
| https://cwe.mitre.org/data/definitions/297.html | 0 | sauwming | 2021-03-08 17:39:36+08:00 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjsip_endpt_send_response | pjsip_endpt_send_response( pjsip_endpoint * endpt , pjsip_response_addr * res_addr , pjsip_tx_data * tdata , void * token , pjsip_send_callback cb) | ['endpt', 'res_addr', 'tdata', 'token', 'cb'] | PJ_DEF(pj_status_t) pjsip_endpt_send_response( pjsip_endpoint *endpt,
pjsip_response_addr *res_addr,
pjsip_tx_data *tdata,
void *token,
pjsip_send_callback cb)
{
/* Determine which transports and addresses to send the response,
* based on Section 18.2.2 of RFC 3261.
*/
pjsip_send_state *send_state;
pj_status_t status;
/* Create structure to keep the sending state. */
send_state = PJ_POOL_ZALLOC_T(tdata->pool, pjsip_send_state);
send_state->endpt = endpt;
send_state->tdata = tdata;
send_state->token = token;
send_state->app_cb = cb;
if (res_addr->transport != NULL) {
send_state->cur_transport = res_addr->transport;
pjsip_transport_add_ref(send_state->cur_transport);
status = pjsip_transport_send( send_state->cur_transport, tdata,
&res_addr->addr,
res_addr->addr_len,
send_state,
&send_response_transport_cb );
if (status == PJ_SUCCESS) {
pj_ssize_t sent = tdata->buf.cur - tdata->buf.start;
send_response_transport_cb(send_state, tdata, sent);
return PJ_SUCCESS;
} else if (status == PJ_EPENDING) {
/* Callback will be called later. */
return PJ_SUCCESS;
} else {
pjsip_transport_dec_ref(send_state->cur_transport);
return status;
}
} else {
/* Copy the destination host name to TX data */
pj_strdup(tdata->pool, &tdata->dest_info.name,
&res_addr->dst_host.addr.host);
pjsip_endpt_resolve(endpt, tdata->pool, &res_addr->dst_host,
send_state, &send_response_resolver_cb);
return PJ_SUCCESS;
}
} | 222 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | on_handshake_complete | on_handshake_complete( pj_ssl_sock_t * ssock , pj_status_t status) | ['ssock', 'status'] | static pj_bool_t on_handshake_complete(pj_ssl_sock_t *ssock,
pj_status_t status)
{
/* Cancel handshake timer */
if (ssock->timer.id == TIMER_HANDSHAKE_TIMEOUT) {
pj_timer_heap_cancel(ssock->param.timer_heap, &ssock->timer);
ssock->timer.id = TIMER_NONE;
}
/* Update certificates info on successful handshake */
if (status == PJ_SUCCESS)
ssl_update_certs_info(ssock);
/* Accepting */
if (ssock->is_server) {
if (status != PJ_SUCCESS) {
/* Handshake failed in accepting, destroy our self silently. */
char buf[PJ_INET6_ADDRSTRLEN+10];
PJ_PERROR(3,(ssock->pool->obj_name, status,
"Handshake failed in accepting %s",
pj_sockaddr_print(&ssock->rem_addr, buf,
sizeof(buf), 3)));
if (ssock->param.cb.on_accept_complete2) {
(*ssock->param.cb.on_accept_complete2)
(ssock->parent, ssock, (pj_sockaddr_t*)&ssock->rem_addr,
pj_sockaddr_get_len((pj_sockaddr_t*)&ssock->rem_addr),
status);
}
/* Originally, this is a workaround for ticket #985. However,
* a race condition may occur in multiple worker threads
* environment when we are destroying SSL objects while other
* threads are still accessing them.
* Please see ticket #1930 for more info.
*/
#if 1 //(defined(PJ_WIN32) && PJ_WIN32!=0)||(defined(PJ_WIN64) && PJ_WIN64!=0)
if (ssock->param.timer_heap) {
pj_time_val interval = {0, PJ_SSL_SOCK_DELAYED_CLOSE_TIMEOUT};
pj_status_t status1;
ssock->ssl_state = SSL_STATE_NULL;
ssl_close_sockets(ssock);
if (ssock->timer.id != TIMER_NONE) {
pj_timer_heap_cancel(ssock->param.timer_heap,
&ssock->timer);
}
pj_time_val_normalize(&interval);
status1 = pj_timer_heap_schedule_w_grp_lock(
ssock->param.timer_heap,
&ssock->timer,
&interval,
TIMER_CLOSE,
ssock->param.grp_lock);
if (status1 != PJ_SUCCESS) {
PJ_PERROR(3,(ssock->pool->obj_name, status,
"Failed to schedule a delayed close. "
"Race condition may occur."));
ssock->timer.id = TIMER_NONE;
pj_ssl_sock_close(ssock);
}
} else {
pj_ssl_sock_close(ssock);
}
#else
{
pj_ssl_sock_close(ssock);
}
#endif
return PJ_FALSE;
}
/* Notify application the newly accepted SSL socket */
if (ssock->param.cb.on_accept_complete2) {
pj_bool_t ret;
ret = (*ssock->param.cb.on_accept_complete2)
(ssock->parent, ssock, (pj_sockaddr_t*)&ssock->rem_addr,
pj_sockaddr_get_len((pj_sockaddr_t*)&ssock->rem_addr),
status);
if (ret == PJ_FALSE)
return PJ_FALSE;
} else if (ssock->param.cb.on_accept_complete) {
pj_bool_t ret;
ret = (*ssock->param.cb.on_accept_complete)
(ssock->parent, ssock, (pj_sockaddr_t*)&ssock->rem_addr,
pj_sockaddr_get_len((pj_sockaddr_t*)&ssock->rem_addr));
if (ret == PJ_FALSE)
return PJ_FALSE;
}
}
/* Connecting */
else {
/* On failure, reset SSL socket state first, as app may try to
* reconnect in the callback.
*/
if (status != PJ_SUCCESS) {
/* Server disconnected us, possibly due to SSL nego failure */
ssl_reset_sock_state(ssock);
}
if (ssock->param.cb.on_connect_complete) {
pj_bool_t ret;
ret = (*ssock->param.cb.on_connect_complete)(ssock, status);
if (ret == PJ_FALSE)
return PJ_FALSE;
}
}
return PJ_TRUE;
} | 510 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | ssock_on_accept_complete | ssock_on_accept_complete( pj_ssl_sock_t * ssock_parent , pj_sock_t newsock , void * newconn , const pj_sockaddr_t * src_addr , int src_addr_len , pj_status_t accept_status) | ['ssock_parent', 'newsock', 'newconn', 'src_addr', 'src_addr_len', 'accept_status'] | static pj_bool_t ssock_on_accept_complete (pj_ssl_sock_t *ssock_parent,
pj_sock_t newsock,
void *newconn,
const pj_sockaddr_t *src_addr,
int src_addr_len,
pj_status_t accept_status)
{
pj_ssl_sock_t *ssock;
#ifndef SSL_SOCK_IMP_USE_OWN_NETWORK
pj_activesock_cb asock_cb;
#endif
pj_activesock_cfg asock_cfg;
unsigned i;
pj_status_t status;
#ifndef SSL_SOCK_IMP_USE_OWN_NETWORK
PJ_UNUSED_ARG(newconn);
#endif
if (accept_status != PJ_SUCCESS) {
if (ssock_parent->param.cb.on_accept_complete2) {
(*ssock_parent->param.cb.on_accept_complete2)(ssock_parent, NULL,
src_addr,
src_addr_len,
accept_status);
}
return PJ_TRUE;
}
/* Create new SSL socket instance */
status = pj_ssl_sock_create(ssock_parent->pool,
&ssock_parent->newsock_param, &ssock);
if (status != PJ_SUCCESS)
goto on_return;
/* Update new SSL socket attributes */
ssock->sock = newsock;
ssock->parent = ssock_parent;
ssock->is_server = PJ_TRUE;
if (ssock_parent->cert) {
status = pj_ssl_sock_set_certificate(ssock, ssock->pool,
ssock_parent->cert);
if (status != PJ_SUCCESS)
goto on_return;
}
/* Set local address */
ssock->addr_len = src_addr_len;
pj_sockaddr_cp(&ssock->local_addr, &ssock_parent->local_addr);
/* Set remote address */
pj_sockaddr_cp(&ssock->rem_addr, src_addr);
/* Create SSL context */
status = ssl_create(ssock);
if (status != PJ_SUCCESS)
goto on_return;
/* Prepare read buffer */
ssock->asock_rbuf = (void**)pj_pool_calloc(ssock->pool,
ssock->param.async_cnt,
sizeof(void*));
if (!ssock->asock_rbuf)
return PJ_ENOMEM;
for (i = 0; i<ssock->param.async_cnt; ++i) {
ssock->asock_rbuf[i] = (void*) pj_pool_alloc(
ssock->pool,
ssock->param.read_buffer_size +
sizeof(read_data_t*));
if (!ssock->asock_rbuf[i])
return PJ_ENOMEM;
}
/* If listener socket has group lock, automatically create group lock
* for the new socket.
*/
if (ssock_parent->param.grp_lock) {
pj_grp_lock_t *glock;
status = pj_grp_lock_create(ssock->pool, NULL, &glock);
if (status != PJ_SUCCESS)
goto on_return;
pj_grp_lock_add_ref(glock);
asock_cfg.grp_lock = ssock->param.grp_lock = glock;
pj_grp_lock_add_handler(ssock->param.grp_lock, ssock->pool, ssock,
ssl_on_destroy);
}
#ifdef SSL_SOCK_IMP_USE_OWN_NETWORK
status = network_setup_connection(ssock, newconn);
if (status != PJ_SUCCESS)
goto on_return;
#else
/* Apply QoS, if specified */
status = pj_sock_apply_qos2(ssock->sock, ssock->param.qos_type,
&ssock->param.qos_params, 1,
ssock->pool->obj_name, NULL);
if (status != PJ_SUCCESS && !ssock->param.qos_ignore_error)
goto on_return;
/* Apply socket options, if specified */
if (ssock->param.sockopt_params.cnt) {
status = pj_sock_setsockopt_params(ssock->sock,
&ssock->param.sockopt_params);
if (status != PJ_SUCCESS && !ssock->param.sockopt_ignore_error)
goto on_return;
}
/* Create active socket */
pj_activesock_cfg_default(&asock_cfg);
asock_cfg.async_cnt = ssock->param.async_cnt;
asock_cfg.concurrency = ssock->param.concurrency;
asock_cfg.whole_data = PJ_TRUE;
pj_bzero(&asock_cb, sizeof(asock_cb));
asock_cb.on_data_read = asock_on_data_read;
asock_cb.on_data_sent = asock_on_data_sent;
status = pj_activesock_create(ssock->pool,
ssock->sock,
ssock->param.sock_type,
&asock_cfg,
ssock->param.ioqueue,
&asock_cb,
ssock,
&ssock->asock);
if (status != PJ_SUCCESS)
goto on_return;
/* Start read */
status = pj_activesock_start_read2(ssock->asock, ssock->pool,
(unsigned)ssock->param.read_buffer_size,
ssock->asock_rbuf,
PJ_IOQUEUE_ALWAYS_ASYNC);
if (status != PJ_SUCCESS)
goto on_return;
#endif
/* Update local address */
status = get_localaddr(ssock, &ssock->local_addr, &ssock->addr_len);
if (status != PJ_SUCCESS) {
/* This fails on few envs, e.g: win IOCP, just tolerate this and
* use parent local address instead.
*/
pj_sockaddr_cp(&ssock->local_addr, &ssock_parent->local_addr);
}
/* Prepare write/send state */
pj_assert(ssock->send_buf.max_len == 0);
ssock->send_buf.buf = (char*)
pj_pool_alloc(ssock->pool,
ssock->param.send_buffer_size);
if (!ssock->send_buf.buf)
return PJ_ENOMEM;
ssock->send_buf.max_len = ssock->param.send_buffer_size;
ssock->send_buf.start = ssock->send_buf.buf;
ssock->send_buf.len = 0;
/* Start handshake timer */
if (ssock->param.timer_heap && (ssock->param.timeout.sec != 0 ||
ssock->param.timeout.msec != 0))
{
pj_assert(ssock->timer.id == TIMER_NONE);
status = pj_timer_heap_schedule_w_grp_lock(ssock->param.timer_heap,
&ssock->timer,
&ssock->param.timeout,
TIMER_HANDSHAKE_TIMEOUT,
ssock->param.grp_lock);
if (status != PJ_SUCCESS) {
ssock->timer.id = TIMER_NONE;
status = PJ_SUCCESS;
}
}
/* Start SSL handshake */
ssock->ssl_state = SSL_STATE_HANDSHAKING;
ssl_set_state(ssock, PJ_TRUE);
status = ssl_do_handshake(ssock);
on_return:
if (ssock && status != PJ_EPENDING) {
on_handshake_complete(ssock, status);
}
/* Must return PJ_TRUE whatever happened, as we must continue listening */
return PJ_TRUE;
} | 884 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | STATUS_FROM_SSL_ERR | STATUS_FROM_SSL_ERR( char * action , pj_ssl_sock_t * ssock , unsigned long err) | ['action', 'ssock', 'err'] | static pj_status_t STATUS_FROM_SSL_ERR(char *action, pj_ssl_sock_t *ssock,
unsigned long err)
{
int level = 0;
int len = 0; //dummy
ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);
level++;
/* General SSL error, dig more from OpenSSL error queue */
if (err == SSL_ERROR_SSL) {
err = ERR_get_error();
ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);
}
ssock->last_err = err;
return GET_STATUS_FROM_SSL_ERR(err);
} | 73 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | STATUS_FROM_SSL_ERR2 | STATUS_FROM_SSL_ERR2( char * action , pj_ssl_sock_t * ssock , int ret , int err , int len) | ['action', 'ssock', 'ret', 'err', 'len'] | static pj_status_t STATUS_FROM_SSL_ERR2(char *action, pj_ssl_sock_t *ssock,
int ret, int err, int len)
{
unsigned long ssl_err = err;
if (err == SSL_ERROR_SSL) {
ssl_err = ERR_peek_error();
}
/* Dig for more from OpenSSL error queue */
SSLLogErrors(action, ret, err, len, ssock);
ssock->last_err = ssl_err;
return GET_STATUS_FROM_SSL_ERR(ssl_err);
} | 66 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | verify_cb | verify_cb( int preverify_ok , X509_STORE_CTX * x509_ctx) | ['preverify_ok', 'x509_ctx'] | static int verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
{
pj_ssl_sock_t *ssock;
SSL *ossl_ssl;
int err;
/* Get SSL instance */
ossl_ssl = X509_STORE_CTX_get_ex_data(x509_ctx,
SSL_get_ex_data_X509_STORE_CTX_idx());
pj_assert(ossl_ssl);
/* Get SSL socket instance */
ssock = SSL_get_ex_data(ossl_ssl, sslsock_idx);
pj_assert(ssock);
/* Store verification status */
err = X509_STORE_CTX_get_error(x509_ctx);
switch (err) {
case X509_V_OK:
break;
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
ssock->verify_status |= PJ_SSL_CERT_EISSUER_NOT_FOUND;
break;
case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE:
case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
ssock->verify_status |= PJ_SSL_CERT_EINVALID_FORMAT;
break;
case X509_V_ERR_CERT_NOT_YET_VALID:
case X509_V_ERR_CERT_HAS_EXPIRED:
ssock->verify_status |= PJ_SSL_CERT_EVALIDITY_PERIOD;
break;
case X509_V_ERR_UNABLE_TO_GET_CRL:
case X509_V_ERR_CRL_NOT_YET_VALID:
case X509_V_ERR_CRL_HAS_EXPIRED:
case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE:
case X509_V_ERR_CRL_SIGNATURE_FAILURE:
case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
ssock->verify_status |= PJ_SSL_CERT_ECRL_FAILURE;
break;
case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
case X509_V_ERR_CERT_UNTRUSTED:
case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
ssock->verify_status |= PJ_SSL_CERT_EUNTRUSTED;
break;
case X509_V_ERR_CERT_SIGNATURE_FAILURE:
case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
case X509_V_ERR_SUBJECT_ISSUER_MISMATCH:
case X509_V_ERR_AKID_SKID_MISMATCH:
case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH:
case X509_V_ERR_KEYUSAGE_NO_CERTSIGN:
ssock->verify_status |= PJ_SSL_CERT_EISSUER_MISMATCH;
break;
case X509_V_ERR_CERT_REVOKED:
ssock->verify_status |= PJ_SSL_CERT_EREVOKED;
break;
case X509_V_ERR_INVALID_PURPOSE:
case X509_V_ERR_CERT_REJECTED:
case X509_V_ERR_INVALID_CA:
ssock->verify_status |= PJ_SSL_CERT_EINVALID_PURPOSE;
break;
case X509_V_ERR_CERT_CHAIN_TOO_LONG: /* not really used */
case X509_V_ERR_PATH_LENGTH_EXCEEDED:
ssock->verify_status |= PJ_SSL_CERT_ECHAIN_TOO_LONG;
break;
/* Unknown errors */
case X509_V_ERR_OUT_OF_MEM:
default:
ssock->verify_status |= PJ_SSL_CERT_EUNKNOWN;
break;
}
/* When verification is not requested just return ok here, however
* application can still get the verification status.
*/
if (PJ_FALSE == ssock->param.verify_peer)
preverify_ok = 1;
return preverify_ok;
} | 262 | True | 1 |
CVE-2021-32686 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-cv8x-p47p-99wr', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2716', 'name': 'https://github.com/pjsip/pjproject/pull/2716', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'name': 'https://github.com/pjsip/pjproject/commit/d5f95aa066f878b0aef6a64e60b61e8626e664cd', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'name': 'https://github.com/pjsip/pjproject/releases/tag/2.11.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2021/dsa-4999', 'name': 'DSA-4999', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In PJSIP before version 2.11.1, there are a couple of issues found in the SSL socket. First, a race condition between callback and destroy, due to the accepted socket having no group lock. Second, the SSL socket parent/listener may get destroyed during handshake. Both issues were reported to happen intermittently in heavy load TLS connections. They cause a crash, resulting in a denial of service. These are fixed in version 2.11.1.'}] | 2022-07-01T18:47Z | 2021-07-23T22:15Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Nanang Izzuddin | 2021-07-23 10:49:21+07:00 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without group lock in SSL socket.
- Replace assertion with normal validation check of SSL socket instance in OpenSSL verification callback (verify_cb()) to avoid crash, e.g: if somehow race condition with SSL socket destroy happens or OpenSSL application data index somehow gets corrupted. | d5f95aa066f878b0aef6a64e60b61e8626e664cd | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | on_accept_complete2 | on_accept_complete2( pj_ssl_sock_t * ssock , pj_ssl_sock_t * new_ssock , const pj_sockaddr_t * src_addr , int src_addr_len , pj_status_t accept_status) | ['ssock', 'new_ssock', 'src_addr', 'src_addr_len', 'accept_status'] | static pj_bool_t on_accept_complete2(pj_ssl_sock_t *ssock,
pj_ssl_sock_t *new_ssock,
const pj_sockaddr_t *src_addr,
int src_addr_len,
pj_status_t accept_status)
{
struct tls_listener *listener;
struct tls_transport *tls;
pj_ssl_sock_info ssl_info;
char addr[PJ_INET6_ADDRSTRLEN+10];
pjsip_tp_state_callback state_cb;
pj_sockaddr tmp_src_addr;
pj_bool_t is_shutdown;
pj_status_t status;
char addr_buf[PJ_INET6_ADDRSTRLEN+10];
PJ_UNUSED_ARG(src_addr_len);
listener = (struct tls_listener*) pj_ssl_sock_get_user_data(ssock);
if (accept_status != PJ_SUCCESS) {
if (listener && listener->tls_setting.on_accept_fail_cb) {
pjsip_tls_on_accept_fail_param param;
pj_ssl_sock_info ssi;
pj_bzero(¶m, sizeof(param));
param.status = accept_status;
param.local_addr = &listener->factory.local_addr;
param.remote_addr = src_addr;
if (new_ssock &&
pj_ssl_sock_get_info(new_ssock, &ssi) == PJ_SUCCESS)
{
param.last_native_err = ssi.last_native_err;
}
(*listener->tls_setting.on_accept_fail_cb) (¶m);
}
return PJ_FALSE;
}
PJ_ASSERT_RETURN(new_ssock, PJ_TRUE);
if (!listener->is_registered) {
if (listener->tls_setting.on_accept_fail_cb) {
pjsip_tls_on_accept_fail_param param;
pj_bzero(¶m, sizeof(param));
param.status = PJSIP_TLS_EACCEPT;
param.local_addr = &listener->factory.local_addr;
param.remote_addr = src_addr;
(*listener->tls_setting.on_accept_fail_cb) (¶m);
}
return PJ_FALSE;
}
PJ_LOG(4,(listener->factory.obj_name,
"TLS listener %s: got incoming TLS connection "
"from %s, sock=%d",
pj_addr_str_print(&listener->factory.addr_name.host,
listener->factory.addr_name.port, addr_buf,
sizeof(addr_buf), 1),
pj_sockaddr_print(src_addr, addr, sizeof(addr), 3),
new_ssock));
/* Retrieve SSL socket info, close the socket if this is failed
* as the SSL socket info availability is rather critical here.
*/
status = pj_ssl_sock_get_info(new_ssock, &ssl_info);
if (status != PJ_SUCCESS) {
pj_ssl_sock_close(new_ssock);
if (listener->tls_setting.on_accept_fail_cb) {
pjsip_tls_on_accept_fail_param param;
pj_bzero(¶m, sizeof(param));
param.status = status;
param.local_addr = &listener->factory.local_addr;
param.remote_addr = src_addr;
(*listener->tls_setting.on_accept_fail_cb) (¶m);
}
return PJ_TRUE;
}
/* Copy to larger buffer, just in case */
pj_bzero(&tmp_src_addr, sizeof(tmp_src_addr));
pj_sockaddr_cp(&tmp_src_addr, src_addr);
/*
* Incoming connection!
* Create TLS transport for the new socket.
*/
status = tls_create( listener, NULL, new_ssock, PJ_TRUE,
&ssl_info.local_addr, &tmp_src_addr, NULL,
ssl_info.grp_lock, &tls);
if (status != PJ_SUCCESS) {
if (listener->tls_setting.on_accept_fail_cb) {
pjsip_tls_on_accept_fail_param param;
pj_bzero(¶m, sizeof(param));
param.status = status;
param.local_addr = &listener->factory.local_addr;
param.remote_addr = src_addr;
(*listener->tls_setting.on_accept_fail_cb) (¶m);
}
return PJ_TRUE;
}
/* Set the "pending" SSL socket user data */
pj_ssl_sock_set_user_data(new_ssock, tls);
/* Prevent immediate transport destroy as application may access it
* (getting info, etc) in transport state notification callback.
*/
pjsip_transport_add_ref(&tls->base);
/* If there is verification error and verification is mandatory, shutdown
* and destroy the transport.
*/
if (ssl_info.verify_status && listener->tls_setting.verify_client) {
if (tls->close_reason == PJ_SUCCESS)
tls->close_reason = PJSIP_TLS_ECERTVERIF;
pjsip_transport_shutdown(&tls->base);
}
/* Notify transport state to application */
state_cb = pjsip_tpmgr_get_state_cb(tls->base.tpmgr);
if (state_cb) {
pjsip_transport_state_info state_info;
pjsip_tls_state_info tls_info;
pjsip_transport_state tp_state;
/* Init transport state info */
pj_bzero(&tls_info, sizeof(tls_info));
pj_bzero(&state_info, sizeof(state_info));
tls_info.ssl_sock_info = &ssl_info;
state_info.ext_info = &tls_info;
/* Set transport state based on verification status */
if (ssl_info.verify_status && listener->tls_setting.verify_client)
{
tp_state = PJSIP_TP_STATE_DISCONNECTED;
state_info.status = PJSIP_TLS_ECERTVERIF;
} else {
tp_state = PJSIP_TP_STATE_CONNECTED;
state_info.status = PJ_SUCCESS;
}
(*state_cb)(&tls->base, tp_state, &state_info);
}
/* Release transport reference. If transport is shutting down, it may
* get destroyed here.
*/
is_shutdown = tls->base.is_shutdown;
pjsip_transport_dec_ref(&tls->base);
if (is_shutdown)
return PJ_TRUE;
status = tls_start_read(tls);
if (status != PJ_SUCCESS) {
PJ_LOG(3,(tls->base.obj_name, "New transport cancelled"));
tls_init_shutdown(tls, status);
tls_destroy(&tls->base, status);
} else {
/* Start keep-alive timer */
if (pjsip_cfg()->tls.keep_alive_interval) {
pj_time_val delay = {0};
delay.sec = pjsip_cfg()->tls.keep_alive_interval;
pjsip_endpt_schedule_timer(listener->endpt,
&tls->ka_timer,
&delay);
tls->ka_timer.id = PJ_TRUE;
pj_gettimeofday(&tls->last_activity);
}
}
return PJ_TRUE;
} | 831 | True | 1 |
CVE-2021-43845 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:N/A:P | NETWORK | LOW | NONE | PARTIAL | NONE | PARTIAL | 6.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://github.com/pjsip/pjproject/commit/f74c1fc22b760d2a24369aa72c74c4a9ab985859', 'name': 'https://github.com/pjsip/pjproject/commit/f74c1fc22b760d2a24369aa72c74c4a9ab985859', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-r374-qrwv-86hh', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-r374-qrwv-86hh', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/pull/2924', 'name': 'https://github.com/pjsip/pjproject/pull/2924', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library. In version 2.11.1 and prior, if incoming RTCP XR message contain block, the data field is not checked against the received packet size, potentially resulting in an out-of-bound read access. This affects all users that use PJMEDIA and RTCP XR. A malicious actor can send a RTCP XR message with an invalid packet size.'}] | 2022-04-26T18:59Z | 2021-12-27T18: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 | Riza Sulistyo | 2021-12-24 11:17:15+07:00 | Merge pull request from GHSA-r374-qrwv-86hh | f74c1fc22b760d2a24369aa72c74c4a9ab985859 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjmedia_rtcp_xr_rx_rtcp_xr | pjmedia_rtcp_xr_rx_rtcp_xr( pjmedia_rtcp_xr_session * sess , const void * pkt , pj_size_t size) | ['sess', 'pkt', 'size'] | void pjmedia_rtcp_xr_rx_rtcp_xr( pjmedia_rtcp_xr_session *sess,
const void *pkt,
pj_size_t size)
{
const pjmedia_rtcp_xr_pkt *rtcp_xr = (pjmedia_rtcp_xr_pkt*) pkt;
const pjmedia_rtcp_xr_rb_rr_time *rb_rr_time = NULL;
const pjmedia_rtcp_xr_rb_dlrr *rb_dlrr = NULL;
const pjmedia_rtcp_xr_rb_stats *rb_stats = NULL;
const pjmedia_rtcp_xr_rb_voip_mtc *rb_voip_mtc = NULL;
const pjmedia_rtcp_xr_rb_header *rb_hdr = (pjmedia_rtcp_xr_rb_header*)
rtcp_xr->buf;
unsigned pkt_len, rb_len;
if (rtcp_xr->common.pt != RTCP_XR)
return;
pkt_len = pj_ntohs((pj_uint16_t)rtcp_xr->common.length);
if ((pkt_len + 1) > (size / 4))
return;
/* Parse report rpt_types */
while ((pj_int32_t*)rb_hdr < (pj_int32_t*)pkt + pkt_len)
{
rb_len = pj_ntohs((pj_uint16_t)rb_hdr->length);
/* Just skip any block with length == 0 (no report content) */
if (rb_len) {
switch (rb_hdr->bt) {
case BT_RR_TIME:
rb_rr_time = (pjmedia_rtcp_xr_rb_rr_time*) rb_hdr;
break;
case BT_DLRR:
rb_dlrr = (pjmedia_rtcp_xr_rb_dlrr*) rb_hdr;
break;
case BT_STATS:
rb_stats = (pjmedia_rtcp_xr_rb_stats*) rb_hdr;
break;
case BT_VOIP_METRICS:
rb_voip_mtc = (pjmedia_rtcp_xr_rb_voip_mtc*) rb_hdr;
break;
default:
break;
}
}
rb_hdr = (pjmedia_rtcp_xr_rb_header*)
((pj_int32_t*)rb_hdr + rb_len + 1);
}
/* Receiving RR Time */
if (rb_rr_time) {
/* Save LRR from NTP timestamp of the RR time block report */
sess->rx_lrr = ((pj_ntohl(rb_rr_time->ntp_sec) & 0x0000FFFF) << 16) |
((pj_ntohl(rb_rr_time->ntp_frac) >> 16) & 0xFFFF);
/* Calculate RR arrival time for DLRR */
pj_get_timestamp(&sess->rx_lrr_time);
TRACE_((sess->name, "Rx RTCP SR: ntp_ts=%p", sess->rx_lrr,
(pj_uint32_t)(sess->rx_lrr_time.u64*65536/
sess->rtcp_session->ts_freq.u64)));
}
/* Receiving DLRR */
if (rb_dlrr) {
pj_uint32_t lrr, now, dlrr;
pj_uint64_t eedelay;
pjmedia_rtcp_ntp_rec ntp;
/* LRR is the middle 32bit of NTP. It has 1/65536 second
* resolution
*/
lrr = pj_ntohl(rb_dlrr->item.lrr);
/* DLRR is delay since LRR, also in 1/65536 resolution */
dlrr = pj_ntohl(rb_dlrr->item.dlrr);
/* Get current time, and convert to 1/65536 resolution */
pjmedia_rtcp_get_ntp_time(sess->rtcp_session, &ntp);
now = ((ntp.hi & 0xFFFF) << 16) + (ntp.lo >> 16);
/* End-to-end delay is (now-lrr-dlrr) */
eedelay = now - lrr - dlrr;
/* Convert end to end delay to usec (keeping the calculation in
* 64bit space)::
* sess->ee_delay = (eedelay * 1000) / 65536;
*/
if (eedelay < 4294) {
eedelay = (eedelay * 1000000) >> 16;
} else {
eedelay = (eedelay * 1000) >> 16;
eedelay *= 1000;
}
TRACE_((sess->name, "Rx RTCP XR DLRR: lrr=%p, dlrr=%p (%d:%03dms), "
"now=%p, rtt=%p",
lrr, dlrr, dlrr/65536, (dlrr%65536)*1000/65536,
now, (pj_uint32_t)eedelay));
/* Only save calculation if "now" is greater than lrr, or
* otherwise rtt will be invalid
*/
if (now-dlrr >= lrr) {
unsigned rtt = (pj_uint32_t)eedelay;
/* Check that eedelay value really makes sense.
* We allow up to 30 seconds RTT!
*/
if (eedelay <= 30 * 1000 * 1000UL) {
/* "Normalize" rtt value that is exceptionally high.
* For such values, "normalize" the rtt to be three times
* the average value.
*/
if (rtt>((unsigned)sess->stat.rtt.mean*3) && sess->stat.rtt.n!=0)
{
unsigned orig_rtt = rtt;
rtt = (unsigned)sess->stat.rtt.mean*3;
PJ_LOG(5,(sess->name,
"RTT value %d usec is normalized to %d usec",
orig_rtt, rtt));
}
TRACE_((sess->name, "RTCP RTT is set to %d usec", rtt));
pj_math_stat_update(&sess->stat.rtt, rtt);
}
} else {
PJ_LOG(5, (sess->name, "Internal RTCP NTP clock skew detected: "
"lrr=%p, now=%p, dlrr=%p (%d:%03dms), "
"diff=%d",
lrr, now, dlrr, dlrr/65536,
(dlrr%65536)*1000/65536,
dlrr-(now-lrr)));
}
}
/* Receiving Statistics Summary */
if (rb_stats) {
pj_uint8_t flags = rb_stats->header.specific;
pj_bzero(&sess->stat.tx.stat_sum, sizeof(sess->stat.tx.stat_sum));
/* Range of packets sequence reported in this blocks */
sess->stat.tx.stat_sum.begin_seq = pj_ntohs(rb_stats->begin_seq);
sess->stat.tx.stat_sum.end_seq = pj_ntohs(rb_stats->end_seq);
/* Get flags of valid fields */
sess->stat.tx.stat_sum.l = (flags & (1 << 7)) != 0;
sess->stat.tx.stat_sum.d = (flags & (1 << 6)) != 0;
sess->stat.tx.stat_sum.j = (flags & (1 << 5)) != 0;
sess->stat.tx.stat_sum.t = (flags & (3 << 3)) != 0;
/* Fetch the reports info */
if (sess->stat.tx.stat_sum.l) {
sess->stat.tx.stat_sum.lost = pj_ntohl(rb_stats->lost);
}
if (sess->stat.tx.stat_sum.d) {
sess->stat.tx.stat_sum.dup = pj_ntohl(rb_stats->dup);
}
if (sess->stat.tx.stat_sum.j) {
sess->stat.tx.stat_sum.jitter.min = pj_ntohl(rb_stats->jitter_min);
sess->stat.tx.stat_sum.jitter.max = pj_ntohl(rb_stats->jitter_max);
sess->stat.tx.stat_sum.jitter.mean= pj_ntohl(rb_stats->jitter_mean);
pj_math_stat_set_stddev(&sess->stat.tx.stat_sum.jitter,
pj_ntohl(rb_stats->jitter_dev));
}
if (sess->stat.tx.stat_sum.t) {
sess->stat.tx.stat_sum.toh.min = rb_stats->toh_min;
sess->stat.tx.stat_sum.toh.max = rb_stats->toh_max;
sess->stat.tx.stat_sum.toh.mean= rb_stats->toh_mean;
pj_math_stat_set_stddev(&sess->stat.tx.stat_sum.toh,
pj_ntohl(rb_stats->toh_dev));
}
pj_gettimeofday(&sess->stat.tx.stat_sum.update);
}
/* Receiving VoIP Metrics */
if (rb_voip_mtc) {
sess->stat.tx.voip_mtc.loss_rate = rb_voip_mtc->loss_rate;
sess->stat.tx.voip_mtc.discard_rate = rb_voip_mtc->discard_rate;
sess->stat.tx.voip_mtc.burst_den = rb_voip_mtc->burst_den;
sess->stat.tx.voip_mtc.gap_den = rb_voip_mtc->gap_den;
sess->stat.tx.voip_mtc.burst_dur = pj_ntohs(rb_voip_mtc->burst_dur);
sess->stat.tx.voip_mtc.gap_dur = pj_ntohs(rb_voip_mtc->gap_dur);
sess->stat.tx.voip_mtc.rnd_trip_delay =
pj_ntohs(rb_voip_mtc->rnd_trip_delay);
sess->stat.tx.voip_mtc.end_sys_delay =
pj_ntohs(rb_voip_mtc->end_sys_delay);
/* signal & noise level encoded in two's complement form */
sess->stat.tx.voip_mtc.signal_lvl = (pj_int8_t)
((rb_voip_mtc->signal_lvl > 127)?
((int)rb_voip_mtc->signal_lvl - 256) :
rb_voip_mtc->signal_lvl);
sess->stat.tx.voip_mtc.noise_lvl = (pj_int8_t)
((rb_voip_mtc->noise_lvl > 127)?
((int)rb_voip_mtc->noise_lvl - 256) :
rb_voip_mtc->noise_lvl);
sess->stat.tx.voip_mtc.rerl = rb_voip_mtc->rerl;
sess->stat.tx.voip_mtc.gmin = rb_voip_mtc->gmin;
sess->stat.tx.voip_mtc.r_factor = rb_voip_mtc->r_factor;
sess->stat.tx.voip_mtc.ext_r_factor = rb_voip_mtc->ext_r_factor;
sess->stat.tx.voip_mtc.mos_lq = rb_voip_mtc->mos_lq;
sess->stat.tx.voip_mtc.mos_cq = rb_voip_mtc->mos_cq;
sess->stat.tx.voip_mtc.rx_config = rb_voip_mtc->rx_config;
sess->stat.tx.voip_mtc.jb_nom = pj_ntohs(rb_voip_mtc->jb_nom);
sess->stat.tx.voip_mtc.jb_max = pj_ntohs(rb_voip_mtc->jb_max);
sess->stat.tx.voip_mtc.jb_abs_max = pj_ntohs(rb_voip_mtc->jb_abs_max);
pj_gettimeofday(&sess->stat.tx.voip_mtc.update);
}
} | 1430 | True | 1 |
CVE-2021-41141 | 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/pjsip/pjproject/security/advisories/GHSA-8fmx-hqw7-6gmc', 'name': 'https://github.com/pjsip/pjproject/security/advisories/GHSA-8fmx-hqw7-6gmc', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/pjsip/pjproject/commit/1aa2c0e0fb60a1b0bf793e0d834073ffe50fb196', 'name': 'https://github.com/pjsip/pjproject/commit/1aa2c0e0fb60a1b0bf793e0d834073ffe50fb196', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html', 'name': '[debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-667'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.11.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'PJSIP is a free and open source multimedia communication library written in the C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In various parts of PJSIP, when error/failure occurs, it is found that the function returns without releasing the currently held locks. This could result in a system deadlock, which cause a denial of service for the users. No release has yet been made which contains the linked fix commit. All versions up to an including 2.11.1 are affected. Users may need to manually apply the patch.'}] | 2022-06-05T02:43Z | 2022-01-04T19:15Z | Improper Locking | The software does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. |
Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.
| https://cwe.mitre.org/data/definitions/667.html | 0 | Riza Sulistyo | 2022-01-04 15:58:02+07:00 | Merge pull request from GHSA-8fmx-hqw7-6gmc | 1aa2c0e0fb60a1b0bf793e0d834073ffe50fb196 | False | pjsip/pjproject | PJSIP project | 2016-01-24 05:00:33 | 2022-08-26 15:35:55 | http://www.pjsip.org | pjsip | 1248.0 | 567.0 | pjmedia_vid_conf_add_port | pjmedia_vid_conf_add_port( pjmedia_vid_conf * vid_conf , pj_pool_t * parent_pool , pjmedia_port * port , const pj_str_t * name , void * opt , unsigned * p_slot) | ['vid_conf', 'parent_pool', 'port', 'name', 'opt', 'p_slot'] | PJ_DEF(pj_status_t) pjmedia_vid_conf_add_port( pjmedia_vid_conf *vid_conf,
pj_pool_t *parent_pool,
pjmedia_port *port,
const pj_str_t *name,
void *opt,
unsigned *p_slot)
{
pj_pool_t *pool;
vconf_port *cport;
unsigned index;
PJ_ASSERT_RETURN(vid_conf && parent_pool && port, PJ_EINVAL);
PJ_ASSERT_RETURN(port->info.fmt.type==PJMEDIA_TYPE_VIDEO &&
port->info.fmt.detail_type==PJMEDIA_FORMAT_DETAIL_VIDEO,
PJ_EINVAL);
PJ_UNUSED_ARG(opt);
/* If name is not specified, use the port's name */
if (!name)
name = &port->info.name;
pj_mutex_lock(vid_conf->mutex);
if (vid_conf->port_cnt >= vid_conf->opt.max_slot_cnt) {
pj_assert(!"Too many ports");
pj_mutex_unlock(vid_conf->mutex);
return PJ_ETOOMANY;
}
/* Find empty port in the conference bridge. */
for (index=0; index < vid_conf->opt.max_slot_cnt; ++index) {
if (vid_conf->ports[index] == NULL)
break;
}
pj_assert(index != vid_conf->opt.max_slot_cnt);
/* Create pool */
pool = pj_pool_create(parent_pool->factory, name->ptr, 500, 500, NULL);
PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
/* Create port. */
cport = PJ_POOL_ZALLOC_T(pool, vconf_port);
PJ_ASSERT_RETURN(cport, PJ_ENOMEM);
/* Set pool, port, index, and name */
cport->pool = pool;
cport->port = port;
cport->format = port->info.fmt;
cport->idx = index;
pj_strdup_with_null(pool, &cport->name, name);
/* Init put/get_frame() intervals */
{
pjmedia_ratio *fps = &port->info.fmt.det.vid.fps;
pj_uint32_t vconf_interval = (pj_uint32_t)
(TS_CLOCK_RATE * 1.0 /
vid_conf->opt.frame_rate);
cport->ts_interval = (pj_uint32_t)(TS_CLOCK_RATE * 1.0 /
fps->num * fps->denum);
/* Normalize the interval */
if (cport->ts_interval < vconf_interval) {
cport->ts_interval = vconf_interval;
PJ_LOG(3,(THIS_FILE, "Warning: frame rate of port %s is higher "
"than video conference bridge (%d > %d)",
name->ptr, (int)(fps->num/fps->denum),
vid_conf->opt.frame_rate));
}
}
/* Allocate buffer for put/get_frame() */
{
const pjmedia_video_format_info *vfi;
pjmedia_video_apply_fmt_param vafp;
pj_status_t status;
vfi = pjmedia_get_video_format_info(NULL, port->info.fmt.id);
if (!vfi) {
PJ_LOG(4,(THIS_FILE, "pjmedia_vid_conf_add_port(): "
"unrecognized format %04X",
port->info.fmt.id));
return PJMEDIA_EBADFMT;
}
pj_bzero(&vafp, sizeof(vafp));
vafp.size = port->info.fmt.det.vid.size;
status = (*vfi->apply_fmt)(vfi, &vafp);
if (status != PJ_SUCCESS) {
PJ_LOG(4,(THIS_FILE, "pjmedia_vid_conf_add_port(): "
"Failed to apply format %04X",
port->info.fmt.id));
return status;
}
if (port->put_frame) {
cport->put_buf_size = vafp.framebytes;
cport->put_buf = pj_pool_zalloc(cport->pool, cport->put_buf_size);
}
if (port->get_frame) {
cport->get_buf_size = vafp.framebytes;
cport->get_buf = pj_pool_zalloc(cport->pool, cport->get_buf_size);
}
}
/* Create listener array */
cport->listener_slots = (unsigned*)
pj_pool_zalloc(pool,
vid_conf->opt.max_slot_cnt *
sizeof(unsigned));
PJ_ASSERT_RETURN(cport->listener_slots, PJ_ENOMEM);
/* Create transmitter array */
cport->transmitter_slots = (unsigned*)
pj_pool_zalloc(pool,
vid_conf->opt.max_slot_cnt *
sizeof(unsigned));
PJ_ASSERT_RETURN(cport->transmitter_slots, PJ_ENOMEM);
/* Create pointer-to-render_state array */
cport->render_states = (render_state**)
pj_pool_zalloc(pool,
vid_conf->opt.max_slot_cnt *
sizeof(render_state*));
PJ_ASSERT_RETURN(cport->render_states, PJ_ENOMEM);
/* Create pointer-to-render-pool array */
cport->render_pool = (pj_pool_t**)
pj_pool_zalloc(pool,
vid_conf->opt.max_slot_cnt *
sizeof(pj_pool_t*));
PJ_ASSERT_RETURN(cport->render_pool, PJ_ENOMEM);
/* Register the conf port. */
vid_conf->ports[index] = cport;
vid_conf->port_cnt++;
PJ_LOG(4,(THIS_FILE,"Added port %d (%.*s)",
index, (int)cport->name.slen, cport->name.ptr));
pj_mutex_unlock(vid_conf->mutex);
/* Done. */
if (p_slot) {
*p_slot = index;
}
return PJ_SUCCESS;
} | 759 | True | 1 |
Subsets and Splits