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-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | coapServerFormatReset | coapServerFormatReset( CoapServerContext * context , uint16_t mid) | ['context', 'mid'] | error_t coapServerFormatReset(CoapServerContext *context, uint16_t mid)
{
CoapMessageHeader *header;
//Point to the CoAP response header
header = (CoapMessageHeader *) context->response.buffer;
//Format Reset message
header->version = COAP_VERSION_1;
header->type = COAP_TYPE_RST;
header->tokenLen = 0;
header->code = COAP_CODE_EMPTY;
//The Reset message message must echo the message ID of the confirmable
//message and must be empty (refer to RFC 7252, section 4.2)
header->mid = htons(mid);
//Set the length of the CoAP message
context->response.length = sizeof(CoapMessageHeader);
//Sucessful processing
return NO_ERROR;
} | 74 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | coapServerInitResponse | coapServerInitResponse( CoapServerContext * context) | ['context'] | error_t coapServerInitResponse(CoapServerContext *context)
{
CoapMessageHeader *requestHeader;
CoapMessageHeader *responseHeader;
//Point to the CoAP request header
requestHeader = (CoapMessageHeader *) context->request.buffer;
//Point to the CoAP response header
responseHeader = (CoapMessageHeader *) context->response.buffer;
//Format message header
responseHeader->version = COAP_VERSION_1;
responseHeader->tokenLen = requestHeader->tokenLen;
responseHeader->code = COAP_CODE_INTERNAL_SERVER;
responseHeader->mid = requestHeader->mid;
//If immediately available, the response to a request carried in a
//Confirmable message is carried in an Acknowledgement (ACK) message
if(requestHeader->type == COAP_TYPE_CON)
{
responseHeader->type = COAP_TYPE_ACK;
}
else
{
responseHeader->type = COAP_TYPE_NON;
}
//The token is used to match a response with a request
osMemcpy(responseHeader->token, requestHeader->token,
requestHeader->tokenLen);
//Set the length of the CoAP message
context->response.length = sizeof(CoapMessageHeader) + responseHeader->tokenLen;
context->response.pos = 0;
//Sucessful processing
return NO_ERROR;
} | 134 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ipStringToAddr | ipStringToAddr( const char_t * str , IpAddr * ipAddr) | ['str', 'ipAddr'] | error_t ipStringToAddr(const char_t *str, IpAddr *ipAddr)
{
error_t error;
#if (IPV6_SUPPORT == ENABLED)
//IPv6 address?
if(strchr(str, ':'))
{
//IPv6 addresses are 16-byte long
ipAddr->length = sizeof(Ipv6Addr);
//Convert the string to IPv6 address
error = ipv6StringToAddr(str, &ipAddr->ipv6Addr);
}
else
#endif
#if (IPV4_SUPPORT == ENABLED)
//IPv4 address?
if(strchr(str, '.'))
{
//IPv4 addresses are 4-byte long
ipAddr->length = sizeof(Ipv4Addr);
//Convert the string to IPv4 address
error = ipv4StringToAddr(str, &ipAddr->ipv4Addr);
}
else
#endif
//Invalid IP address?
{
//Report an error
error = ERROR_FAILURE;
}
//Return status code
return error;
} | 91 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | rawSocketSendEthPacket | rawSocketSendEthPacket( Socket * socket , const SocketMsg * message , uint_t flags) | ['socket', 'message', 'flags'] | error_t rawSocketSendEthPacket(Socket *socket, const SocketMsg *message,
uint_t flags)
{
error_t error;
#if (ETH_SUPPORT == ENABLED)
size_t length;
NetBuffer *buffer;
NetInterface *interface;
//Select the relevant network interface
if(socket->interface != NULL)
{
interface = socket->interface;
}
else
{
interface = netGetDefaultInterface();
}
//Forward the frame to the physical interface
interface = nicGetPhysicalInterface(interface);
//Ethernet interface?
if(interface->nicDriver != NULL &&
interface->nicDriver->type == NIC_TYPE_ETHERNET)
{
//Allocate a buffer memory to hold the raw Ethernet packet
buffer = netBufferAlloc(0);
//Failed to allocate buffer?
if(buffer == NULL)
return ERROR_OUT_OF_MEMORY;
//Get the length of the raw data
length = message->length;
//Copy the raw data
error = netBufferAppend(buffer, message->data, length);
//Check status code
if(!error)
{
//Automatic padding not supported by hardware?
if(!interface->nicDriver->autoPadding)
{
//The host controller should manually add padding
//to the packet before transmitting it
if(length < (ETH_MIN_FRAME_SIZE - ETH_CRC_SIZE))
{
size_t n;
//Add padding as necessary
n = (ETH_MIN_FRAME_SIZE - ETH_CRC_SIZE) - length;
//Append padding bytes
error = netBufferAppend(buffer, ethPadding, n);
//Adjust frame length
length += n;
}
}
}
//Check status code
if(!error)
{
//CRC calculation not supported by hardware?
if(!interface->nicDriver->autoCrcCalc)
{
uint32_t crc;
//Compute CRC over the header and payload
crc = ethCalcCrcEx(buffer, 0, length);
//Convert from host byte order to little-endian byte order
crc = htole32(crc);
//Append the calculated CRC value
error = netBufferAppend(buffer, &crc, sizeof(crc));
//Adjust frame length
length += sizeof(crc);
}
}
//Check status code
if(!error)
{
NetTxAncillary ancillary;
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_TX_ANCILLARY;
#if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
//Set switch port identifier
ancillary.port = message->switchPort;
#endif
#if (ETH_TIMESTAMP_SUPPORT == ENABLED)
//Unique identifier for hardware time stamping
ancillary.timestampId = message->timestampId;
#endif
//Debug message
TRACE_DEBUG("Sending raw Ethernet frame (%" PRIuSIZE " bytes)...\r\n", length);
//Send the resulting packet over the specified link
error = nicSendPacket(interface, buffer, 0, &ancillary);
}
//Free previously allocated memory block
netBufferFree(buffer);
}
else
#endif
//Unknown interface type?
{
//Report an error
error = ERROR_INVALID_INTERFACE;
}
//Return status code
return error;
} | 302 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | rawSocketSendIpPacket | rawSocketSendIpPacket( Socket * socket , const SocketMsg * message , uint_t flags) | ['socket', 'message', 'flags'] | error_t rawSocketSendIpPacket(Socket *socket, const SocketMsg *message,
uint_t flags)
{
error_t error;
size_t offset;
NetBuffer *buffer;
NetInterface *interface;
IpPseudoHeader pseudoHeader;
NetTxAncillary ancillary;
//The socket may be bound to a particular network interface
interface = socket->interface;
//Allocate a buffer memory to hold the raw IP datagram
buffer = ipAllocBuffer(0, &offset);
//Failed to allocate memory?
if(buffer == NULL)
return ERROR_OUT_OF_MEMORY;
//Start of exception handling block
do
{
//Copy the raw data
error = netBufferAppend(buffer, message->data, message->length);
//Any error to report?
if(error)
break;
#if (IPV4_SUPPORT == ENABLED)
//Destination address is an IPv4 address?
if(message->destIpAddr.length == sizeof(Ipv4Addr))
{
Ipv4Addr srcIpAddr;
//Select the source IPv4 address and the relevant network interface
//to use when sending data to the specified destination host
error = ipv4SelectSourceAddr(&interface, message->destIpAddr.ipv4Addr,
&srcIpAddr);
//Any error to report?
if(error)
break;
//Format IPv4 pseudo header
pseudoHeader.length = sizeof(Ipv4PseudoHeader);
pseudoHeader.ipv4Data.srcAddr = srcIpAddr;
pseudoHeader.ipv4Data.destAddr = message->destIpAddr.ipv4Addr;
pseudoHeader.ipv4Data.reserved = 0;
pseudoHeader.ipv4Data.protocol = socket->protocol;
pseudoHeader.ipv4Data.length = htons(message->length);
}
else
#endif
#if (IPV6_SUPPORT == ENABLED)
//Destination address is an IPv6 address?
if(message->destIpAddr.length == sizeof(Ipv6Addr))
{
//Select the source IPv6 address and the relevant network interface
//to use when sending data to the specified destination host
error = ipv6SelectSourceAddr(&interface, &message->destIpAddr.ipv6Addr,
&pseudoHeader.ipv6Data.srcAddr);
//Any error to report?
if(error)
break;
//Format IPv6 pseudo header
pseudoHeader.length = sizeof(Ipv6PseudoHeader);
pseudoHeader.ipv6Data.destAddr = message->destIpAddr.ipv6Addr;
pseudoHeader.ipv6Data.length = htonl(message->length);
pseudoHeader.ipv6Data.reserved[0] = 0;
pseudoHeader.ipv6Data.reserved[1] = 0;
pseudoHeader.ipv6Data.reserved[2] = 0;
pseudoHeader.ipv6Data.nextHeader = socket->protocol;
}
else
#endif
//Invalid destination address?
{
//An internal error has occurred
error = ERROR_FAILURE;
//Exit immediately
break;
}
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_TX_ANCILLARY;
//Set the TTL value to be used
if(message->ttl != 0)
{
ancillary.ttl = message->ttl;
}
else if(ipIsMulticastAddr(&message->destIpAddr))
{
ancillary.ttl = socket->multicastTtl;
}
else
{
ancillary.ttl = socket->ttl;
}
//This flag tells the stack that the destination is on a locally attached
//network and not to perform a lookup of the routing table
if(flags & SOCKET_FLAG_DONT_ROUTE)
{
ancillary.dontRoute = TRUE;
}
#if (IP_DIFF_SERV_SUPPORT == ENABLED)
//Set DSCP field
ancillary.dscp = socket->dscp;
#endif
#if (ETH_SUPPORT == ENABLED)
//Set source and destination MAC addresses
ancillary.srcMacAddr = message->srcMacAddr;
ancillary.destMacAddr = message->destMacAddr;
#endif
#if (ETH_VLAN_SUPPORT == ENABLED)
//Set VLAN PCP and DEI fields
ancillary.vlanPcp = socket->vlanPcp;
ancillary.vlanDei = socket->vlanDei;
#endif
#if (ETH_VMAN_SUPPORT == ENABLED)
//Set VMAN PCP and DEI fields
ancillary.vmanPcp = socket->vmanPcp;
ancillary.vmanDei = socket->vmanDei;
#endif
#if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
//Set switch port identifier
ancillary.port = message->switchPort;
#endif
#if (ETH_TIMESTAMP_SUPPORT == ENABLED)
//Unique identifier for hardware time stamping
ancillary.timestampId = message->timestampId;
#endif
//Send raw IP datagram
error = ipSendDatagram(interface, &pseudoHeader, buffer, offset,
&ancillary);
//Failed to send data?
if(error)
break;
//End of exception handling block
} while(0);
//Free previously allocated memory block
netBufferFree(buffer);
//Return status code
return error;
} | 492 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | getHostByName | getHostByName( NetInterface * interface , const char_t * name , IpAddr * ipAddr , uint_t flags) | ['interface', 'name', 'ipAddr', 'flags'] | error_t getHostByName(NetInterface *interface,
const char_t *name, IpAddr *ipAddr, uint_t flags)
{
error_t error;
HostType type;
HostnameResolver protocol;
//Default address type depends on TCP/IP stack configuration
#if (IPV4_SUPPORT == ENABLED)
type = HOST_TYPE_IPV4;
#elif (IPV6_SUPPORT == ENABLED)
type = HOST_TYPE_IPV6;
#else
type = HOST_TYPE_ANY;
#endif
//Default name resolution protocol depends on TCP/IP stack configuration
#if (DNS_CLIENT_SUPPORT == ENABLED)
protocol = HOST_NAME_RESOLVER_DNS;
#elif (MDNS_CLIENT_SUPPORT == ENABLED)
protocol = HOST_NAME_RESOLVER_MDNS;
#elif (NBNS_CLIENT_SUPPORT == ENABLED)
protocol = HOST_NAME_RESOLVER_NBNS;
#elif (LLMNR_CLIENT_SUPPORT == ENABLED)
protocol = HOST_NAME_RESOLVER_LLMNR;
#else
protocol = HOST_NAME_RESOLVER_ANY;
#endif
//Check parameters
if(name == NULL || ipAddr == NULL)
return ERROR_INVALID_PARAMETER;
//Use default network interface?
if(interface == NULL)
interface = netGetDefaultInterface();
//The specified name can be either an IP or a host name
error = ipStringToAddr(name, ipAddr);
//Perform name resolution if necessary
if(error)
{
//The user may provide a hint to choose between IPv4 and IPv6
if(flags & HOST_TYPE_IPV4)
type = HOST_TYPE_IPV4;
else if(flags & HOST_TYPE_IPV6)
type = HOST_TYPE_IPV6;
//The user may provide a hint to to select the desired protocol to be used
if(flags & HOST_NAME_RESOLVER_DNS)
{
//Use DNS to resolve the specified host name
protocol = HOST_NAME_RESOLVER_DNS;
}
else if(flags & HOST_NAME_RESOLVER_MDNS)
{
//Use mDNS to resolve the specified host name
protocol = HOST_NAME_RESOLVER_MDNS;
}
else if(flags & HOST_NAME_RESOLVER_NBNS)
{
//Use NBNS to resolve the specified host name
protocol = HOST_NAME_RESOLVER_NBNS;
}
else if(flags & HOST_NAME_RESOLVER_LLMNR)
{
//Use LLMNR to resolve the specified host name
protocol = HOST_NAME_RESOLVER_LLMNR;
}
else
{
//Retrieve the length of the host name to be resolved
size_t n = osStrlen(name);
//Select the most suitable protocol
if(n >= 6 && !osStrcasecmp(name + n - 6, ".local"))
{
#if (MDNS_CLIENT_SUPPORT == ENABLED)
//Use mDNS to resolve the specified host name
protocol = HOST_NAME_RESOLVER_MDNS;
#endif
}
else if(n <= 15 && !strchr(name, '.') && type == HOST_TYPE_IPV4)
{
#if (NBNS_CLIENT_SUPPORT == ENABLED)
//Use NetBIOS Name Service to resolve the specified host name
protocol = HOST_NAME_RESOLVER_NBNS;
#endif
}
else if(!strchr(name, '.'))
{
#if (LLMNR_CLIENT_SUPPORT == ENABLED)
//Use LLMNR to resolve the specified host name
protocol = HOST_NAME_RESOLVER_LLMNR;
#endif
}
}
#if (DNS_CLIENT_SUPPORT == ENABLED)
//Use DNS protocol?
if(protocol == HOST_NAME_RESOLVER_DNS)
{
//Perform host name resolution
error = dnsResolve(interface, name, type, ipAddr);
}
else
#endif
#if (MDNS_CLIENT_SUPPORT == ENABLED)
//Use mDNS protocol?
if(protocol == HOST_NAME_RESOLVER_MDNS)
{
//Perform host name resolution
error = mdnsClientResolve(interface, name, type, ipAddr);
}
else
#endif
#if (NBNS_CLIENT_SUPPORT == ENABLED && IPV4_SUPPORT == ENABLED)
//Use NetBIOS Name Service protocol?
if(protocol == HOST_NAME_RESOLVER_NBNS)
{
//Perform host name resolution
error = nbnsResolve(interface, name, ipAddr);
}
else
#endif
#if (LLMNR_CLIENT_SUPPORT == ENABLED)
//Use LLMNR protocol?
if(protocol == HOST_NAME_RESOLVER_LLMNR)
{
//Perform host name resolution
error = llmnrResolve(interface, name, type, ipAddr);
}
else
#endif
//Invalid protocol?
{
//Report an error
error = ERROR_INVALID_PARAMETER;
}
}
//Return status code
return error;
} | 345 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | tcpAddOption | tcpAddOption( TcpHeader * segment , uint8_t kind , const void * value , uint8_t length) | ['segment', 'kind', 'value', 'length'] | error_t tcpAddOption(TcpHeader *segment, uint8_t kind, const void *value,
uint8_t length)
{
uint_t i;
size_t paddingSize;
TcpOption *option;
//Length of the complete option field
length += sizeof(TcpOption);
//Make sure there is enough space to add the specified option
if((segment->dataOffset * 4 + length) > TCP_MAX_HEADER_LENGTH)
return ERROR_FAILURE;
//Index of the first available byte
i = segment->dataOffset * 4 - sizeof(TcpHeader);
//Calculate the number of padding bytes
paddingSize = (length % 4) ? 4 - (length % 4) : 0;
//Write padding bytes
while(paddingSize--)
segment->options[i++] = TCP_OPTION_NOP;
//Point to the current location
option = (TcpOption *) (segment->options + i);
//Write specified option
option->kind = kind;
option->length = length;
osMemcpy(option->value, value, length - sizeof(TcpOption));
//Adjust index value
i += length;
//Update TCP header length
segment->dataOffset = (sizeof(TcpHeader) + i) / 4;
//Option successfully added
return NO_ERROR;
} | 163 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | tcpCheckSeqNum | tcpCheckSeqNum( Socket * socket , TcpHeader * segment , size_t length) | ['socket', 'segment', 'length'] | error_t tcpCheckSeqNum(Socket *socket, TcpHeader *segment, size_t length)
{
//Acceptability test for an incoming segment
bool_t acceptable = FALSE;
//Case where both segment length and receive window are zero
if(!length && !socket->rcvWnd)
{
//Make sure that SEG.SEQ = RCV.NXT
if(segment->seqNum == socket->rcvNxt)
{
acceptable = TRUE;
}
}
//Case where segment length is zero and receive window is non zero
else if(!length && socket->rcvWnd)
{
//Make sure that RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND
if(TCP_CMP_SEQ(segment->seqNum, socket->rcvNxt) >= 0 &&
TCP_CMP_SEQ(segment->seqNum, socket->rcvNxt + socket->rcvWnd) < 0)
{
acceptable = TRUE;
}
}
//Case where both segment length and receive window are non zero
else if(length && socket->rcvWnd)
{
//Check whether RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND
if(TCP_CMP_SEQ(segment->seqNum, socket->rcvNxt) >= 0 &&
TCP_CMP_SEQ(segment->seqNum, socket->rcvNxt + socket->rcvWnd) < 0)
{
acceptable = TRUE;
}
//or RCV.NXT <= SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
else if(TCP_CMP_SEQ(segment->seqNum + length - 1, socket->rcvNxt) >= 0 &&
TCP_CMP_SEQ(segment->seqNum + length - 1, socket->rcvNxt + socket->rcvWnd) < 0)
{
acceptable = TRUE;
}
}
//Non acceptable sequence number?
if(!acceptable)
{
//Debug message
TRACE_WARNING("Sequence number is not acceptable!\r\n");
//If an incoming segment is not acceptable, an acknowledgment
//should be sent in reply (unless the RST bit is set)
if(!(segment->flags & TCP_FLAG_RST))
tcpSendSegment(socket, TCP_FLAG_ACK, socket->sndNxt, socket->rcvNxt, 0, FALSE);
//Return status code
return ERROR_FAILURE;
}
//Sequence number is acceptable
return NO_ERROR;
} | 242 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | tcpGetOption | tcpGetOption( TcpHeader * segment , uint8_t kind) | ['segment', 'kind'] | TcpOption *tcpGetOption(TcpHeader *segment, uint8_t kind)
{
size_t length;
uint_t i;
TcpOption *option;
//Make sure the TCP header is valid
if(segment->dataOffset < 5)
return NULL;
//Compute the length of the options field
length = segment->dataOffset * 4 - sizeof(TcpHeader);
//Point to the very first option
i = 0;
//Parse TCP options
while(i < length)
{
//Point to the current option
option = (TcpOption *) (segment->options + i);
//NOP option detected?
if(option->kind == TCP_OPTION_NOP)
{
i++;
continue;
}
//END option detected?
if(option->kind == TCP_OPTION_END)
break;
//Check option length
if((i + 1) >= length || (i + option->length) > length)
break;
//Current option kind match the specified one?
if(option->kind == kind)
return option;
//Jump to next the next option
i += option->length;
}
//Specified option code not found
return NULL;
} | 138 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | udpSendDatagram | udpSendDatagram( Socket * socket , const SocketMsg * message , uint_t flags) | ['socket', 'message', 'flags'] | error_t udpSendDatagram(Socket *socket, const SocketMsg *message, uint_t flags)
{
error_t error;
size_t offset;
NetBuffer *buffer;
NetTxAncillary ancillary;
//Allocate a memory buffer to hold the UDP datagram
buffer = udpAllocBuffer(0, &offset);
//Failed to allocate buffer?
if(buffer == NULL)
return ERROR_OUT_OF_MEMORY;
//Copy data payload
error = netBufferAppend(buffer, message->data, message->length);
//Successful processing?
if(!error)
{
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_TX_ANCILLARY;
//Set the TTL value to be used
if(message->ttl != 0)
{
ancillary.ttl = message->ttl;
}
else if(ipIsMulticastAddr(&message->destIpAddr))
{
ancillary.ttl = socket->multicastTtl;
}
else
{
ancillary.ttl = socket->ttl;
}
//This flag tells the stack that the destination is on a locally attached
//network and not to perform a lookup of the routing table
if(flags & SOCKET_FLAG_DONT_ROUTE)
{
ancillary.dontRoute = TRUE;
}
#if (IP_DIFF_SERV_SUPPORT == ENABLED)
//Set DSCP field
ancillary.dscp = socket->dscp;
#endif
#if (ETH_SUPPORT == ENABLED)
//Set source and destination MAC addresses
ancillary.srcMacAddr = message->srcMacAddr;
ancillary.destMacAddr = message->destMacAddr;
#endif
#if (ETH_VLAN_SUPPORT == ENABLED)
//Set VLAN PCP and DEI fields
ancillary.vlanPcp = socket->vlanPcp;
ancillary.vlanDei = socket->vlanDei;
#endif
#if (ETH_VMAN_SUPPORT == ENABLED)
//Set VMAN PCP and DEI fields
ancillary.vmanPcp = socket->vmanPcp;
ancillary.vmanDei = socket->vmanDei;
#endif
#if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
//Set switch port identifier
ancillary.port = message->switchPort;
#endif
#if (ETH_TIMESTAMP_SUPPORT == ENABLED)
//Unique identifier for hardware time stamping
ancillary.timestampId = message->timestampId;
#endif
//Send UDP datagram
error = udpSendBuffer(socket->interface, &message->srcIpAddr,
socket->localPort, &message->destIpAddr, message->destPort, buffer,
offset, &ancillary);
}
//Free previously allocated memory
netBufferFree(buffer);
//Return status code
return error;
} | 252 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dhcpClientProcessMessage | dhcpClientProcessMessage( NetInterface * interface , const IpPseudoHeader * pseudoHeader , const UdpHeader * udpHeader , const NetBuffer * buffer , size_t offset , const NetRxAncillary * ancillary , void * param) | ['interface', 'pseudoHeader', 'udpHeader', 'buffer', 'offset', 'ancillary', 'param'] | void dhcpClientProcessMessage(NetInterface *interface,
const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader,
const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary,
void *param)
{
size_t length;
DhcpClientContext *context;
DhcpMessage *message;
DhcpOption *option;
//Point to the DHCP client context
context = (DhcpClientContext *) param;
//Retrieve the length of the DHCP message
length = netBufferGetLength(buffer) - offset;
//Make sure the DHCP message is valid
if(length < sizeof(DhcpMessage))
return;
if(length > DHCP_MAX_MSG_SIZE)
return;
//Point to the beginning of the DHCP message
message = netBufferAt(buffer, offset);
//Sanity check
if(message == NULL)
return;
//Debug message
TRACE_DEBUG("\r\n%s: DHCP message received (%" PRIuSIZE " bytes)...\r\n",
formatSystemTime(osGetSystemTime(), NULL), length);
//Dump the contents of the message for debugging purpose
dhcpDumpMessage(message, length);
//The DHCP server shall respond with a BOOTREPLY opcode
if(message->op != DHCP_OPCODE_BOOTREPLY)
return;
//Enforce hardware type
if(message->htype != DHCP_HARDWARE_TYPE_ETH)
return;
//Check the length of the hardware address
if(message->hlen != sizeof(MacAddr))
return;
//Check magic cookie
if(message->magicCookie != HTONL(DHCP_MAGIC_COOKIE))
return;
//The DHCP Message Type option must be included in every DHCP message
option = dhcpGetOption(message, length, DHCP_OPT_DHCP_MESSAGE_TYPE);
//Failed to retrieve the Message Type option?
if(option == NULL || option->length != 1)
return;
//Check message type
switch(option->value[0])
{
case DHCP_MESSAGE_TYPE_OFFER:
//Parse DHCPOFFER message
dhcpClientParseOffer(context, message, length);
break;
case DHCP_MESSAGE_TYPE_ACK:
//Parse DHCPACK message
dhcpClientParseAck(context, message, length);
break;
case DHCP_MESSAGE_TYPE_NAK:
//Parse DHCPNAK message
dhcpClientParseNak(context, message, length);
break;
default:
//Silently drop incoming message
break;
}
} | 256 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dhcpAddOption | dhcpAddOption( DhcpMessage * message , uint8_t optionCode , const void * optionValue , size_t optionLen) | ['message', 'optionCode', 'optionValue', 'optionLen'] | void dhcpAddOption(DhcpMessage *message, uint8_t optionCode,
const void *optionValue, size_t optionLen)
{
size_t n;
DhcpOption *option;
//Point to the very first option
n = 0;
//Parse DHCP options
while(1)
{
//Point to the current option
option = (DhcpOption *) (message->options + n);
//End option detected?
if(option->code == DHCP_OPT_END)
break;
//Jump to next the next option
n += sizeof(DhcpOption) + option->length;
}
//Sanity check
if(optionLen <= UINT8_MAX)
{
//Point to the buffer where the option is to be written
option = (DhcpOption *) (message->options + n);
//Option code
option->code = optionCode;
//Option length
option->length = (uint8_t) optionLen;
//Option value
osMemcpy(option->value, optionValue, optionLen);
//Jump to next the next option
n += sizeof(DhcpOption) + option->length;
//Point to the buffer where the option is to be written
option = (DhcpOption *) (message->options + n);
//Always terminate the options field with 255
option->code = DHCP_OPT_END;
}
} | 150 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dhcpGetOption | dhcpGetOption( const DhcpMessage * message , size_t length , uint8_t optionCode) | ['message', 'length', 'optionCode'] | DhcpOption *dhcpGetOption(const DhcpMessage *message,
size_t length, uint8_t optionCode)
{
uint_t i;
DhcpOption *option;
//Make sure the DHCP header is valid
if(length < sizeof(DhcpMessage))
return NULL;
//Get the length of the options field
length -= sizeof(DhcpMessage);
//Parse DHCP options
for(i = 0; i < length; i++)
{
//Point to the current option
option = (DhcpOption *) (message->options + i);
//Pad option detected?
if(option->code == DHCP_OPT_PAD)
continue;
//End option detected?
if(option->code == DHCP_OPT_END)
break;
//Check option length
if((i + 1) >= length || (i + 1 + option->length) >= length)
break;
//Current option code matches the specified one?
if(option->code == optionCode)
return option;
//Jump to the next option
i += option->length + 1;
}
//Specified option code not found
return NULL;
} | 136 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dhcpServerParseDiscover | dhcpServerParseDiscover( DhcpServerContext * context , const DhcpMessage * message , size_t length) | ['context', 'message', 'length'] | void dhcpServerParseDiscover(DhcpServerContext *context,
const DhcpMessage *message, size_t length)
{
error_t error;
uint_t i;
NetInterface *interface;
Ipv4Addr requestedIpAddr;
DhcpOption *option;
DhcpServerBinding *binding;
//Point to the underlying network interface
interface = context->settings.interface;
//Index of the IP address assigned to the DHCP server
i = context->settings.ipAddrIndex;
//Retrieve Server Identifier option
option = dhcpGetOption(message, length, DHCP_OPT_SERVER_IDENTIFIER);
//Option found?
if(option != NULL && option->length == 4)
{
//Unexpected server identifier?
if(!ipv4CompAddr(option->value, &interface->ipv4Context.addrList[i].addr))
return;
}
//Retrieve Requested IP Address option
option = dhcpGetOption(message, length, DHCP_OPT_REQUESTED_IP_ADDRESS);
//The client may include the 'requested IP address' option to suggest
//that a particular IP address be assigned
if(option != NULL && option->length == 4)
ipv4CopyAddr(&requestedIpAddr, option->value);
else
requestedIpAddr = IPV4_UNSPECIFIED_ADDR;
//Search the list for a matching binding
binding = dhcpServerFindBindingByMacAddr(context, &message->chaddr);
//Matching binding found?
if(binding != NULL)
{
//Different IP address than cached?
if(requestedIpAddr != binding->ipAddr)
{
//Ensure the IP address is in the server's pool of available addresses
if(ntohl(requestedIpAddr) >= ntohl(context->settings.ipAddrRangeMin) &&
ntohl(requestedIpAddr) <= ntohl(context->settings.ipAddrRangeMax))
{
//Make sure the IP address is not already allocated
if(!dhcpServerFindBindingByIpAddr(context, requestedIpAddr))
{
//Record IP address
binding->ipAddr = requestedIpAddr;
//Get current time
binding->timestamp = osGetSystemTime();
}
}
}
//Sucessful processing
error = NO_ERROR;
}
else
{
//Create a new binding
binding = dhcpServerCreateBinding(context);
//Binding successfully created
if(binding != NULL)
{
//Ensure the IP address is in the server's pool of available addresses
if(ntohl(requestedIpAddr) >= ntohl(context->settings.ipAddrRangeMin) &&
ntohl(requestedIpAddr) <= ntohl(context->settings.ipAddrRangeMax))
{
//Make sure the IP address is not already allocated
if(!dhcpServerFindBindingByIpAddr(context, requestedIpAddr))
{
//Record IP address
binding->ipAddr = requestedIpAddr;
//Sucessful processing
error = NO_ERROR;
}
else
{
//Retrieve the next available IP address from the pool of addresses
error = dhcpServerGetNextIpAddr(context, &binding->ipAddr);
}
}
else
{
//Retrieve the next available IP address from the pool of addresses
error = dhcpServerGetNextIpAddr(context, &binding->ipAddr);
}
//Check status code
if(!error)
{
//Record MAC address
binding->macAddr = message->chaddr;
//Get current time
binding->timestamp = osGetSystemTime();
}
}
else
{
//Failed to create a new binding
error = ERROR_FAILURE;
}
}
//Check status code
if(!error)
{
//The server responds with a DHCPOFFER message that includes an
//available network address in the 'yiaddr' field (and other
//configuration parameters in DHCP options)
dhcpServerSendReply(context, DHCP_MESSAGE_TYPE_OFFER,
binding->ipAddr, message, length);
}
} | 386 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000EventHandler | dm9000EventHandler( NetInterface * interface) | ['interface'] | void dm9000EventHandler(NetInterface *interface)
{
error_t error;
uint8_t status;
//Read interrupt status register
status = dm9000ReadReg(DM9000_REG_ISR);
//Check whether the link status has changed?
if((status & ISR_LNKCHG) != 0)
{
//Clear interrupt flag
dm9000WriteReg(DM9000_REG_ISR, ISR_LNKCHG);
//Read network status register
status = dm9000ReadReg(DM9000_REG_NSR);
//Check link state
if((status & NSR_LINKST) != 0)
{
//Get current speed
if((status & NSR_SPEED) != 0)
{
interface->linkSpeed = NIC_LINK_SPEED_10MBPS;
}
else
{
interface->linkSpeed = NIC_LINK_SPEED_100MBPS;
}
//Read network control register
status = dm9000ReadReg(DM9000_REG_NCR);
//Determine the new duplex mode
if((status & NCR_FDX) != 0)
{
interface->duplexMode = NIC_FULL_DUPLEX_MODE;
}
else
{
interface->duplexMode = NIC_HALF_DUPLEX_MODE;
}
//Link is up
interface->linkState = TRUE;
}
else
{
//Link is down
interface->linkState = FALSE;
}
//Process link state change event
nicNotifyLinkChange(interface);
}
//Check whether a packet has been received?
if((status & ISR_PR) != 0)
{
//Clear interrupt flag
dm9000WriteReg(DM9000_REG_ISR, ISR_PR);
//Process all pending packets
do
{
//Read incoming packet
error = dm9000ReceivePacket(interface);
//No more data in the receive buffer?
} while(error != ERROR_BUFFER_EMPTY);
}
//Re-enable LNKCHGI and PRI interrupts
dm9000WriteReg(DM9000_REG_IMR, IMR_PAR | IMR_LNKCHGI | IMR_PTI | IMR_PRI);
} | 189 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000Init | dm9000Init( NetInterface * interface) | ['interface'] | error_t dm9000Init(NetInterface *interface)
{
uint_t i;
uint16_t vendorId;
uint16_t productId;
uint8_t chipRevision;
Dm9000Context *context;
//Debug message
TRACE_INFO("Initializing DM9000 Ethernet controller...\r\n");
//Initialize external interrupt line
interface->extIntDriver->init();
//Point to the driver context
context = (Dm9000Context *) interface->nicContext;
//Initialize driver specific variables
context->queuedPackets = 0;
//Allocate TX and RX buffers
context->txBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
context->rxBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
//Failed to allocate memory?
if(context->txBuffer == NULL || context->rxBuffer == NULL)
{
//Clean up side effects
memPoolFree(context->txBuffer);
memPoolFree(context->rxBuffer);
//Report an error
return ERROR_OUT_OF_MEMORY;
}
//Retrieve vendorID, product ID and chip revision
vendorId = (dm9000ReadReg(DM9000_REG_VIDH) << 8) | dm9000ReadReg(DM9000_REG_VIDL);
productId = (dm9000ReadReg(DM9000_REG_PIDH) << 8) | dm9000ReadReg(DM9000_REG_PIDL);
chipRevision = dm9000ReadReg(DM9000_REG_CHIPR);
//Check vendor ID and product ID
if(vendorId != DM9000_VID || productId != DM9000_PID)
{
return ERROR_WRONG_IDENTIFIER;
}
//Check chip revision
if(chipRevision != DM9000A_CHIP_REV && chipRevision != DM9000B_CHIP_REV)
{
return ERROR_WRONG_IDENTIFIER;
}
//Power up the internal PHY by clearing PHYPD
dm9000WriteReg(DM9000_REG_GPR, 0x00);
//Wait for the PHY to be ready
sleep(10);
//Software reset
dm9000WriteReg(DM9000_REG_NCR, NCR_RST);
//Wait for the reset to complete
while((dm9000ReadReg(DM9000_REG_NCR) & NCR_RST) != 0)
{
}
//PHY software reset
dm9000WritePhyReg(DM9000_PHY_REG_BMCR, BMCR_RST);
//Wait for the PHY reset to complete
while((dm9000ReadPhyReg(DM9000_PHY_REG_BMCR) & BMCR_RST) != 0)
{
}
//Debug message
TRACE_INFO(" VID = 0x%04" PRIX16 "\r\n", vendorId);
TRACE_INFO(" PID = 0x%04" PRIX16 "\r\n", productId);
TRACE_INFO(" CHIPR = 0x%02" PRIX8 "\r\n", chipRevision);
TRACE_INFO(" PHYIDR1 = 0x%04" PRIX16 "\r\n", dm9000ReadPhyReg(DM9000_PHY_REG_PHYIDR1));
TRACE_INFO(" PHYIDR2 = 0x%04" PRIX16 "\r\n", dm9000ReadPhyReg(DM9000_PHY_REG_PHYIDR2));
//Enable loopback mode?
#if (DM9000_LOOPBACK_MODE == ENABLED)
dm9000WriteReg(DM9000_REG_NCR, DM9000_LBK_PHY);
dm9000WritePhyReg(DM9000_PHY_REG_BMCR, BMCR_LOOPBACK | BMCR_SPEED_SEL | BMCR_AN_EN | BMCR_DUPLEX_MODE);
#endif
//Set host MAC address
for(i = 0; i < 6; i++)
{
dm9000WriteReg(DM9000_REG_PAR0 + i, interface->macAddr.b[i]);
}
//Initialize hash table
for(i = 0; i < 8; i++)
{
dm9000WriteReg(DM9000_REG_MAR0 + i, 0x00);
}
//Always accept broadcast packets
dm9000WriteReg(DM9000_REG_MAR7, 0x80);
//Enable the Pointer Auto Return function
dm9000WriteReg(DM9000_REG_IMR, IMR_PAR);
//Clear NSR status bits
dm9000WriteReg(DM9000_REG_NSR, NSR_WAKEST | NSR_TX2END | NSR_TX1END);
//Clear interrupt flags
dm9000WriteReg(DM9000_REG_ISR, ISR_LNKCHG | ISR_UDRUN | ISR_ROO | ISR_ROS | ISR_PT | ISR_PR);
//Enable interrupts
dm9000WriteReg(DM9000_REG_IMR, IMR_PAR | IMR_LNKCHGI | IMR_PTI | IMR_PRI);
//Enable the receiver by setting RXEN
dm9000WriteReg(DM9000_REG_RCR, RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN);
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Force the TCP/IP stack to poll the link state at startup
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 446 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000IrqHandler | dm9000IrqHandler( NetInterface * interface) | ['interface'] | bool_t dm9000IrqHandler(NetInterface *interface)
{
bool_t flag;
uint8_t status;
uint8_t mask;
Dm9000Context *context;
//This flag will be set if a higher priority task must be woken
flag = FALSE;
//Point to the driver context
context = (Dm9000Context *) interface->nicContext;
//Read interrupt status register
status = dm9000ReadReg(DM9000_REG_ISR);
//Link status change?
if((status & ISR_LNKCHG) != 0)
{
//Read interrupt mask register
mask = dm9000ReadReg(DM9000_REG_IMR);
//Disable LNKCHGI interrupt
dm9000WriteReg(DM9000_REG_IMR, mask & ~IMR_LNKCHGI);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet transmission complete?
if((status & ISR_PT) != 0)
{
//Check TX complete status bits
if(dm9000ReadReg(DM9000_REG_NSR) & (NSR_TX2END | NSR_TX1END))
{
//The transmission of the current packet is complete
if(context->queuedPackets > 0)
{
context->queuedPackets--;
}
//Notify the TCP/IP stack that the transmitter is ready to send
flag |= osSetEventFromIsr(&interface->nicTxEvent);
}
//Clear interrupt flag
dm9000WriteReg(DM9000_REG_ISR, ISR_PT);
}
//Packet received?
if((status & ISR_PR) != 0)
{
//Read interrupt mask register
mask = dm9000ReadReg(DM9000_REG_IMR);
//Disable PRI interrupt
dm9000WriteReg(DM9000_REG_IMR, mask & ~IMR_PRI);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//A higher priority task must be woken?
return flag;
} | 188 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000ReadPhyReg | dm9000ReadPhyReg( uint8_t address) | ['address'] | uint16_t dm9000ReadPhyReg(uint8_t address)
{
//Write PHY register address
dm9000WriteReg(DM9000_REG_EPAR, 0x40 | address);
//Start the read operation
dm9000WriteReg(DM9000_REG_EPCR, EPCR_EPOS | EPCR_ERPRR);
//PHY access is still in progress?
while((dm9000ReadReg(DM9000_REG_EPCR) & EPCR_ERRE) != 0)
{
}
//Clear command register
dm9000WriteReg(DM9000_REG_EPCR, EPCR_EPOS);
//Wait 5us minimum
usleep(5);
//Return register value
return (dm9000ReadReg(DM9000_REG_EPDRH) << 8) | dm9000ReadReg(DM9000_REG_EPDRL);
} | 68 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000ReceivePacket | dm9000ReceivePacket( NetInterface * interface) | ['interface'] | error_t dm9000ReceivePacket(NetInterface *interface)
{
error_t error;
size_t i;
size_t n;
size_t length;
volatile uint8_t status;
volatile uint16_t data;
Dm9000Context *context;
//Point to the driver context
context = (Dm9000Context *) interface->nicContext;
//A dummy read is required before accessing the 4-byte header
data = dm9000ReadReg(DM9000_REG_MRCMDX);
//Select MRCMDX1 register
DM9000_INDEX_REG = DM9000_REG_MRCMDX1;
//Read the first byte of the header
status = LSB(DM9000_DATA_REG);
//The first byte indicates if a packet has been received
if(status == 0x01)
{
//Select MRCMD register
DM9000_INDEX_REG = DM9000_REG_MRCMD;
//The second byte is the RX status byte
status = MSB(DM9000_DATA_REG);
//Retrieve packet length
length = DM9000_DATA_REG;
//Limit the number of data to read
n = MIN(length, ETH_MAX_FRAME_SIZE);
//Point to the beginning of the buffer
i = 0;
//Make sure no error occurred
if((status & (RSR_LCS | RSR_RWTO | RSR_PLE | RSR_AE | RSR_CE | RSR_FOE)) == 0)
{
//Read data from FIFO using 16-bit mode
while((i + 1) < n)
{
data = DM9000_DATA_REG;
context->rxBuffer[i++] = LSB(data);
context->rxBuffer[i++] = MSB(data);
}
//Odd number of bytes to read?
if((i + 1) == n)
{
data = DM9000_DATA_REG;
context->rxBuffer[i] = LSB(data);
i += 2;
}
//Valid packet received
error = NO_ERROR;
}
else
{
//The received packet contains an error
error = ERROR_INVALID_PACKET;
}
//Flush remaining bytes
while(i < length)
{
data = DM9000_DATA_REG;
i += 2;
}
}
else
{
//No more data in the receive buffer
error = ERROR_BUFFER_EMPTY;
}
//Check whether a valid packet has been received
if(!error)
{
NetRxAncillary ancillary;
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_RX_ANCILLARY;
//Pass the packet to the upper layer
nicProcessPacket(interface, context->rxBuffer, n, &ancillary);
}
//Return status code
return error;
} | 259 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000SendPacket | dm9000SendPacket( NetInterface * interface , const NetBuffer * buffer , size_t offset , NetTxAncillary * ancillary) | ['interface', 'buffer', 'offset', 'ancillary'] | error_t dm9000SendPacket(NetInterface *interface,
const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
{
size_t i;
size_t length;
uint16_t *p;
Dm9000Context *context;
//Point to the driver context
context = (Dm9000Context *) interface->nicContext;
//Retrieve the length of the packet
length = netBufferGetLength(buffer) - offset;
//Check the frame length
if(length > ETH_MAX_FRAME_SIZE)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Report an error
return ERROR_INVALID_LENGTH;
}
//Copy user data
netBufferRead(context->txBuffer, buffer, offset, length);
//A dummy write is required before accessing FIFO
dm9000WriteReg(DM9000_REG_MWCMDX, 0);
//Select MWCMD register
DM9000_INDEX_REG = DM9000_REG_MWCMD;
//Point to the beginning of the buffer
p = (uint16_t *) context->txBuffer;
//Write data to the FIFO using 16-bit mode
for(i = length; i > 1; i -= 2)
{
DM9000_DATA_REG = *(p++);
}
//Odd number of bytes?
if(i > 0)
{
DM9000_DATA_REG = *((uint8_t *) p);
}
//Write the number of bytes to send
dm9000WriteReg(DM9000_REG_TXPLL, LSB(length));
dm9000WriteReg(DM9000_REG_TXPLH, MSB(length));
//Clear interrupt flag
dm9000WriteReg(DM9000_REG_ISR, ISR_PT);
//Start data transfer
dm9000WriteReg(DM9000_REG_TCR, TCR_TXREQ);
//The packet was successfully written to FIFO
context->queuedPackets++;
//Successful processing
return NO_ERROR;
} | 191 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000UpdateMacAddrFilter | dm9000UpdateMacAddrFilter( NetInterface * interface) | ['interface'] | error_t dm9000UpdateMacAddrFilter(NetInterface *interface)
{
uint_t i;
uint_t k;
uint32_t crc;
uint8_t hashTable[8];
MacFilterEntry *entry;
//Debug message
TRACE_DEBUG("Updating MAC filter...\r\n");
//Clear hash table
osMemset(hashTable, 0, sizeof(hashTable));
//Always accept broadcast packets regardless of the MAC filter table
hashTable[7] = 0x80;
//The MAC address filter contains the list of MAC addresses to accept
//when receiving an Ethernet frame
for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
{
//Point to the current entry
entry = &interface->macAddrFilter[i];
//Valid entry?
if(entry->refCount > 0)
{
//Compute CRC over the current MAC address
crc = dm9000CalcCrc(&entry->addr, sizeof(MacAddr));
//Calculate the corresponding index in the table
k = crc & 0x3F;
//Update hash table contents
hashTable[k / 8] |= (1 << (k % 8));
}
}
//Write the hash table to the DM9000 controller
for(i = 0; i < 8; i++)
{
dm9000WriteReg(DM9000_REG_MAR0 + i, hashTable[i]);
}
//Debug message
TRACE_DEBUG(" MAR = %02" PRIX8 " %02" PRIX8 " %02" PRIX8 " %02" PRIX8 " "
"%02" PRIX8 " %02" PRIX8 " %02" PRIX8 " %02" PRIX8 "\r\n",
dm9000ReadReg(DM9000_REG_MAR0), dm9000ReadReg(DM9000_REG_MAR1),
dm9000ReadReg(DM9000_REG_MAR2), dm9000ReadReg(DM9000_REG_MAR3),
dm9000ReadReg(DM9000_REG_MAR4), dm9000ReadReg(DM9000_REG_MAR5),
dm9000ReadReg(DM9000_REG_MAR6), dm9000ReadReg(DM9000_REG_MAR7));
//Successful processing
return NO_ERROR;
} | 217 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | dm9000WritePhyReg | dm9000WritePhyReg( uint8_t address , uint16_t data) | ['address', 'data'] | void dm9000WritePhyReg(uint8_t address, uint16_t data)
{
//Write PHY register address
dm9000WriteReg(DM9000_REG_EPAR, 0x40 | address);
//Write register value
dm9000WriteReg(DM9000_REG_EPDRL, LSB(data));
dm9000WriteReg(DM9000_REG_EPDRH, MSB(data));
//Start the write operation
dm9000WriteReg(DM9000_REG_EPCR, EPCR_EPOS | EPCR_ERPRW);
//PHY access is still in progress?
while((dm9000ReadReg(DM9000_REG_EPCR) & EPCR_ERRE) != 0)
{
}
//Wait 5us minimum
usleep(5);
//Clear command register
dm9000WriteReg(DM9000_REG_EPCR, EPCR_EPOS);
} | 75 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60EventHandler | enc28j60EventHandler( NetInterface * interface) | ['interface'] | void enc28j60EventHandler(NetInterface *interface)
{
error_t error;
uint16_t status;
uint16_t value;
//Read interrupt status register
status = enc28j60ReadReg(interface, ENC28J60_REG_EIR);
//Check whether the link state has changed
if((status & EIR_LINKIF) != 0)
{
//Clear PHY interrupts flags
enc28j60ReadPhyReg(interface, ENC28J60_PHY_REG_PHIR);
//Clear interrupt flag
enc28j60ClearBit(interface, ENC28J60_REG_EIR, EIR_LINKIF);
//Read PHY status register
value = enc28j60ReadPhyReg(interface, ENC28J60_PHY_REG_PHSTAT2);
//Check link state
if((value & PHSTAT2_LSTAT) != 0)
{
//Link speed
interface->linkSpeed = NIC_LINK_SPEED_10MBPS;
#if (ENC28J60_FULL_DUPLEX_SUPPORT == ENABLED)
//Full-duplex mode
interface->duplexMode = NIC_FULL_DUPLEX_MODE;
#else
//Half-duplex mode
interface->duplexMode = NIC_HALF_DUPLEX_MODE;
#endif
//Link is up
interface->linkState = TRUE;
}
else
{
//Link is down
interface->linkState = FALSE;
}
//Process link state change event
nicNotifyLinkChange(interface);
}
//Check whether a packet has been received?
if((status & EIR_PKTIF) != 0)
{
//Clear interrupt flag
enc28j60ClearBit(interface, ENC28J60_REG_EIR, EIR_PKTIF);
//Process all pending packets
do
{
//Read incoming packet
error = enc28j60ReceivePacket(interface);
//No more data in the receive buffer?
} while(error != ERROR_BUFFER_EMPTY);
}
//Re-enable LINKIE and PKTIE interrupts
enc28j60SetBit(interface, ENC28J60_REG_EIE, EIE_LINKIE | EIE_PKTIE);
} | 162 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60Init | enc28j60Init( NetInterface * interface) | ['interface'] | error_t enc28j60Init(NetInterface *interface)
{
uint8_t revisionId;
Enc28j60Context *context;
//Debug message
TRACE_INFO("Initializing ENC28J60 Ethernet controller...\r\n");
//Initialize SPI
interface->spiDriver->init();
//Initialize external interrupt line
interface->extIntDriver->init();
//Issue a system reset
enc28j60SoftReset(interface);
//After issuing the reset command, wait at least 1ms in firmware
//for the device to be ready
sleep(10);
//Point to the driver context
context = (Enc28j60Context *) interface->nicContext;
//Initialize driver specific variables
context->currentBank = UINT16_MAX;
context->nextPacket = ENC28J60_RX_BUFFER_START;
//Allocate RX buffer
context->rxBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
//Failed to allocate memory?
if(context->rxBuffer == NULL)
{
return ERROR_OUT_OF_MEMORY;
}
//Read silicon revision ID
revisionId = enc28j60ReadReg(interface, ENC28J60_REG_EREVID);
//Debug message
TRACE_INFO("ENC28J60 revision ID: 0x%02X\r\n", revisionId);
//Disable CLKOUT output
enc28j60WriteReg(interface, ENC28J60_REG_ECOCON, 0x00);
//Set the MAC address of the station
enc28j60WriteReg(interface, ENC28J60_REG_MAADR1, interface->macAddr.b[0]);
enc28j60WriteReg(interface, ENC28J60_REG_MAADR2, interface->macAddr.b[1]);
enc28j60WriteReg(interface, ENC28J60_REG_MAADR3, interface->macAddr.b[2]);
enc28j60WriteReg(interface, ENC28J60_REG_MAADR4, interface->macAddr.b[3]);
enc28j60WriteReg(interface, ENC28J60_REG_MAADR5, interface->macAddr.b[4]);
enc28j60WriteReg(interface, ENC28J60_REG_MAADR6, interface->macAddr.b[5]);
//Set receive buffer location
enc28j60WriteReg(interface, ENC28J60_REG_ERXSTL, LSB(ENC28J60_RX_BUFFER_START));
enc28j60WriteReg(interface, ENC28J60_REG_ERXSTH, MSB(ENC28J60_RX_BUFFER_START));
enc28j60WriteReg(interface, ENC28J60_REG_ERXNDL, LSB(ENC28J60_RX_BUFFER_STOP));
enc28j60WriteReg(interface, ENC28J60_REG_ERXNDH, MSB(ENC28J60_RX_BUFFER_STOP));
//The ERXRDPT register defines a location within the FIFO
//where the receive hardware is forbidden to write to
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTL, LSB(ENC28J60_RX_BUFFER_STOP));
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTH, MSB(ENC28J60_RX_BUFFER_STOP));
//Configure the receive filters
enc28j60WriteReg(interface, ENC28J60_REG_ERXFCON, ERXFCON_UCEN |
ERXFCON_CRCEN | ERXFCON_HTEN | ERXFCON_BCEN);
//Initialize the hash table
enc28j60WriteReg(interface, ENC28J60_REG_EHT0, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT1, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT2, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT3, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT4, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT5, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT6, 0x00);
enc28j60WriteReg(interface, ENC28J60_REG_EHT7, 0x00);
//Pull the MAC out of reset
enc28j60WriteReg(interface, ENC28J60_REG_MACON2, 0x00);
//Enable the MAC to receive frames
enc28j60WriteReg(interface, ENC28J60_REG_MACON1,
MACON1_TXPAUS | MACON1_RXPAUS | MACON1_MARXEN);
//Enable automatic padding to at least 60 bytes, always append a valid CRC
//and check frame length. MAC can operate in half-duplex or full-duplex mode
#if (ENC28J60_FULL_DUPLEX_SUPPORT == ENABLED)
enc28j60WriteReg(interface, ENC28J60_REG_MACON3, MACON3_PADCFG(1) |
MACON3_TXCRCEN | MACON3_FRMLNEN | MACON3_FULDPX);
#else
enc28j60WriteReg(interface, ENC28J60_REG_MACON3, MACON3_PADCFG(1) |
MACON3_TXCRCEN | MACON3_FRMLNEN);
#endif
//When the medium is occupied, the MAC will wait indefinitely for it to
//become free when attempting to transmit
enc28j60WriteReg(interface, ENC28J60_REG_MACON4, MACON4_DEFER);
//Maximum frame length that can be received or transmitted
enc28j60WriteReg(interface, ENC28J60_REG_MAMXFLL, LSB(ETH_MAX_FRAME_SIZE));
enc28j60WriteReg(interface, ENC28J60_REG_MAMXFLH, MSB(ETH_MAX_FRAME_SIZE));
//Configure the back-to-back inter-packet gap register
#if (ENC28J60_FULL_DUPLEX_SUPPORT == ENABLED)
enc28j60WriteReg(interface, ENC28J60_REG_MABBIPG, 0x15);
#else
enc28j60WriteReg(interface, ENC28J60_REG_MABBIPG, 0x12);
#endif
//Configure the non-back-to-back inter-packet gap register
enc28j60WriteReg(interface, ENC28J60_REG_MAIPGL, 0x12);
enc28j60WriteReg(interface, ENC28J60_REG_MAIPGH, 0x0C);
//Collision window register
enc28j60WriteReg(interface, ENC28J60_REG_MACLCON2, 63);
//Set the PHY to the proper duplex mode
#if (ENC28J60_FULL_DUPLEX_SUPPORT == ENABLED)
enc28j60WritePhyReg(interface, ENC28J60_PHY_REG_PHCON1, PHCON1_PDPXMD);
#else
enc28j60WritePhyReg(interface, ENC28J60_PHY_REG_PHCON1, 0x0000);
#endif
//Disable half-duplex loopback in PHY
enc28j60WritePhyReg(interface, ENC28J60_PHY_REG_PHCON2, PHCON2_HDLDIS);
//LEDA displays link status and LEDB displays TX/RX activity
enc28j60WritePhyReg(interface, ENC28J60_PHY_REG_PHLCON,
PHLCON_LACFG(4) | PHLCON_LBCFG(7) | PHLCON_LFRQ(0) | PHLCON_STRCH);
//Clear interrupt flags
enc28j60WriteReg(interface, ENC28J60_REG_EIR, 0x00);
//Configure interrupts as desired
enc28j60WriteReg(interface, ENC28J60_REG_EIE, EIE_INTIE |
EIE_PKTIE | EIE_LINKIE | EIE_TXIE | EIE_TXERIE);
//Configure PHY interrupts as desired
enc28j60WritePhyReg(interface, ENC28J60_PHY_REG_PHIE,
PHIE_PLNKIE | PHIE_PGEIE);
//Set RXEN to enable reception
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_RXEN);
//Dump registers for debugging purpose
enc28j60DumpReg(interface);
enc28j60DumpPhyReg(interface);
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Force the TCP/IP stack to poll the link state at startup
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 634 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60IrqHandler | enc28j60IrqHandler( NetInterface * interface) | ['interface'] | bool_t enc28j60IrqHandler(NetInterface *interface)
{
bool_t flag;
uint8_t status;
//This flag will be set if a higher priority task must be woken
flag = FALSE;
//Clear the INTIE bit, immediately after an interrupt event
enc28j60ClearBit(interface, ENC28J60_REG_EIE, EIE_INTIE);
//Read interrupt status register
status = enc28j60ReadReg(interface, ENC28J60_REG_EIR);
//Link status change?
if((status & EIR_LINKIF) != 0)
{
//Disable LINKIE interrupt
enc28j60ClearBit(interface, ENC28J60_REG_EIE, EIE_LINKIE);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet received?
if((status & EIR_PKTIF) != 0)
{
//Disable PKTIE interrupt
enc28j60ClearBit(interface, ENC28J60_REG_EIE, EIE_PKTIE);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet transmission complete?
if((status & (EIR_TXIF | EIE_TXERIE)) != 0)
{
//Clear interrupt flags
enc28j60ClearBit(interface, ENC28J60_REG_EIR, EIR_TXIF | EIE_TXERIE);
//Notify the TCP/IP stack that the transmitter is ready to send
flag |= osSetEventFromIsr(&interface->nicTxEvent);
}
//Once the interrupt has been serviced, the INTIE bit
//is set again to re-enable interrupts
enc28j60SetBit(interface, ENC28J60_REG_EIE, EIE_INTIE);
//A higher priority task must be woken?
return flag;
} | 155 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60ReadPhyReg | enc28j60ReadPhyReg( NetInterface * interface , uint16_t address) | ['interface', 'address'] | uint16_t enc28j60ReadPhyReg(NetInterface *interface, uint16_t address)
{
uint16_t data;
//Write register address
enc28j60WriteReg(interface, ENC28J60_REG_MIREGADR, address & REG_ADDR_MASK);
//Start read operation
enc28j60WriteReg(interface, ENC28J60_REG_MICMD, MICMD_MIIRD);
//Wait for the read operation to complete
while((enc28j60ReadReg(interface, ENC28J60_REG_MISTAT) & MISTAT_BUSY) != 0)
{
}
//Clear command register
enc28j60WriteReg(interface, ENC28J60_REG_MICMD, 0);
//Read the lower 8 bits
data = enc28j60ReadReg(interface, ENC28J60_REG_MIRDL);
//Read the upper 8 bits
data |= enc28j60ReadReg(interface, ENC28J60_REG_MIRDH) << 8;
//Return register contents
return data;
} | 84 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60ReceivePacket | enc28j60ReceivePacket( NetInterface * interface) | ['interface'] | error_t enc28j60ReceivePacket(NetInterface *interface)
{
error_t error;
uint16_t n;
uint16_t status;
Enc28j60Context *context;
//Point to the driver context
context = (Enc28j60Context *) interface->nicContext;
//Any packet pending in the receive buffer?
if(enc28j60ReadReg(interface, ENC28J60_REG_EPKTCNT))
{
//Point to the start of the received packet
enc28j60WriteReg(interface, ENC28J60_REG_ERDPTL, LSB(context->nextPacket));
enc28j60WriteReg(interface, ENC28J60_REG_ERDPTH, MSB(context->nextPacket));
//Read the first two bytes, which are the address of the next packet
enc28j60ReadBuffer(interface, (uint8_t *) &context->nextPacket, sizeof(uint16_t));
//Get the length of the received frame in bytes
enc28j60ReadBuffer(interface, (uint8_t *) &n, sizeof(uint16_t));
//Read the receive status vector (RSV)
enc28j60ReadBuffer(interface, (uint8_t *) &status, sizeof(uint16_t));
//Make sure no error occurred
if((status & RSV_RECEIVED_OK) != 0)
{
//Limit the number of data to read
n = MIN(n, ETH_MAX_FRAME_SIZE);
//Read the Ethernet frame
enc28j60ReadBuffer(interface, context->rxBuffer, n);
//Valid packet received
error = NO_ERROR;
}
else
{
//The received packet contains an error
error = ERROR_INVALID_PACKET;
}
//Advance the ERXRDPT pointer, taking care to wrap back at the
//end of the received memory buffer
if(context->nextPacket == ENC28J60_RX_BUFFER_START)
{
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTL, LSB(ENC28J60_RX_BUFFER_STOP));
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTH, MSB(ENC28J60_RX_BUFFER_STOP));
}
else
{
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTL, LSB(context->nextPacket - 1));
enc28j60WriteReg(interface, ENC28J60_REG_ERXRDPTH, MSB(context->nextPacket - 1));
}
//Decrement the packet counter
enc28j60SetBit(interface, ENC28J60_REG_ECON2, ECON2_PKTDEC);
}
else
{
//No more data in the receive buffer
error = ERROR_BUFFER_EMPTY;
}
//Check whether a valid packet has been received
if(!error)
{
NetRxAncillary ancillary;
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_RX_ANCILLARY;
//Pass the packet to the upper layer
nicProcessPacket(interface, context->rxBuffer, n, &ancillary);
}
//Return status code
return error;
} | 282 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60SelectBank | enc28j60SelectBank( NetInterface * interface , uint16_t address) | ['interface', 'address'] | void enc28j60SelectBank(NetInterface *interface, uint16_t address)
{
uint16_t bank;
Enc28j60Context *context;
//Point to the driver context
context = (Enc28j60Context *) interface->nicContext;
//Get the bank number from the specified address
bank = address & REG_BANK_MASK;
//Rewrite the bank number only if a change is detected
if(bank != context->currentBank)
{
//Select specified bank
switch(bank)
{
case BANK_0:
//Select bank 0
enc28j60ClearBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL1 | ECON1_BSEL0);
break;
case BANK_1:
//Select bank 1
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL0);
enc28j60ClearBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL1);
break;
case BANK_2:
//Select bank 2
enc28j60ClearBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL0);
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL1);
break;
case BANK_3:
//Select bank 3
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_BSEL1 | ECON1_BSEL0);
break;
default:
//Invalid bank
break;
}
//Save bank number
context->currentBank = bank;
}
} | 138 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60SendPacket | enc28j60SendPacket( NetInterface * interface , const NetBuffer * buffer , size_t offset , NetTxAncillary * ancillary) | ['interface', 'buffer', 'offset', 'ancillary'] | error_t enc28j60SendPacket(NetInterface *interface,
const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
{
size_t length;
//Retrieve the length of the packet
length = netBufferGetLength(buffer) - offset;
//Check the frame length
if(length > 1536)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Report an error
return ERROR_INVALID_LENGTH;
}
//Make sure the link is up before transmitting the frame
if(!interface->linkState)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Drop current packet
return NO_ERROR;
}
//It is recommended to reset the transmit logic before
//attempting to transmit a packet
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_TXRST);
enc28j60ClearBit(interface, ENC28J60_REG_ECON1, ECON1_TXRST);
//Interrupt flags should be cleared after the reset is completed
enc28j60ClearBit(interface, ENC28J60_REG_EIR, EIR_TXIF | EIR_TXERIF);
//Set transmit buffer location
enc28j60WriteReg(interface, ENC28J60_REG_ETXSTL, LSB(ENC28J60_TX_BUFFER_START));
enc28j60WriteReg(interface, ENC28J60_REG_ETXSTH, MSB(ENC28J60_TX_BUFFER_START));
//Point to start of transmit buffer
enc28j60WriteReg(interface, ENC28J60_REG_EWRPTL, LSB(ENC28J60_TX_BUFFER_START));
enc28j60WriteReg(interface, ENC28J60_REG_EWRPTH, MSB(ENC28J60_TX_BUFFER_START));
//Copy the data to the transmit buffer
enc28j60WriteBuffer(interface, buffer, offset);
//ETXND should point to the last byte in the data payload
enc28j60WriteReg(interface, ENC28J60_REG_ETXNDL, LSB(ENC28J60_TX_BUFFER_START + length));
enc28j60WriteReg(interface, ENC28J60_REG_ETXNDH, MSB(ENC28J60_TX_BUFFER_START + length));
//Start transmission
enc28j60SetBit(interface, ENC28J60_REG_ECON1, ECON1_TXRTS);
//Successful processing
return NO_ERROR;
} | 197 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60UpdateMacAddrFilter | enc28j60UpdateMacAddrFilter( NetInterface * interface) | ['interface'] | error_t enc28j60UpdateMacAddrFilter(NetInterface *interface)
{
uint_t i;
uint_t k;
uint32_t crc;
uint8_t hashTable[8];
MacFilterEntry *entry;
//Debug message
TRACE_DEBUG("Updating MAC filter...\r\n");
//Clear hash table
osMemset(hashTable, 0, sizeof(hashTable));
//The MAC address filter contains the list of MAC addresses to accept
//when receiving an Ethernet frame
for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
{
//Point to the current entry
entry = &interface->macAddrFilter[i];
//Valid entry?
if(entry->refCount > 0)
{
//Compute CRC over the current MAC address
crc = enc28j60CalcCrc(&entry->addr, sizeof(MacAddr));
//Calculate the corresponding index in the table
k = (crc >> 23) & 0x3F;
//Update hash table contents
hashTable[k / 8] |= (1 << (k % 8));
}
}
//Write the hash table to the ENC28J60 controller
enc28j60WriteReg(interface, ENC28J60_REG_EHT0, hashTable[0]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT1, hashTable[1]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT2, hashTable[2]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT3, hashTable[3]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT4, hashTable[4]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT5, hashTable[5]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT6, hashTable[6]);
enc28j60WriteReg(interface, ENC28J60_REG_EHT7, hashTable[7]);
//Debug message
TRACE_DEBUG(" EHT0 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT0));
TRACE_DEBUG(" EHT1 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT1));
TRACE_DEBUG(" EHT2 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT2));
TRACE_DEBUG(" EHT3 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT3));
TRACE_DEBUG(" EHT0 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT4));
TRACE_DEBUG(" EHT1 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT5));
TRACE_DEBUG(" EHT2 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT6));
TRACE_DEBUG(" EHT3 = %02" PRIX8 "\r\n", enc28j60ReadReg(interface, ENC28J60_REG_EHT7));
//Successful processing
return NO_ERROR;
} | 334 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc28j60WritePhyReg | enc28j60WritePhyReg( NetInterface * interface , uint16_t address , uint16_t data) | ['interface', 'address', 'data'] | void enc28j60WritePhyReg(NetInterface *interface, uint16_t address,
uint16_t data)
{
//Write register address
enc28j60WriteReg(interface, ENC28J60_REG_MIREGADR, address & REG_ADDR_MASK);
//Write the lower 8 bits
enc28j60WriteReg(interface, ENC28J60_REG_MIWRL, LSB(data));
//Write the upper 8 bits
enc28j60WriteReg(interface, ENC28J60_REG_MIWRH, MSB(data));
//Wait until the PHY register has been written
while((enc28j60ReadReg(interface, ENC28J60_REG_MISTAT) & MISTAT_BUSY) != 0)
{
}
} | 66 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600EventHandler | enc624j600EventHandler( NetInterface * interface) | ['interface'] | void enc624j600EventHandler(NetInterface *interface)
{
error_t error;
uint16_t status;
uint16_t value;
//Read interrupt status register
status = enc624j600ReadReg(interface, ENC624J600_REG_EIR);
//Check whether the link state has changed
if((status & EIR_LINKIF) != 0)
{
//Clear interrupt flag
enc624j600ClearBit(interface, ENC624J600_REG_EIR, EIR_LINKIF);
//Read Ethernet status register
value = enc624j600ReadReg(interface, ENC624J600_REG_ESTAT);
//Check link state
if((value & ESTAT_PHYLNK) != 0)
{
//Read PHY status register 3
value = enc624j600ReadPhyReg(interface, ENC624J600_PHY_REG_PHSTAT3);
//Get current speed
if((value & PHSTAT3_SPDDPX1) != 0)
{
interface->linkSpeed = NIC_LINK_SPEED_100MBPS;
}
else
{
interface->linkSpeed = NIC_LINK_SPEED_10MBPS;
}
//Determine the new duplex mode
if((value & PHSTAT3_SPDDPX2) != 0)
{
interface->duplexMode = NIC_FULL_DUPLEX_MODE;
}
else
{
interface->duplexMode = NIC_HALF_DUPLEX_MODE;
}
//Link is up
interface->linkState = TRUE;
//Update MAC configuration parameters for proper operation
enc624j600UpdateMacConfig(interface);
}
else
{
//Link is down
interface->linkState = FALSE;
}
//Process link state change event
nicNotifyLinkChange(interface);
}
//Check whether a packet has been received?
if((status & EIR_PKTIF) != 0)
{
//Clear interrupt flag
enc624j600ClearBit(interface, ENC624J600_REG_EIR, EIR_PKTIF);
//Process all pending packets
do
{
//Read incoming packet
error = enc624j600ReceivePacket(interface);
//No more data in the receive buffer?
} while(error != ERROR_BUFFER_EMPTY);
}
//Re-enable LINKIE and PKTIE interrupts
enc624j600SetBit(interface, ENC624J600_REG_EIE, EIE_LINKIE | EIE_PKTIE);
} | 205 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600Init | enc624j600Init( NetInterface * interface) | ['interface'] | error_t enc624j600Init(NetInterface *interface)
{
uint16_t temp;
Enc624j600Context *context;
//Debug message
TRACE_INFO("Initializing ENC624J600 Ethernet controller...\r\n");
//Initialize SPI
interface->spiDriver->init();
//Initialize external interrupt line
interface->extIntDriver->init();
//Point to the driver context
context = (Enc624j600Context *) interface->nicContext;
//Initialize driver specific variables
context->nextPacket = ENC624J600_RX_BUFFER_START;
//Allocate RX buffer
context->rxBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
//Failed to allocate memory?
if(context->rxBuffer == NULL)
{
return ERROR_OUT_OF_MEMORY;
}
//Issue a system reset
enc624j600SoftReset(interface);
//Disable CLKOUT output
enc624j600WriteReg(interface, ENC624J600_REG_ECON2, ECON2_ETHEN | ECON2_STRCH);
//Optionally set the station MAC address
if(macCompAddr(&interface->macAddr, &MAC_UNSPECIFIED_ADDR))
{
//Use the factory preprogrammed station address
temp = enc624j600ReadReg(interface, ENC624J600_REG_MAADR1);
interface->macAddr.w[0] = letoh16(temp);
temp = enc624j600ReadReg(interface, ENC624J600_REG_MAADR2);
interface->macAddr.w[1] = letoh16(temp);
temp = enc624j600ReadReg(interface, ENC624J600_REG_MAADR3);
interface->macAddr.w[2] = letoh16(temp);
//Generate the 64-bit interface identifier
macAddrToEui64(&interface->macAddr, &interface->eui64);
}
else
{
//Override the factory preprogrammed address
temp = htole16(interface->macAddr.w[0]);
enc624j600WriteReg(interface, ENC624J600_REG_MAADR1, temp);
temp = htole16(interface->macAddr.w[1]);
enc624j600WriteReg(interface, ENC624J600_REG_MAADR2, temp);
temp = htole16(interface->macAddr.w[2]);
enc624j600WriteReg(interface, ENC624J600_REG_MAADR3, temp);
}
//Set receive buffer location
enc624j600WriteReg(interface, ENC624J600_REG_ERXST, ENC624J600_RX_BUFFER_START);
//Program the tail pointer ERXTAIL to the last even address of the buffer
enc624j600WriteReg(interface, ENC624J600_REG_ERXTAIL, ENC624J600_RX_BUFFER_STOP);
//Configure the receive filters
enc624j600WriteReg(interface, ENC624J600_REG_ERXFCON, ERXFCON_HTEN |
ERXFCON_CRCEN | ERXFCON_RUNTEN | ERXFCON_UCEN | ERXFCON_BCEN);
//Initialize the hash table
enc624j600WriteReg(interface, ENC624J600_REG_EHT1, 0x0000);
enc624j600WriteReg(interface, ENC624J600_REG_EHT2, 0x0000);
enc624j600WriteReg(interface, ENC624J600_REG_EHT3, 0x0000);
enc624j600WriteReg(interface, ENC624J600_REG_EHT4, 0x0000);
//All short frames will be zero-padded to 60 bytes and a valid CRC is then appended
enc624j600WriteReg(interface, ENC624J600_REG_MACON2,
MACON2_DEFER | MACON2_PADCFG0 | MACON2_TXCRCEN | MACON2_R1);
//Program the MAMXFL register with the maximum frame length to be accepted
enc624j600WriteReg(interface, ENC624J600_REG_MAMXFL, ETH_MAX_FRAME_SIZE);
//PHY initialization
enc624j600WritePhyReg(interface, ENC624J600_PHY_REG_PHANA, PHANA_ADPAUS0 |
PHANA_AD100FD | PHANA_AD100 | PHANA_AD10FD | PHANA_AD10 | PHANA_ADIEEE0);
//Clear interrupt flags
enc624j600WriteReg(interface, ENC624J600_REG_EIR, 0x0000);
//Configure interrupts as desired
enc624j600WriteReg(interface, ENC624J600_REG_EIE, EIE_INTIE |
EIE_LINKIE | EIE_PKTIE | EIE_TXIE | EIE_TXABTIE);
//Set RXEN to enable reception
enc624j600SetBit(interface, ENC624J600_REG_ECON1, ECON1_RXEN);
//Dump registers for debugging purpose
enc624j600DumpReg(interface);
enc624j600DumpPhyReg(interface);
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Force the TCP/IP stack to poll the link state at startup
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 441 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600IrqHandler | enc624j600IrqHandler( NetInterface * interface) | ['interface'] | bool_t enc624j600IrqHandler(NetInterface *interface)
{
bool_t flag;
uint16_t status;
//This flag will be set if a higher priority task must be woken
flag = FALSE;
//Clear the INTIE bit, immediately after an interrupt event
enc624j600ClearBit(interface, ENC624J600_REG_EIE, EIE_INTIE);
//Read interrupt status register
status = enc624j600ReadReg(interface, ENC624J600_REG_EIR);
//Link status change?
if((status & EIR_LINKIF) != 0)
{
//Disable LINKIE interrupt
enc624j600ClearBit(interface, ENC624J600_REG_EIE, EIE_LINKIE);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet received?
if((status & EIR_PKTIF) != 0)
{
//Disable PKTIE interrupt
enc624j600ClearBit(interface, ENC624J600_REG_EIE, EIE_PKTIE);
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet transmission complete?
if((status & (EIR_TXIF | EIR_TXABTIF)) != 0)
{
//Clear interrupt flags
enc624j600ClearBit(interface, ENC624J600_REG_EIR, EIR_TXIF | EIR_TXABTIF);
//Notify the TCP/IP stack that the transmitter is ready to send
flag |= osSetEventFromIsr(&interface->nicTxEvent);
}
//Once the interrupt has been serviced, the INTIE bit
//is set again to re-enable interrupts
enc624j600SetBit(interface, ENC624J600_REG_EIE, EIE_INTIE);
//A higher priority task must be woken?
return flag;
} | 155 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600ReadPhyReg | enc624j600ReadPhyReg( NetInterface * interface , uint8_t address) | ['interface', 'address'] | uint16_t enc624j600ReadPhyReg(NetInterface *interface, uint8_t address)
{
//Write the address of the PHY register to read from
enc624j600WriteReg(interface, ENC624J600_REG_MIREGADR, MIREGADR_R8 | address);
//Start read operation
enc624j600WriteReg(interface, ENC624J600_REG_MICMD, MICMD_MIIRD);
//Wait at least 25.6us before polling the BUSY bit
usleep(100);
//Wait for the read operation to complete
while((enc624j600ReadReg(interface, ENC624J600_REG_MISTAT) & MISTAT_BUSY) != 0)
{
}
//Clear command register
enc624j600WriteReg(interface, ENC624J600_REG_MICMD, 0x00);
//Return register contents
return enc624j600ReadReg(interface, ENC624J600_REG_MIRD);
} | 70 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600ReceivePacket | enc624j600ReceivePacket( NetInterface * interface) | ['interface'] | error_t enc624j600ReceivePacket(NetInterface *interface)
{
error_t error;
uint16_t n;
uint32_t status;
Enc624j600Context *context;
//Point to the driver context
context = (Enc624j600Context *) interface->nicContext;
//Verify that a packet is waiting by ensuring that PKTCNT is non-zero
if(enc624j600ReadReg(interface, ENC624J600_REG_ESTAT) & ESTAT_PKTCNT)
{
//Point to the next packet
enc624j600WriteReg(interface, ENC624J600_REG_ERXRDPT, context->nextPacket);
//Read the first two bytes, which are the address of the next packet
enc624j600ReadBuffer(interface, ENC624J600_CMD_RRXDATA,
(uint8_t *) &context->nextPacket, sizeof(uint16_t));
//Convert the value to host byte order
context->nextPacket = letoh16(context->nextPacket);
//Get the length of the received frame in bytes
enc624j600ReadBuffer(interface, ENC624J600_CMD_RRXDATA,
(uint8_t *) &n, sizeof(uint16_t));
//Convert the value to host byte order
n = letoh16(n);
//Read the receive status vector (RSV)
enc624j600ReadBuffer(interface, ENC624J600_CMD_RRXDATA,
(uint8_t *) &status, sizeof(uint32_t));
//Convert the value to host byte order
status = letoh32(status);
//Make sure no error occurred
if((status & RSV_RECEIVED_OK) != 0)
{
//Limit the number of data to read
n = MIN(n, ETH_MAX_FRAME_SIZE);
//Read the Ethernet frame
enc624j600ReadBuffer(interface, ENC624J600_CMD_RRXDATA, context->rxBuffer, n);
//Valid packet received
error = NO_ERROR;
}
else
{
//The received packet contains an error
error = ERROR_INVALID_PACKET;
}
//Update the ERXTAIL pointer value to the point where the packet
//has been processed, taking care to wrap back at the end of the
//received memory buffer
if(context->nextPacket == ENC624J600_RX_BUFFER_START)
{
enc624j600WriteReg(interface, ENC624J600_REG_ERXTAIL, ENC624J600_RX_BUFFER_STOP);
}
else
{
enc624j600WriteReg(interface, ENC624J600_REG_ERXTAIL, context->nextPacket - 2);
}
//Set PKTDEC to decrement the PKTCNT bits
enc624j600SetBit(interface, ENC624J600_REG_ECON1, ECON1_PKTDEC);
}
else
{
//No more data in the receive buffer
error = ERROR_BUFFER_EMPTY;
}
//Check whether a valid packet has been received
if(!error)
{
NetRxAncillary ancillary;
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_RX_ANCILLARY;
//Pass the packet to the upper layer
nicProcessPacket(interface, context->rxBuffer, n, &ancillary);
}
//Return status code
return error;
} | 266 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600SendPacket | enc624j600SendPacket( NetInterface * interface , const NetBuffer * buffer , size_t offset , NetTxAncillary * ancillary) | ['interface', 'buffer', 'offset', 'ancillary'] | error_t enc624j600SendPacket(NetInterface *interface,
const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
{
size_t length;
//Retrieve the length of the packet
length = netBufferGetLength(buffer) - offset;
//Check the frame length
if(length > 1536)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Report an error
return ERROR_INVALID_LENGTH;
}
//Make sure the link is up before transmitting the frame
if(!interface->linkState)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Drop current packet
return NO_ERROR;
}
//Ensure that the transmitter is ready to send
if(enc624j600ReadReg(interface, ENC624J600_REG_ECON1) & ECON1_TXRTS)
{
return ERROR_FAILURE;
}
//Point to the SRAM buffer
enc624j600WriteReg(interface, ENC624J600_REG_EGPWRPT, ENC624J600_TX_BUFFER_START);
//Copy the packet to the SRAM buffer
enc624j600WriteBuffer(interface, ENC624J600_CMD_WGPDATA, buffer, offset);
//Program ETXST to the start address of the packet
enc624j600WriteReg(interface, ENC624J600_REG_ETXST, ENC624J600_TX_BUFFER_START);
//Program ETXLEN with the length of data copied to the memory
enc624j600WriteReg(interface, ENC624J600_REG_ETXLEN, length);
//Clear TXIF and TXABTIF interrupt flags
enc624j600ClearBit(interface, ENC624J600_REG_EIR, EIR_TXIF | EIR_TXABTIF);
//Set the TXRTS bit to initiate transmission
enc624j600SetBit(interface, ENC624J600_REG_ECON1, ECON1_TXRTS);
//Successful processing
return NO_ERROR;
} | 148 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600SoftReset | enc624j600SoftReset( NetInterface * interface) | ['interface'] | error_t enc624j600SoftReset(NetInterface *interface)
{
//Wait for the SPI interface to be ready
do
{
//Write 0x1234 to EUDAST
enc624j600WriteReg(interface, ENC624J600_REG_EUDAST, 0x1234);
//Read back register and check contents
} while(enc624j600ReadReg(interface, ENC624J600_REG_EUDAST) != 0x1234);
//Poll CLKRDY and wait for it to become set
while((enc624j600ReadReg(interface, ENC624J600_REG_ESTAT) & ESTAT_CLKRDY) == 0)
{
}
//Issue a system reset command by setting ETHRST
enc624j600SetBit(interface, ENC624J600_REG_ECON2, ECON2_ETHRST);
//Wait at least 25us for the reset to take place
sleep(1);
//Read EUDAST to confirm that the system reset took place.
//EUDAST should have reverted back to its reset default
if(enc624j600ReadReg(interface, ENC624J600_REG_EUDAST) != 0x0000)
{
return ERROR_FAILURE;
}
//Wait at least 256us for the PHY registers and PHY
//status bits to become available
sleep(1);
//The controller is now ready to accept further commands
return NO_ERROR;
} | 87 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600UpdateMacAddrFilter | enc624j600UpdateMacAddrFilter( NetInterface * interface) | ['interface'] | error_t enc624j600UpdateMacAddrFilter(NetInterface *interface)
{
uint_t i;
uint_t k;
uint32_t crc;
uint16_t hashTable[4];
MacFilterEntry *entry;
//Debug message
TRACE_DEBUG("Updating MAC filter...\r\n");
//Clear hash table
osMemset(hashTable, 0, sizeof(hashTable));
//The MAC address filter contains the list of MAC addresses to accept
//when receiving an Ethernet frame
for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
{
//Point to the current entry
entry = &interface->macAddrFilter[i];
//Valid entry?
if(entry->refCount > 0)
{
//Compute CRC over the current MAC address
crc = enc624j600CalcCrc(&entry->addr, sizeof(MacAddr));
//Calculate the corresponding index in the table
k = (crc >> 23) & 0x3F;
//Update hash table contents
hashTable[k / 16] |= (1 << (k % 16));
}
}
//Write the hash table to the ENC624J600 controller
enc624j600WriteReg(interface, ENC624J600_REG_EHT1, hashTable[0]);
enc624j600WriteReg(interface, ENC624J600_REG_EHT2, hashTable[1]);
enc624j600WriteReg(interface, ENC624J600_REG_EHT3, hashTable[2]);
enc624j600WriteReg(interface, ENC624J600_REG_EHT4, hashTable[3]);
//Debug message
TRACE_DEBUG(" EHT1 = %04" PRIX16 "\r\n", enc624j600ReadReg(interface, ENC624J600_REG_EHT1));
TRACE_DEBUG(" EHT2 = %04" PRIX16 "\r\n", enc624j600ReadReg(interface, ENC624J600_REG_EHT2));
TRACE_DEBUG(" EHT3 = %04" PRIX16 "\r\n", enc624j600ReadReg(interface, ENC624J600_REG_EHT3));
TRACE_DEBUG(" EHT4 = %04" PRIX16 "\r\n", enc624j600ReadReg(interface, ENC624J600_REG_EHT4));
//Successful processing
return NO_ERROR;
} | 230 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600UpdateMacConfig | enc624j600UpdateMacConfig( NetInterface * interface) | ['interface'] | void enc624j600UpdateMacConfig(NetInterface *interface)
{
uint16_t duplexMode;
//Determine the new duplex mode by reading the PHYDPX bit
duplexMode = enc624j600ReadReg(interface, ENC624J600_REG_ESTAT) & ESTAT_PHYDPX;
//Full-duplex mode?
if(duplexMode)
{
//Configure the FULDPX bit to match the current duplex mode
enc624j600WriteReg(interface, ENC624J600_REG_MACON2, MACON2_DEFER |
MACON2_PADCFG2 | MACON2_PADCFG0 | MACON2_TXCRCEN | MACON2_R1 | MACON2_FULDPX);
//Configure the Back-to-Back Inter-Packet Gap register
enc624j600WriteReg(interface, ENC624J600_REG_MABBIPG, 0x15);
}
//Half-duplex mode?
else
{
//Configure the FULDPX bit to match the current duplex mode
enc624j600WriteReg(interface, ENC624J600_REG_MACON2, MACON2_DEFER |
MACON2_PADCFG2 | MACON2_PADCFG0 | MACON2_TXCRCEN | MACON2_R1);
//Configure the Back-to-Back Inter-Packet Gap register
enc624j600WriteReg(interface, ENC624J600_REG_MABBIPG, 0x12);
}
} | 85 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | enc624j600WritePhyReg | enc624j600WritePhyReg( NetInterface * interface , uint8_t address , uint16_t data) | ['interface', 'address', 'data'] | void enc624j600WritePhyReg(NetInterface *interface, uint8_t address,
uint16_t data)
{
//Write the address of the PHY register to write to
enc624j600WriteReg(interface, ENC624J600_REG_MIREGADR, MIREGADR_R8 | address);
//Write the 16 bits of data into the MIWR register
enc624j600WriteReg(interface, ENC624J600_REG_MIWR, data);
//Wait until the PHY register has been written
while((enc624j600ReadReg(interface, ENC624J600_REG_MISTAT) & MISTAT_BUSY) != 0)
{
}
} | 51 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851EventHandler | ksz8851EventHandler( NetInterface * interface) | ['interface'] | void ksz8851EventHandler(NetInterface *interface)
{
uint16_t status;
uint_t frameCount;
//Read interrupt status register
status = ksz8851ReadReg(interface, KSZ8851_REG_ISR);
//Check whether the link status has changed?
if((status & ISR_LCIS) != 0)
{
//Clear interrupt flag
ksz8851WriteReg(interface, KSZ8851_REG_ISR, ISR_LCIS);
//Read PHY status register
status = ksz8851ReadReg(interface, KSZ8851_REG_P1SR);
//Check link state
if((status & P1SR_LINK_GOOD) != 0)
{
//Get current speed
if((status & P1SR_OPERATION_SPEED) != 0)
{
interface->linkSpeed = NIC_LINK_SPEED_100MBPS;
}
else
{
interface->linkSpeed = NIC_LINK_SPEED_10MBPS;
}
//Determine the new duplex mode
if((status & P1SR_OPERATION_DUPLEX) != 0)
{
interface->duplexMode = NIC_FULL_DUPLEX_MODE;
}
else
{
interface->duplexMode = NIC_HALF_DUPLEX_MODE;
}
//Link is up
interface->linkState = TRUE;
}
else
{
//Link is down
interface->linkState = FALSE;
}
//Process link state change event
nicNotifyLinkChange(interface);
}
//Check whether a packet has been received?
if((status & ISR_RXIS) != 0)
{
//Clear interrupt flag
ksz8851WriteReg(interface, KSZ8851_REG_ISR, ISR_RXIS);
//Get the total number of frames that are pending in the buffer
frameCount = MSB(ksz8851ReadReg(interface, KSZ8851_REG_RXFCTR));
//Process all pending packets
while(frameCount > 0)
{
//Read incoming packet
ksz8851ReceivePacket(interface);
//Decrement frame counter
frameCount--;
}
}
//Re-enable LCIE and RXIE interrupts
ksz8851SetBit(interface, KSZ8851_REG_IER, IER_LCIE | IER_RXIE);
} | 199 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851Init | ksz8851Init( NetInterface * interface) | ['interface'] | error_t ksz8851Init(NetInterface *interface)
{
Ksz8851Context *context;
//Point to the driver context
context = (Ksz8851Context *) interface->nicContext;
//Debug message
TRACE_INFO("Initializing KSZ8851 Ethernet controller...\r\n");
#if (KSZ8851_SPI_SUPPORT == ENABLED)
//Initialize SPI
interface->spiDriver->init();
#endif
//Initialize external interrupt line
interface->extIntDriver->init();
//Debug message
TRACE_DEBUG("CIDER=0x%04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_CIDER));
TRACE_DEBUG("PHY1ILR=0x%04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_PHY1ILR));
TRACE_DEBUG("PHY1IHR=0x%04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_PHY1IHR));
//Check device ID and revision ID
if(ksz8851ReadReg(interface, KSZ8851_REG_CIDER) != KSZ8851_REV_A3_ID)
{
return ERROR_WRONG_IDENTIFIER;
}
//Dump registers for debugging purpose
ksz8851DumpReg(interface);
//Initialize driver specific variables
context->frameId = 0;
//Allocate TX and RX buffers
context->txBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
context->rxBuffer = memPoolAlloc(ETH_MAX_FRAME_SIZE);
//Failed to allocate memory?
if(context->txBuffer == NULL || context->rxBuffer == NULL)
{
//Clean up side effects
memPoolFree(context->txBuffer);
memPoolFree(context->rxBuffer);
//Report an error
return ERROR_OUT_OF_MEMORY;
}
//Initialize MAC address
ksz8851WriteReg(interface, KSZ8851_REG_MARH, htons(interface->macAddr.w[0]));
ksz8851WriteReg(interface, KSZ8851_REG_MARM, htons(interface->macAddr.w[1]));
ksz8851WriteReg(interface, KSZ8851_REG_MARL, htons(interface->macAddr.w[2]));
//Packets shorter than 64 bytes are padded and the CRC is automatically generated
ksz8851WriteReg(interface, KSZ8851_REG_TXCR, TXCR_TXFCE | TXCR_TXPE | TXCR_TXCE);
//Automatically increment TX data pointer
ksz8851WriteReg(interface, KSZ8851_REG_TXFDPR, TXFDPR_TXFPAI);
//Configure address filtering
ksz8851WriteReg(interface, KSZ8851_REG_RXCR1,
RXCR1_RXPAFMA | RXCR1_RXFCE | RXCR1_RXBE | RXCR1_RXME | RXCR1_RXUE);
//No checksum verification
ksz8851WriteReg(interface, KSZ8851_REG_RXCR2,
RXCR2_SRDBL2 | RXCR2_IUFFP | RXCR2_RXIUFCEZ);
//Enable automatic RXQ frame buffer dequeue
ksz8851WriteReg(interface, KSZ8851_REG_RXQCR, RXQCR_RXFCTE | RXQCR_ADRFE);
//Automatically increment RX data pointer
ksz8851WriteReg(interface, KSZ8851_REG_RXFDPR, RXFDPR_RXFPAI);
//Configure receive frame count threshold
ksz8851WriteReg(interface, KSZ8851_REG_RXFCTR, 1);
//Force link in half-duplex if auto-negotiation failed
ksz8851ClearBit(interface, KSZ8851_REG_P1CR, P1CR_FORCE_DUPLEX);
//Restart auto-negotiation
ksz8851SetBit(interface, KSZ8851_REG_P1CR, P1CR_RESTART_AN);
//Clear interrupt flags
ksz8851SetBit(interface, KSZ8851_REG_ISR, ISR_LCIS | ISR_TXIS |
ISR_RXIS | ISR_RXOIS | ISR_TXPSIS | ISR_RXPSIS | ISR_TXSAIS |
ISR_RXWFDIS | ISR_RXMPDIS | ISR_LDIS | ISR_EDIS | ISR_SPIBEIS);
//Configure interrupts as desired
ksz8851SetBit(interface, KSZ8851_REG_IER, IER_LCIE | IER_TXIE | IER_RXIE);
//Enable TX operation
ksz8851SetBit(interface, KSZ8851_REG_TXCR, TXCR_TXE);
//Enable RX operation
ksz8851SetBit(interface, KSZ8851_REG_RXCR1, RXCR1_RXE);
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Force the TCP/IP stack to poll the link state at startup
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 404 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851IrqHandler | ksz8851IrqHandler( NetInterface * interface) | ['interface'] | bool_t ksz8851IrqHandler(NetInterface *interface)
{
bool_t flag;
size_t n;
uint16_t ier;
uint16_t isr;
//This flag will be set if a higher priority task must be woken
flag = FALSE;
//Save IER register value
ier = ksz8851ReadReg(interface, KSZ8851_REG_IER);
//Disable interrupts to release the interrupt line
ksz8851WriteReg(interface, KSZ8851_REG_IER, 0);
//Read interrupt status register
isr = ksz8851ReadReg(interface, KSZ8851_REG_ISR);
//Link status change?
if((isr & ISR_LCIS) != 0)
{
//Disable LCIE interrupt
ier &= ~IER_LCIE;
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Packet transmission complete?
if((isr & ISR_TXIS) != 0)
{
//Clear interrupt flag
ksz8851WriteReg(interface, KSZ8851_REG_ISR, ISR_TXIS);
//Get the amount of free memory available in the TX FIFO
n = ksz8851ReadReg(interface, KSZ8851_REG_TXMIR) & TXMIR_TXMA_MASK;
//Check whether the TX FIFO is available for writing
if(n >= (ETH_MAX_FRAME_SIZE + 8))
{
//Notify the TCP/IP stack that the transmitter is ready to send
flag |= osSetEventFromIsr(&interface->nicTxEvent);
}
}
//Packet received?
if((isr & ISR_RXIS) != 0)
{
//Disable RXIE interrupt
ier &= ~IER_RXIE;
//Set event flag
interface->nicEvent = TRUE;
//Notify the TCP/IP stack of the event
flag |= osSetEventFromIsr(&netEvent);
}
//Re-enable interrupts once the interrupt has been serviced
ksz8851WriteReg(interface, KSZ8851_REG_IER, ier);
//A higher priority task must be woken?
return flag;
} | 177 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851ReceivePacket | ksz8851ReceivePacket( NetInterface * interface) | ['interface'] | error_t ksz8851ReceivePacket(NetInterface *interface)
{
size_t n;
uint16_t status;
Ksz8851Context *context;
NetRxAncillary ancillary;
//Point to the driver context
context = (Ksz8851Context *) interface->nicContext;
//Read received frame status from RXFHSR
status = ksz8851ReadReg(interface, KSZ8851_REG_RXFHSR);
//Make sure the frame is valid
if((status & RXFHSR_RXFV) != 0)
{
//Check error flags
if((status & (RXFHSR_RXMR | RXFHSR_RXFTL | RXFHSR_RXRF | RXFHSR_RXCE)) == 0)
{
//Read received frame byte size from RXFHBCR
n = ksz8851ReadReg(interface, KSZ8851_REG_RXFHBCR) & RXFHBCR_RXBC_MASK;
//Ensure the frame size is acceptable
if(n > 0 && n <= ETH_MAX_FRAME_SIZE)
{
//Reset QMU RXQ frame pointer to zero
ksz8851WriteReg(interface, KSZ8851_REG_RXFDPR, RXFDPR_RXFPAI);
//Enable RXQ read access
ksz8851SetBit(interface, KSZ8851_REG_RXQCR, RXQCR_SDA);
//Read data
ksz8851ReadFifo(interface, context->rxBuffer, n);
//End RXQ read access
ksz8851ClearBit(interface, KSZ8851_REG_RXQCR, RXQCR_SDA);
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_RX_ANCILLARY;
//Pass the packet to the upper layer
nicProcessPacket(interface, context->rxBuffer, n, &ancillary);
//Valid packet received
return NO_ERROR;
}
}
}
//Release the current error frame from RXQ
ksz8851SetBit(interface, KSZ8851_REG_RXQCR, RXQCR_RRXEF);
//Report an error
return ERROR_INVALID_PACKET;
} | 166 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851SendPacket | ksz8851SendPacket( NetInterface * interface , const NetBuffer * buffer , size_t offset , NetTxAncillary * ancillary) | ['interface', 'buffer', 'offset', 'ancillary'] | error_t ksz8851SendPacket(NetInterface *interface,
const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
{
size_t n;
size_t length;
Ksz8851TxHeader header;
Ksz8851Context *context;
//Point to the driver context
context = (Ksz8851Context *) interface->nicContext;
//Retrieve the length of the packet
length = netBufferGetLength(buffer) - offset;
//Check the frame length
if(length > ETH_MAX_FRAME_SIZE)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Report an error
return ERROR_INVALID_LENGTH;
}
//Get the amount of free memory available in the TX FIFO
n = ksz8851ReadReg(interface, KSZ8851_REG_TXMIR) & TXMIR_TXMA_MASK;
//Make sure the TX FIFO is available for writing
if(n < (length + 8))
{
return ERROR_FAILURE;
}
//Copy user data
netBufferRead(context->txBuffer, buffer, offset, length);
//Format control word
header.controlWord = htole16(TX_CTRL_TXIC | (context->frameId++ & TX_CTRL_TXFID));
//Total number of bytes to be transmitted
header.byteCount = htole16(length);
//Enable TXQ write access
ksz8851SetBit(interface, KSZ8851_REG_RXQCR, RXQCR_SDA);
//Write TX packet header
ksz8851WriteFifo(interface, (uint8_t *) &header, sizeof(Ksz8851TxHeader));
//Write data
ksz8851WriteFifo(interface, context->txBuffer, length);
//End TXQ write access
ksz8851ClearBit(interface, KSZ8851_REG_RXQCR, RXQCR_SDA);
//Start transmission
ksz8851SetBit(interface, KSZ8851_REG_TXQCR, TXQCR_METFE);
//Get the amount of free memory available in the TX FIFO
n = ksz8851ReadReg(interface, KSZ8851_REG_TXMIR) & TXMIR_TXMA_MASK;
//Check whether the TX FIFO is available for writing
if(n >= (ETH_MAX_FRAME_SIZE + 8))
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
}
//Successful processing
return NO_ERROR;
} | 226 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ksz8851UpdateMacAddrFilter | ksz8851UpdateMacAddrFilter( NetInterface * interface) | ['interface'] | error_t ksz8851UpdateMacAddrFilter(NetInterface *interface)
{
uint_t i;
uint_t k;
uint32_t crc;
uint16_t hashTable[4];
MacFilterEntry *entry;
//Debug message
TRACE_DEBUG("Updating MAC filter...\r\n");
//Clear hash table
osMemset(hashTable, 0, sizeof(hashTable));
//The MAC address filter contains the list of MAC addresses to accept
//when receiving an Ethernet frame
for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
{
//Point to the current entry
entry = &interface->macAddrFilter[i];
//Valid entry?
if(entry->refCount > 0)
{
//Compute CRC over the current MAC address
crc = ksz8851CalcCrc(&entry->addr, sizeof(MacAddr));
//Calculate the corresponding index in the table
k = (crc >> 26) & 0x3F;
//Update hash table contents
hashTable[k / 16] |= (1 << (k % 16));
}
}
//Write the hash table to the KSZ8851 controller
ksz8851WriteReg(interface, KSZ8851_REG_MAHTR0, hashTable[0]);
ksz8851WriteReg(interface, KSZ8851_REG_MAHTR1, hashTable[1]);
ksz8851WriteReg(interface, KSZ8851_REG_MAHTR2, hashTable[2]);
ksz8851WriteReg(interface, KSZ8851_REG_MAHTR3, hashTable[3]);
//Debug message
TRACE_DEBUG(" MAHTR0 = %04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_MAHTR0));
TRACE_DEBUG(" MAHTR1 = %04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_MAHTR1));
TRACE_DEBUG(" MAHTR2 = %04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_MAHTR2));
TRACE_DEBUG(" MAHTR3 = %04" PRIX16 "\r\n", ksz8851ReadReg(interface, KSZ8851_REG_MAHTR3));
//Successful processing
return NO_ERROR;
} | 230 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | am335xEthAddVlanAddrEntry | am335xEthAddVlanAddrEntry( uint_t port , uint_t vlanId , MacAddr * macAddr) | ['port', 'vlanId', 'macAddr'] | error_t am335xEthAddVlanAddrEntry(uint_t port, uint_t vlanId, MacAddr *macAddr)
{
error_t error;
uint_t index;
Am335xAleEntry entry;
//Ensure that there are no duplicate address entries in the ALE table
index = am335xEthFindVlanAddrEntry(vlanId, macAddr);
//No matching entry found?
if(index >= CPSW_ALE_MAX_ENTRIES)
{
//Find a free entry in the ALE table
index = am335xEthFindFreeEntry();
}
//Sanity check
if(index < CPSW_ALE_MAX_ENTRIES)
{
//Set up a VLAN/address table entry
entry.word2 = 0;
entry.word1 = CPSW_ALE_WORD1_ENTRY_TYPE_VLAN_ADDR;
entry.word0 = 0;
//Multicast address?
if(macIsMulticastAddr(macAddr))
{
//Set port mask
entry.word2 |= CPSW_ALE_WORD2_SUPER |
CPSW_ALE_WORD2_PORT_LIST(1 << port) |
CPSW_ALE_WORD2_PORT_LIST(1 << CPSW_CH0);
//Set multicast forward state
entry.word1 |= CPSW_ALE_WORD1_MCAST_FWD_STATE(0);
}
//Set VLAN identifier
entry.word1 |= CPSW_ALE_WORD1_VLAN_ID(vlanId);
//Copy the upper 16 bits of the unicast address
entry.word1 |= (macAddr->b[0] << 8) | macAddr->b[1];
//Copy the lower 32 bits of the unicast address
entry.word0 |= (macAddr->b[2] << 24) | (macAddr->b[3] << 16) |
(macAddr->b[4] << 8) | macAddr->b[5];
//Add a new entry to the ALE table
am335xEthWriteEntry(index, &entry);
//Sucessful processing
error = NO_ERROR;
}
else
{
//The ALE table is full
error = ERROR_FAILURE;
}
//Return status code
return error;
} | 213 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | am335xEthAddVlanEntry | am335xEthAddVlanEntry( uint_t port , uint_t vlanId) | ['port', 'vlanId'] | error_t am335xEthAddVlanEntry(uint_t port, uint_t vlanId)
{
error_t error;
uint_t index;
Am335xAleEntry entry;
//Ensure that there are no duplicate address entries in the ALE table
index = am335xEthFindVlanEntry(vlanId);
//No matching entry found?
if(index >= CPSW_ALE_MAX_ENTRIES)
{
//Find a free entry in the ALE table
index = am335xEthFindFreeEntry();
}
//Sanity check
if(index < CPSW_ALE_MAX_ENTRIES)
{
//Set up a VLAN table entry
entry.word2 = 0;
entry.word1 = CPSW_ALE_WORD1_ENTRY_TYPE_VLAN;
entry.word0 = 0;
//Set VLAN identifier
entry.word1 |= CPSW_ALE_WORD1_VLAN_ID(vlanId);
//Force the packet VLAN tag to be removed on egress
entry.word0 |= CPSW_ALE_WORD0_FORCE_UNTAG_EGRESS(1 << port) |
CPSW_ALE_WORD0_FORCE_UNTAG_EGRESS(1 << CPSW_PORT0);
//Set VLAN member list
entry.word0 |= CPSW_ALE_WORD0_VLAN_MEMBER_LIST(1 << port) |
CPSW_ALE_WORD0_VLAN_MEMBER_LIST(1 << CPSW_PORT0);
//Add a new entry to the ALE table
am335xEthWriteEntry(index, &entry);
//Sucessful processing
error = NO_ERROR;
}
else
{
//The ALE table is full
error = ERROR_FAILURE;
}
//Return status code
return error;
} | 137 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | am335xEthDeleteVlanAddrEntry | am335xEthDeleteVlanAddrEntry( uint_t port , uint_t vlanId , MacAddr * macAddr) | ['port', 'vlanId', 'macAddr'] | error_t am335xEthDeleteVlanAddrEntry(uint_t port, uint_t vlanId, MacAddr *macAddr)
{
error_t error;
uint_t index;
Am335xAleEntry entry;
//Search the ALE table for the specified VLAN/address entry
index = am335xEthFindVlanAddrEntry(vlanId, macAddr);
//Matching ALE entry found?
if(index < CPSW_ALE_MAX_ENTRIES)
{
//Clear the contents of the entry
entry.word2 = 0;
entry.word1 = 0;
entry.word0 = 0;
//Update the ALE table
am335xEthWriteEntry(index, &entry);
//Sucessful processing
error = NO_ERROR;
}
else
{
//Entry not found
error = ERROR_NOT_FOUND;
}
//Return status code
return error;
} | 80 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | esp32EthDisableIrq | esp32EthDisableIrq( NetInterface * interface) | ['interface'] | void esp32EthDisableIrq(NetInterface *interface)
{
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Disable Ethernet PHY interrupts
interface->phyDriver->disableIrq(interface);
}
else if(interface->switchDriver != NULL)
{
//Disable Ethernet switch interrupts
interface->switchDriver->disableIrq(interface);
}
else
{
//Just for sanity
}
} | 50 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | esp32EthEnableIrq | esp32EthEnableIrq( NetInterface * interface) | ['interface'] | void esp32EthEnableIrq(NetInterface *interface)
{
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Enable Ethernet PHY interrupts
interface->phyDriver->enableIrq(interface);
}
else if(interface->switchDriver != NULL)
{
//Enable Ethernet switch interrupts
interface->switchDriver->enableIrq(interface);
}
else
{
//Just for sanity
}
} | 50 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthDisableIrq | lpc546xxEthDisableIrq( NetInterface * interface) | ['interface'] | void lpc546xxEthDisableIrq(NetInterface *interface)
{
//Disable Ethernet MAC interrupts
NVIC_DisableIRQ(ETHERNET_IRQn);
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Disable Ethernet PHY interrupts
interface->phyDriver->disableIrq(interface);
}
else if(interface->switchDriver != NULL)
{
//Disable Ethernet switch interrupts
interface->switchDriver->disableIrq(interface);
}
else
{
//Just for sanity
}
} | 55 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthEnableIrq | lpc546xxEthEnableIrq( NetInterface * interface) | ['interface'] | void lpc546xxEthEnableIrq(NetInterface *interface)
{
//Enable Ethernet MAC interrupts
NVIC_EnableIRQ(ETHERNET_IRQn);
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Enable Ethernet PHY interrupts
interface->phyDriver->enableIrq(interface);
}
else if(interface->switchDriver != NULL)
{
//Enable Ethernet switch interrupts
interface->switchDriver->enableIrq(interface);
}
else
{
//Just for sanity
}
} | 55 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthEventHandler | lpc546xxEthEventHandler( NetInterface * interface) | ['interface'] | void lpc546xxEthEventHandler(NetInterface *interface)
{
error_t error;
//Packet received?
if((ENET->DMA_CH[0].DMA_CHX_STAT & ENET_DMA_CH_DMA_CHX_STAT_RI_MASK) != 0)
{
//Clear interrupt flag
ENET->DMA_CH[0].DMA_CHX_STAT = ENET_DMA_CH_DMA_CHX_STAT_RI_MASK;
//Process all pending packets
do
{
//Read incoming packet
error = lpc546xxEthReceivePacket(interface);
//No more data in the receive buffer?
} while(error != ERROR_BUFFER_EMPTY);
}
//Re-enable DMA interrupts
ENET->DMA_CH[0].DMA_CHX_INT_EN = ENET_DMA_CH_DMA_CHX_INT_EN_NIE_MASK |
ENET_DMA_CH_DMA_CHX_INT_EN_RIE_MASK | ENET_DMA_CH_DMA_CHX_INT_EN_TIE_MASK;
} | 73 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthInit | lpc546xxEthInit( NetInterface * interface) | ['interface'] | error_t lpc546xxEthInit(NetInterface *interface)
{
error_t error;
//Debug message
TRACE_INFO("Initializing LPC546xx Ethernet MAC...\r\n");
//Save underlying network interface
nicDriverInterface = interface;
//Enable ENET peripheral clock
CLOCK_EnableClock(kCLOCK_Eth);
//Reset ENET module
RESET_PeripheralReset(kETH_RST_SHIFT_RSTn);
//GPIO configuration
lpc546xxEthInitGpio(interface);
//Perform a software reset
ENET->DMA_MODE |= ENET_DMA_MODE_SWR_MASK;
//Wait for the reset to complete
while((ENET->DMA_MODE & ENET_DMA_MODE_SWR_MASK) != 0)
{
}
//Adjust MDC clock range depending on CSR frequency
ENET->MAC_MDIO_ADDR = ENET_MAC_MDIO_ADDR_CR(4);
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Ethernet PHY initialization
error = interface->phyDriver->init(interface);
}
else if(interface->switchDriver != NULL)
{
//Ethernet switch initialization
error = interface->switchDriver->init(interface);
}
else
{
//The interface is not properly configured
error = ERROR_FAILURE;
}
//Any error to report?
if(error)
{
return error;
}
//Use default MAC configuration
ENET->MAC_CONFIG = ENET_MAC_CONFIG_PS_MASK | ENET_MAC_CONFIG_DO_MASK;
//Set the MAC address of the station
ENET->MAC_ADDR_LOW = interface->macAddr.w[0] | (interface->macAddr.w[1] << 16);
ENET->MAC_ADDR_HIGH = interface->macAddr.w[2];
//Configure the receive filter
ENET->MAC_FRAME_FILTER = 0;
//Disable flow control
ENET->MAC_TX_FLOW_CTRL_Q[0] = 0;
ENET->MAC_RX_FLOW_CTRL = 0;
//Enable the first RX queue
ENET->MAC_RXQ_CTRL[0] = ENET_MAC_RXQ_CTRL_RXQ0EN(1);
//Configure DMA operating mode
ENET->DMA_MODE = ENET_DMA_MODE_PR(0);
//Configure system bus mode
ENET->DMA_SYSBUS_MODE |= ENET_DMA_SYSBUS_MODE_AAL_MASK;
//The DMA takes the descriptor table as contiguous
ENET->DMA_CH[0].DMA_CHX_CTRL = ENET_DMA_CH_DMA_CHX_CTRL_DSL(0);
//Configure TX features
ENET->DMA_CH[0].DMA_CHX_TX_CTRL = ENET_DMA_CH_DMA_CHX_TX_CTRL_TxPBL(1);
//Configure RX features
ENET->DMA_CH[0].DMA_CHX_RX_CTRL = ENET_DMA_CH_DMA_CHX_RX_CTRL_RxPBL(1) |
ENET_DMA_CH_DMA_CHX_RX_CTRL_RBSZ(LPC546XX_ETH_RX_BUFFER_SIZE / 4);
//Enable store and forward mode for transmission
ENET->MTL_QUEUE[0].MTL_TXQX_OP_MODE |= ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TQS(7) |
ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TXQEN(2) |
ENET_MTL_QUEUE_MTL_TXQX_OP_MODE_TSF_MASK;
//Enable store and forward mode for reception
ENET->MTL_QUEUE[0].MTL_RXQX_OP_MODE |= ENET_MTL_QUEUE_MTL_RXQX_OP_MODE_RQS(7) |
ENET_MTL_QUEUE_MTL_RXQX_OP_MODE_RSF_MASK;
//Initialize DMA descriptor lists
lpc546xxEthInitDmaDesc(interface);
//Disable MAC interrupts
ENET->MAC_INTR_EN = 0;
//Enable the desired DMA interrupts
ENET->DMA_CH[0].DMA_CHX_INT_EN = ENET_DMA_CH_DMA_CHX_INT_EN_NIE_MASK |
ENET_DMA_CH_DMA_CHX_INT_EN_RIE_MASK | ENET_DMA_CH_DMA_CHX_INT_EN_TIE_MASK;
//Set priority grouping (3 bits for pre-emption priority, no bits for subpriority)
NVIC_SetPriorityGrouping(LPC546XX_ETH_IRQ_PRIORITY_GROUPING);
//Configure Ethernet interrupt priority
NVIC_SetPriority(ETHERNET_IRQn, NVIC_EncodePriority(LPC546XX_ETH_IRQ_PRIORITY_GROUPING,
LPC546XX_ETH_IRQ_GROUP_PRIORITY, LPC546XX_ETH_IRQ_SUB_PRIORITY));
//Enable MAC transmission and reception
ENET->MAC_CONFIG |= ENET_MAC_CONFIG_TE_MASK | ENET_MAC_CONFIG_RE_MASK;
//Enable DMA transmission and reception
ENET->DMA_CH[0].DMA_CHX_TX_CTRL |= ENET_DMA_CH_DMA_CHX_TX_CTRL_ST_MASK;
ENET->DMA_CH[0].DMA_CHX_RX_CTRL |= ENET_DMA_CH_DMA_CHX_RX_CTRL_SR_MASK;
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Successful initialization
return NO_ERROR;
} | 391 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthInitDmaDesc | lpc546xxEthInitDmaDesc( NetInterface * interface) | ['interface'] | void lpc546xxEthInitDmaDesc(NetInterface *interface)
{
uint_t i;
//Initialize TX DMA descriptor list
for(i = 0; i < LPC546XX_ETH_TX_BUFFER_COUNT; i++)
{
//The descriptor is initially owned by the application
txDmaDesc[i].tdes0 = 0;
txDmaDesc[i].tdes1 = 0;
txDmaDesc[i].tdes2 = 0;
txDmaDesc[i].tdes3 = 0;
}
//Initialize TX descriptor index
txIndex = 0;
//Initialize RX DMA descriptor list
for(i = 0; i < LPC546XX_ETH_RX_BUFFER_COUNT; i++)
{
//The descriptor is initially owned by the DMA
rxDmaDesc[i].rdes0 = (uint32_t) rxBuffer[i];
rxDmaDesc[i].rdes1 = 0;
rxDmaDesc[i].rdes2 = 0;
rxDmaDesc[i].rdes3 = ENET_RDES3_OWN | ENET_RDES3_IOC | ENET_RDES3_BUF1V;
}
//Initialize RX descriptor index
rxIndex = 0;
//Start location of the TX descriptor list
ENET->DMA_CH[0].DMA_CHX_TXDESC_LIST_ADDR = (uint32_t) &txDmaDesc[0];
//Length of the transmit descriptor ring
ENET->DMA_CH[0].DMA_CHX_TXDESC_RING_LENGTH = LPC546XX_ETH_TX_BUFFER_COUNT - 1;
//Start location of the RX descriptor list
ENET->DMA_CH[0].DMA_CHX_RXDESC_LIST_ADDR = (uint32_t) &rxDmaDesc[0];
//Length of the receive descriptor ring
ENET->DMA_CH[0].DMA_CHX_RXDESC_RING_LENGTH = LPC546XX_ETH_RX_BUFFER_COUNT - 1;
} | 193 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthInitGpio | lpc546xxEthInitGpio( NetInterface * interface) | ['interface'] | void lpc546xxEthInitGpio(NetInterface *interface)
{
gpio_pin_config_t pinConfig;
//Select RMII interface mode
SYSCON->ETHPHYSEL |= SYSCON_ETHPHYSEL_PHY_SEL_MASK;
//Enable IOCON clock
CLOCK_EnableClock(kCLOCK_Iocon);
//Enable GPIO clocks
CLOCK_EnableClock(kCLOCK_Gpio0);
CLOCK_EnableClock(kCLOCK_Gpio4);
//Configure ENET_TXD1 (PA0_17)
IOCON_PinMuxSet(IOCON, 0, 17, IOCON_FUNC7 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_TXD0 (PA4_8)
IOCON_PinMuxSet(IOCON, 4, 8, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_RX_DV (PA4_10)
IOCON_PinMuxSet(IOCON, 4, 10, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_RXD0 (PA4_11)
IOCON_PinMuxSet(IOCON, 4, 11, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_RXD1 (PA4_12)
IOCON_PinMuxSet(IOCON, 4, 12, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_TX_EN (PA4_13)
IOCON_PinMuxSet(IOCON, 4, 13, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_RX_CLK (PA4_14)
IOCON_PinMuxSet(IOCON, 4, 14, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_MDC (PA4_15)
IOCON_PinMuxSet(IOCON, 4, 15, IOCON_FUNC1 | IOCON_MODE_INACT |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_MDIO (PA4_16)
IOCON_PinMuxSet(IOCON, 4, 16, IOCON_FUNC1 | IOCON_MODE_PULLUP |
IOCON_DIGITAL_EN | IOCON_INPFILT_OFF);
//Configure ENET_RST as an output
pinConfig.pinDirection = kGPIO_DigitalOutput;
pinConfig.outputLogic = 0;
GPIO_PinInit(GPIO, 2, 26, &pinConfig);
//Reset PHY transceiver (hard reset)
GPIO_WritePinOutput(GPIO, 2, 26, 0);
sleep(10);
GPIO_WritePinOutput(GPIO, 2, 26, 1);
sleep(10);
} | 241 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthReadPhyReg | lpc546xxEthReadPhyReg( uint8_t opcode , uint8_t phyAddr , uint8_t regAddr) | ['opcode', 'phyAddr', 'regAddr'] | uint16_t lpc546xxEthReadPhyReg(uint8_t opcode, uint8_t phyAddr,
uint8_t regAddr)
{
uint16_t data;
uint32_t temp;
//Valid opcode?
if(opcode == SMI_OPCODE_READ)
{
//Take care not to alter MDC clock configuration
temp = ENET->MAC_MDIO_ADDR & ENET_MAC_MDIO_ADDR_CR_MASK;
//Set up a read operation
temp |= ENET_MAC_MDIO_ADDR_MOC(3) | ENET_MAC_MDIO_ADDR_MB_MASK;
//PHY address
temp |= ENET_MAC_MDIO_ADDR_PA(phyAddr);
//Register address
temp |= ENET_MAC_MDIO_ADDR_RDA(regAddr);
//Start a read operation
ENET->MAC_MDIO_ADDR = temp;
//Wait for the read to complete
while((ENET->MAC_MDIO_ADDR & ENET_MAC_MDIO_ADDR_MB_MASK) != 0)
{
}
//Get register value
data = ENET->MAC_MDIO_DATA & ENET_MAC_MDIO_DATA_MD_MASK;
}
else
{
//The MAC peripheral only supports standard Clause 22 opcodes
data = 0;
}
//Return the value of the PHY register
return data;
} | 96 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthReceivePacket | lpc546xxEthReceivePacket( NetInterface * interface) | ['interface'] | error_t lpc546xxEthReceivePacket(NetInterface *interface)
{
error_t error;
size_t n;
NetRxAncillary ancillary;
//The current buffer is available for reading?
if((rxDmaDesc[rxIndex].rdes3 & ENET_RDES3_OWN) == 0)
{
//FD and LD flags should be set
if((rxDmaDesc[rxIndex].rdes3 & ENET_RDES3_FD) != 0 &&
(rxDmaDesc[rxIndex].rdes3 & ENET_RDES3_LD) != 0)
{
//Make sure no error occurred
if((rxDmaDesc[rxIndex].rdes3 & ENET_RDES3_ES) == 0)
{
//Retrieve the length of the frame
n = rxDmaDesc[rxIndex].rdes3 & ENET_RDES3_PL;
//Limit the number of data to read
n = MIN(n, LPC546XX_ETH_RX_BUFFER_SIZE);
//Additional options can be passed to the stack along with the packet
ancillary = NET_DEFAULT_RX_ANCILLARY;
//Pass the packet to the upper layer
nicProcessPacket(interface, rxBuffer[rxIndex], n, &ancillary);
//Valid packet received
error = NO_ERROR;
}
else
{
//The received packet contains an error
error = ERROR_INVALID_PACKET;
}
}
else
{
//The packet is not valid
error = ERROR_INVALID_PACKET;
}
//Set the start address of the buffer
rxDmaDesc[rxIndex].rdes0 = (uint32_t) rxBuffer[rxIndex];
//Give the ownership of the descriptor back to the DMA
rxDmaDesc[rxIndex].rdes3 = ENET_RDES3_OWN | ENET_RDES3_IOC | ENET_RDES3_BUF1V;
//Increment index and wrap around if necessary
if(++rxIndex >= LPC546XX_ETH_RX_BUFFER_COUNT)
{
rxIndex = 0;
}
}
else
{
//No more data in the receive buffer
error = ERROR_BUFFER_EMPTY;
}
//Clear RBU flag to resume processing
ENET->DMA_CH[0].DMA_CHX_STAT = ENET_DMA_CH_DMA_CHX_STAT_RBU_MASK;
//Instruct the DMA to poll the receive descriptor list
ENET->DMA_CH[0].DMA_CHX_RXDESC_TAIL_PTR = 0;
//Return status code
return error;
} | 211 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthSendPacket | lpc546xxEthSendPacket( NetInterface * interface , const NetBuffer * buffer , size_t offset , NetTxAncillary * ancillary) | ['interface', 'buffer', 'offset', 'ancillary'] | error_t lpc546xxEthSendPacket(NetInterface *interface,
const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
{
size_t length;
//Retrieve the length of the packet
length = netBufferGetLength(buffer) - offset;
//Check the frame length
if(length > LPC546XX_ETH_TX_BUFFER_SIZE)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
//Report an error
return ERROR_INVALID_LENGTH;
}
//Make sure the current buffer is available for writing
if((txDmaDesc[txIndex].tdes3 & ENET_TDES3_OWN) != 0)
{
return ERROR_FAILURE;
}
//Copy user data to the transmit buffer
netBufferRead(txBuffer[txIndex], buffer, offset, length);
//Set the start address of the buffer
txDmaDesc[txIndex].tdes0 = (uint32_t) txBuffer[txIndex];
//Write the number of bytes to send
txDmaDesc[txIndex].tdes2 = ENET_TDES2_IOC | (length & ENET_TDES2_B1L);
//Give the ownership of the descriptor to the DMA
txDmaDesc[txIndex].tdes3 = ENET_TDES3_OWN | ENET_TDES3_FD | ENET_TDES3_LD;
//Clear TBU flag to resume processing
ENET->DMA_CH[0].DMA_CHX_STAT = ENET_DMA_CH_DMA_CHX_STAT_TBU_MASK;
//Instruct the DMA to poll the transmit descriptor list
ENET->DMA_CH[0].DMA_CHX_TXDESC_TAIL_PTR = 0;
//Increment index and wrap around if necessary
if(++txIndex >= LPC546XX_ETH_TX_BUFFER_COUNT)
{
txIndex = 0;
}
//Check whether the next buffer is available for writing
if((txDmaDesc[txIndex].tdes3 & ENET_TDES3_OWN) == 0)
{
//The transmitter can accept another packet
osSetEvent(&interface->nicTxEvent);
}
//Data successfully written
return NO_ERROR;
} | 191 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthTick | lpc546xxEthTick( NetInterface * interface) | ['interface'] | void lpc546xxEthTick(NetInterface *interface)
{
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Handle periodic operations
interface->phyDriver->tick(interface);
}
else if(interface->switchDriver != NULL)
{
//Handle periodic operations
interface->switchDriver->tick(interface);
}
else
{
//Just for sanity
}
} | 50 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthUpdateMacAddrFilter | lpc546xxEthUpdateMacAddrFilter( NetInterface * interface) | ['interface'] | error_t lpc546xxEthUpdateMacAddrFilter(NetInterface *interface)
{
uint_t i;
bool_t acceptMulticast;
//Debug message
TRACE_DEBUG("Updating MAC filter...\r\n");
//Set the MAC address of the station
ENET->MAC_ADDR_LOW = interface->macAddr.w[0] | (interface->macAddr.w[1] << 16);
ENET->MAC_ADDR_HIGH = interface->macAddr.w[2];
//This flag will be set if multicast addresses should be accepted
acceptMulticast = FALSE;
//The MAC address filter contains the list of MAC addresses to accept
//when receiving an Ethernet frame
for(i = 0; i < MAC_ADDR_FILTER_SIZE; i++)
{
//Valid entry?
if(interface->macAddrFilter[i].refCount > 0)
{
//Accept multicast addresses
acceptMulticast = TRUE;
//We are done
break;
}
}
//Enable the reception of multicast frames if necessary
if(acceptMulticast)
{
ENET->MAC_FRAME_FILTER |= ENET_MAC_FRAME_FILTER_PM_MASK;
}
else
{
ENET->MAC_FRAME_FILTER &= ~ENET_MAC_FRAME_FILTER_PM_MASK;
}
//Successful processing
return NO_ERROR;
} | 123 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthUpdateMacConfig | lpc546xxEthUpdateMacConfig( NetInterface * interface) | ['interface'] | error_t lpc546xxEthUpdateMacConfig(NetInterface *interface)
{
uint32_t config;
//Read current MAC configuration
config = ENET->MAC_CONFIG;
//10BASE-T or 100BASE-TX operation mode?
if(interface->linkSpeed == NIC_LINK_SPEED_100MBPS)
{
config |= ENET_MAC_CONFIG_FES_MASK;
}
else
{
config &= ~ENET_MAC_CONFIG_FES_MASK;
}
//Half-duplex or full-duplex mode?
if(interface->duplexMode == NIC_FULL_DUPLEX_MODE)
{
config |= ENET_MAC_CONFIG_DM_MASK;
}
else
{
config &= ~ENET_MAC_CONFIG_DM_MASK;
}
//Update MAC configuration register
ENET->MAC_CONFIG = config;
//Successful processing
return NO_ERROR;
} | 68 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | lpc546xxEthWritePhyReg | lpc546xxEthWritePhyReg( uint8_t opcode , uint8_t phyAddr , uint8_t regAddr , uint16_t data) | ['opcode', 'phyAddr', 'regAddr', 'data'] | void lpc546xxEthWritePhyReg(uint8_t opcode, uint8_t phyAddr,
uint8_t regAddr, uint16_t data)
{
uint32_t temp;
//Valid opcode?
if(opcode == SMI_OPCODE_WRITE)
{
//Take care not to alter MDC clock configuration
temp = ENET->MAC_MDIO_ADDR & ENET_MAC_MDIO_ADDR_CR_MASK;
//Set up a write operation
temp |= ENET_MAC_MDIO_ADDR_MOC(1) | ENET_MAC_MDIO_ADDR_MB_MASK;
//PHY address
temp |= ENET_MAC_MDIO_ADDR_PA(phyAddr);
//Register address
temp |= ENET_MAC_MDIO_ADDR_RDA(regAddr);
//Data to be written in the PHY register
ENET->MAC_MDIO_DATA = data & ENET_MAC_MDIO_DATA_MD_MASK;
//Start a write operation
ENET->MAC_MDIO_ADDR = temp;
//Wait for the write to complete
while((ENET->MAC_MDIO_ADDR & ENET_MAC_MDIO_ADDR_MB_MASK) != 0)
{
}
}
else
{
//The MAC peripheral only supports standard Clause 22 opcodes
}
} | 89 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | rx63nEthInitGpio | rx63nEthInitGpio( NetInterface * interface) | ['interface'] | void rx63nEthInitGpio(NetInterface *interface)
{
//Unlock MPC registers
MPC.PWPR.BIT.B0WI = 0;
MPC.PWPR.BIT.PFSWE = 1;
#if defined(USE_RDK_RX63N)
//Select RMII interface mode
MPC.PFENET.BIT.PHYMODE = 0;
//Configure ET_MDIO (PA3)
PORTA.PMR.BIT.B3 = 1;
MPC.PA3PFS.BYTE = 0x11;
//Configure ET_MDC (PA4)
PORTA.PMR.BIT.B4 = 1;
MPC.PA4PFS.BYTE = 0x11;
//Configure ET_LINKSTA (PA5)
PORTA.PMR.BIT.B5 = 1;
MPC.PA5PFS.BYTE = 0x11;
//Configure RMII_RXD1 (PB0)
PORTB.PMR.BIT.B0 = 1;
MPC.PB0PFS.BYTE = 0x12;
//Configure RMII_RXD0 (PB1)
PORTB.PMR.BIT.B1 = 1;
MPC.PB1PFS.BYTE = 0x12;
//Configure REF50CK (PB2)
PORTB.PMR.BIT.B2 = 1;
MPC.PB2PFS.BYTE = 0x12;
//Configure RMII_RX_ER (PB3)
PORTB.PMR.BIT.B3 = 1;
MPC.PB3PFS.BYTE = 0x12;
//Configure RMII_TXD_EN (PB4)
PORTB.PMR.BIT.B4 = 1;
MPC.PB4PFS.BYTE = 0x12;
//Configure RMII_TXD0 (PB5)
PORTB.PMR.BIT.B5 = 1;
MPC.PB5PFS.BYTE = 0x12;
//Configure RMII_TXD1 (PB6)
PORTB.PMR.BIT.B6 = 1;
MPC.PB6PFS.BYTE = 0x12;
//Configure RMII_CRS_DV (PB7)
PORTB.PMR.BIT.B7 = 1;
MPC.PB7PFS.BYTE = 0x12;
#elif defined(USE_RSK_RX63N)
//Select MII interface mode
MPC.PFENET.BIT.PHYMODE = 1;
//Configure ET_MDIO (P71)
PORT7.PMR.BIT.B1 = 1;
MPC.P71PFS.BYTE = 0x11;
//Configure ET_MDC (P72)
PORT7.PMR.BIT.B2 = 1;
MPC.P72PFS.BYTE = 0x11;
//Configure ET_ERXD1 (P74)
PORT7.PMR.BIT.B4 = 1;
MPC.P74PFS.BYTE = 0x11;
//Configure ET_ERXD0 P75)
PORT7.PMR.BIT.B5 = 1;
MPC.P75PFS.BYTE = 0x11;
//Configure ET_RX_CLK (P76)
PORT7.PMR.BIT.B6 = 1;
MPC.P76PFS.BYTE = 0x11;
//Configure ET_RX_ER (P77)
PORT7.PMR.BIT.B7 = 1;
MPC.P77PFS.BYTE = 0x11;
//Configure ET_TX_EN (P80)
PORT8.PMR.BIT.B0 = 1;
MPC.P80PFS.BYTE = 0x11;
//Configure ET_ETXD0 (P81)
PORT8.PMR.BIT.B1 = 1;
MPC.P81PFS.BYTE = 0x11;
//Configure ET_ETXD1 (P82)
PORT8.PMR.BIT.B2 = 1;
MPC.P82PFS.BYTE = 0x11;
//Configure ET_CRS (P83)
PORT8.PMR.BIT.B3 = 1;
MPC.P83PFS.BYTE = 0x11;
//Configure ET_ERXD3 (PC0)
PORTC.PMR.BIT.B0 = 1;
MPC.PC0PFS.BYTE = 0x11;
//Configure ET_ERXD2 (PC1)
PORTC.PMR.BIT.B1 = 1;
MPC.PC1PFS.BYTE = 0x11;
//Configure ET_RX_DV (PC2)
PORTC.PMR.BIT.B2 = 1;
MPC.PC2PFS.BYTE = 0x11;
//Configure ET_TX_ER (PC3)
PORTC.PMR.BIT.B3 = 1;
MPC.PC3PFS.BYTE = 0x11;
//Configure ET_TX_CLK (PC4)
PORTC.PMR.BIT.B4 = 1;
MPC.PC4PFS.BYTE = 0x11;
//Configure ET_ETXD2 (PC5)
PORTC.PMR.BIT.B5 = 1;
MPC.PC5PFS.BYTE = 0x11;
//Configure ET_ETXD3 (PC6)
PORTC.PMR.BIT.B6 = 1;
MPC.PC6PFS.BYTE = 0x11;
//Configure ET_COL (PC7)
PORTC.PMR.BIT.B7 = 1;
MPC.PC7PFS.BYTE = 0x11;
#endif
//Lock MPC registers
MPC.PWPR.BIT.PFSWE = 0;
MPC.PWPR.BIT.B0WI = 0;
} | 590 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | rza1EthEventHandler | rza1EthEventHandler( NetInterface * interface) | ['interface'] | void rza1EthEventHandler(NetInterface *interface)
{
error_t error;
//Packet received?
if((ETHER.EESR0 & ETHER_EESR0_FR) != 0)
{
//Clear FR interrupt flag
ETHER.EESR0 = ETHER_EESR0_FR;
//Process all pending packets
do
{
//Read incoming packet
error = rza1EthReceivePacket(interface);
//No more data in the receive buffer?
} while(error != ERROR_BUFFER_EMPTY);
}
//Re-enable EDMAC interrupts
ETHER.EESIPR0 = ETHER_EESIPR0_TWBIP | ETHER_EESIPR0_FRIP;
} | 56 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | rza1EthInit | rza1EthInit( NetInterface * interface) | ['interface'] | error_t rza1EthInit(NetInterface *interface)
{
error_t error;
//Debug message
TRACE_INFO("Initializing RZ/A1 Ethernet MAC...\r\n");
//Save underlying network interface
nicDriverInterface = interface;
//Enable Ethernet peripheral clock
CPG.STBCR7 &= ~CPG_STBCR7_MSTP74;
//GPIO configuration
rza1EthInitGpio(interface);
//Perform software reset
ETHER.ARSTR = ETHER_ARSTR_ARST;
//Wait for the reset to complete
sleep(10);
//Start EDMAC transmitting and receiving units
ETHER.EDSR0 = ETHER_EDSR0_ENT | ETHER_EDSR0_ENR;
//To execute a software reset with this register, 1 must be
//written to both the SWRT and SWRR bits simultaneously
ETHER.EDMR0 = ETHER_EDMR0_SWRT | ETHER_EDMR0_SWRR;
//Wait for the reset to complete
while(ETHER.EDMR0 & (ETHER_EDMR0_SWRT | ETHER_EDMR0_SWRR))
{
}
//Valid Ethernet PHY or switch driver?
if(interface->phyDriver != NULL)
{
//Ethernet PHY initialization
error = interface->phyDriver->init(interface);
}
else if(interface->switchDriver != NULL)
{
//Ethernet switch initialization
error = interface->switchDriver->init(interface);
}
else
{
//The interface is not properly configured
error = ERROR_FAILURE;
}
//Any error to report?
if(error)
{
return error;
}
//Initialize DMA descriptor lists
rza1EthInitDmaDesc(interface);
//Select little endian mode and set descriptor length (16 bytes)
ETHER.EDMR0 = ETHER_EDMR0_DE | ETHER_EDMR0_DL_16;
//Error masks
ETHER.TRSCER0 = 0;
//Use store and forward mode
ETHER.TFTR0 = 0;
//Set transmit FIFO size and receive FIFO size (2048 bytes)
ETHER.FDR0 = ETHER_FDR0_TFD_2048 | ETHER_FDR0_RFD_2048;
//Enable continuous reception of multiple frames
ETHER.RMCR0 = ETHER_RMCR0_RNC;
//No padding insertion into receive data
ETHER.RPADIR0 = 0;
//Receive FIFO threshold (8 frames or 2048-64 bytes)
ETHER.FCFTR0 = ETHER_FCFTR0_RFF_8 | ETHER_FCFTR0_RFD_2048;
//Intelligent checksum operation mode
ETHER.CSMR = 0;
//Enable multicast address filtering
ETHER.ECMR0 |= ETH_ECMR0_MCT;
//Set the upper 32 bits of the MAC address
ETHER.MAHR0 = (interface->macAddr.b[0] << 24) | (interface->macAddr.b[1] << 16) |
(interface->macAddr.b[2] << 8) | interface->macAddr.b[3];
//Set the lower 16 bits of the MAC address
ETHER.MALR0 = (interface->macAddr.b[4] << 8) | interface->macAddr.b[5];
//Disable all CAM entries
ETHER.TSU_TEN = 0;
//Maximum frame length that can be accepted
ETHER.RFLR0 = RZA1_ETH_RX_BUFFER_SIZE;
//Automatic pause frame
ETHER.APR0 = 0;
//Manual pause frame
ETHER.MPR0 = 0;
//Automatic pause frame retransmit count
ETHER.TPAUSER0 = 0;
//Disable all EMAC interrupts
ETHER.ECSIPR0 = 0;
//Enable the desired EDMAC interrupts
ETHER.EESIPR0 = ETHER_EESIPR0_TWBIP | ETHER_EESIPR0_FRIP;
//Register interrupt handler
R_INTC_Regist_Int_Func(INTC_ID_ETHERI, rza1EthIrqHandler);
//Configure interrupt priority
R_INTC_Set_Priority(INTC_ID_ETHERI, RZA1_ETH_IRQ_PRIORITY);
//Enable EDMAC transmission and reception
ETHER.ECMR0 |= ETH_ECMR0_RE | ETH_ECMR0_TE;
//Instruct the DMA to poll the receive descriptor list
ETHER.EDRRR0 = ETHER_EDRRR0_RR;
//Accept any packets from the upper layer
osSetEvent(&interface->nicTxEvent);
//Successful initialization
return NO_ERROR;
} | 361 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | stm32h7xxEthInitGpio | stm32h7xxEthInitGpio( NetInterface * interface) | ['interface'] | void stm32h7xxEthInitGpio(NetInterface *interface)
{
GPIO_InitTypeDef GPIO_InitStructure;
//STM32F743I-EVAL, STM32F747I-EVAL or STM32H747I-Discovery evaluation board?
#if defined(USE_STM32H743I_EVAL) || defined(USE_STM32H747I_EVAL) || \
defined(USE_STM32H747I_DISCO)
//Enable SYSCFG clock
__HAL_RCC_SYSCFG_CLK_ENABLE();
//Enable GPIO clocks
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
//Select RMII interface mode
HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII);
//Configure RMII pins
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStructure.Alternate = GPIO_AF11_ETH;
//Configure ETH_RMII_REF_CLK (PA1), ETH_MDIO (PA2) and ETH_RMII_CRS_DV (PA7)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
//Configure ETH_MDC (PC1), ETH_RMII_RXD0 (PC4) and ETH_RMII_RXD1 (PC5)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
//Configure RMII_TX_EN (PG11), ETH_RMII_TXD1 (PG12) and ETH_RMII_TXD0 (PG13)
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13;
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
//STM32H745I-Discovery or STM32H750B-DK evaluation board?
#elif defined(USE_STM32H745I_DISCO) || defined(USE_STM32H750B_DISCO)
//Enable SYSCFG clock
__HAL_RCC_SYSCFG_CLK_ENABLE();
//Enable GPIO clocks
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOI_CLK_ENABLE();
//Select MII interface mode
HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII);
//Configure MII pins
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStructure.Alternate = GPIO_AF11_ETH;
//Configure ETH_MII_RX_CLK (PA1), ETH_MDIO (PA2) and ETH_MII_RX_DV (PA7)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
//Configure ETH_MII_RXD2 (PB0), ETH_MII_RXD3 (PB1) and ETH_MII_RX_ER (PB2)
GPIO_InitStructure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2;
HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);
//Configure ETH_MDC (PC1), ETH_MII_TXD2 (PC2), ETH_MII_TX_CLK (PC3),
//ETH_MII_RXD0 (PC4) and ETH_MII_RXD1 (PC5)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5;
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
//Configure ETH_MII_TXD3 (PE2)
GPIO_InitStructure.Pin = GPIO_PIN_2;
HAL_GPIO_Init(GPIOE, &GPIO_InitStructure);
//Configure ETH_MII_TX_EN (PG11), ETH_MII_TXD1 (PG12) and ETH_MII_TXD0 (PG13)
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13;
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
//Configure ETH_MII_CRS (PH2) and ETH_MII_COL (PH3)
//GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_3;
//HAL_GPIO_Init(GPIOH, &GPIO_InitStructure);
//Configure ETH_MII_RX_ER (PI10)
GPIO_InitStructure.Pin = GPIO_PIN_10;
HAL_GPIO_Init(GPIOI, &GPIO_InitStructure);
//Nucleo-H743ZI, Nucleo-H743ZI2 or Nucleo-H745ZI-Q evaluation board?
#elif defined(USE_STM32H7XX_NUCLEO_144) || defined(USE_STM32H7XX_NUCLEO_144_MB1363) || \
defined(USE_STM32H7XX_NUCLEO_144_MB1364)
//Enable SYSCFG clock
__HAL_RCC_SYSCFG_CLK_ENABLE();
//Enable GPIO clocks
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
//Select RMII interface mode
HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII);
//Configure RMII pins
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStructure.Alternate = GPIO_AF11_ETH;
//Configure ETH_RMII_REF_CLK (PA1), ETH_MDIO (PA2) and ETH_RMII_CRS_DV (PA7)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
//Configure ETH_RMII_TXD1 (PB13)
GPIO_InitStructure.Pin = GPIO_PIN_13;
HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);
//Configure ETH_MDC (PC1), ETH_RMII_RXD0 (PC4) and ETH_RMII_RXD1 (PC5)
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
//Configure RMII_TX_EN (PG11) and ETH_RMII_TXD0 (PG13)
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
#endif
} | 390 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | tja1100Init | tja1100Init( NetInterface * interface) | ['interface'] | error_t tja1100Init(NetInterface *interface)
{
uint16_t value;
//Debug message
TRACE_INFO("Initializing TJA1100...\r\n");
//Undefined PHY address?
if(interface->phyAddr >= 32)
{
//Use the default address
interface->phyAddr = TJA1100_PHY_ADDR;
}
//Initialize serial management interface
if(interface->smiDriver != NULL)
{
interface->smiDriver->init();
}
//Initialize external interrupt line driver
if(interface->extIntDriver != NULL)
{
interface->extIntDriver->init();
}
//Reset PHY transceiver
tja1100WritePhyReg(interface, TJA1100_BASIC_CTRL,
TJA1100_BASIC_CTRL_RESET);
//Wait for the reset to complete
while(tja1100ReadPhyReg(interface, TJA1100_BASIC_CTRL) &
TJA1100_BASIC_CTRL_RESET)
{
}
//Dump PHY registers for debugging purpose
tja1100DumpPhyReg(interface);
//Enable configuration register access
value = tja1100ReadPhyReg(interface, TJA1100_EXTENDED_CTRL);
value |= TJA1100_EXTENDED_CTRL_CONFIG_EN;
tja1100WritePhyReg(interface, TJA1100_EXTENDED_CTRL, value);
//Select RMII mode (25MHz XTAL)
value = tja1100ReadPhyReg(interface, TJA1100_CONFIG1);
value &= ~TJA1100_CONFIG1_MII_MODE;
value |= TJA1100_CONFIG1_MII_MODE_RMII_25MHZ;
tja1100WritePhyReg(interface, TJA1100_CONFIG1, value);
//The PHY is configured for autonomous operation
value = tja1100ReadPhyReg(interface, TJA1100_CONFIG1);
value |= TJA1100_CONFIG1_AUTO_OP;
tja1100WritePhyReg(interface, TJA1100_CONFIG1, value);
//Force the TCP/IP stack to poll the link state at startup
interface->phyEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 180 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | tja1101Init | tja1101Init( NetInterface * interface) | ['interface'] | error_t tja1101Init(NetInterface *interface)
{
uint16_t value;
//Debug message
TRACE_INFO("Initializing TJA1101...\r\n");
//Undefined PHY address?
if(interface->phyAddr >= 32)
{
//Use the default address
interface->phyAddr = TJA1101_PHY_ADDR;
}
//Initialize serial management interface
if(interface->smiDriver != NULL)
{
interface->smiDriver->init();
}
//Initialize external interrupt line driver
if(interface->extIntDriver != NULL)
{
interface->extIntDriver->init();
}
//Reset PHY transceiver
tja1101WritePhyReg(interface, TJA1101_BASIC_CTRL,
TJA1101_BASIC_CTRL_RESET);
//Wait for the reset to complete
while(tja1101ReadPhyReg(interface, TJA1101_BASIC_CTRL) &
TJA1101_BASIC_CTRL_RESET)
{
}
//Dump PHY registers for debugging purpose
tja1101DumpPhyReg(interface);
//Enable configuration register access
value = tja1101ReadPhyReg(interface, TJA1101_EXTENDED_CTRL);
value |= TJA1101_EXTENDED_CTRL_CONFIG_EN;
tja1101WritePhyReg(interface, TJA1101_EXTENDED_CTRL, value);
//Select RMII mode (25MHz XTAL)
value = tja1101ReadPhyReg(interface, TJA1101_CONFIG1);
value &= ~TJA1101_CONFIG1_MII_MODE;
value |= TJA1101_CONFIG1_MII_MODE_RMII_25MHZ;
tja1101WritePhyReg(interface, TJA1101_CONFIG1, value);
//The PHY is configured for autonomous operation
value = tja1101ReadPhyReg(interface, TJA1101_COMM_CTRL);
value |= TJA1101_COMM_CTRL_AUTO_OP;
tja1101WritePhyReg(interface, TJA1101_COMM_CTRL, value);
//Force the TCP/IP stack to poll the link state at startup
interface->phyEvent = TRUE;
//Notify the TCP/IP stack of the event
osSetEvent(&netEvent);
//Successful initialization
return NO_ERROR;
} | 180 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ftpClientParseDirEntry | ftpClientParseDirEntry( char_t * line , FtpDirEntry * dirEntry) | ['line', 'dirEntry'] | error_t ftpClientParseDirEntry(char_t *line, FtpDirEntry *dirEntry)
{
uint_t i;
size_t n;
char_t *p;
char_t *token;
//Abbreviated months
static const char_t months[13][4] =
{
" ",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
};
//Read first field
token = osStrtok_r(line, " \t", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//MS-DOS listing format?
if(osIsdigit(token[0]))
{
//Check modification date format
if(osStrlen(token) == 8 && token[2] == '-' && token[5] == '-')
{
//The format of the date is mm-dd-yy
dirEntry->modified.month = (uint8_t) osStrtoul(token, NULL, 10);
dirEntry->modified.day = (uint8_t) osStrtoul(token + 3, NULL, 10);
dirEntry->modified.year = (uint16_t) osStrtoul(token + 6, NULL, 10) + 2000;
}
else if(osStrlen(token) == 10 && token[2] == '/' && token[5] == '/')
{
//The format of the date is mm/dd/yyyy
dirEntry->modified.month = (uint8_t) osStrtoul(token, NULL, 10);
dirEntry->modified.day = (uint8_t) osStrtoul(token + 3, NULL, 10);
dirEntry->modified.year = (uint16_t) osStrtoul(token + 6, NULL, 10);
}
else
{
//Invalid time format
return ERROR_INVALID_SYNTAX;
}
//Read modification time
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Check modification time format
if(osStrlen(token) >= 5 && token[2] == ':')
{
//The format of the time hh:mm
dirEntry->modified.hours = (uint8_t) osStrtoul(token, NULL, 10);
dirEntry->modified.minutes = (uint8_t) osStrtoul(token + 3, NULL, 10);
//The PM period covers the 12 hours from noon to midnight
if(strstr(token, "PM") != NULL)
dirEntry->modified.hours += 12;
}
else
{
//Invalid time format
return ERROR_INVALID_SYNTAX;
}
//Read next field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Check whether the current entry is a directory
if(!osStrcmp(token, "<DIR>"))
{
//Update attributes
dirEntry->attributes |= FTP_FILE_ATTR_DIRECTORY;
}
else
{
//Save the size of the file
dirEntry->size = osStrtoul(token, NULL, 10);
}
//Read filename field
token = osStrtok_r(NULL, " \r\n", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Retrieve the length of the filename
n = osStrlen(token);
//Limit the number of characters to copy
n = MIN(n, FTP_CLIENT_MAX_FILENAME_LEN);
//Copy the filename
osStrncpy(dirEntry->name, token, n);
//Properly terminate the string with a NULL character
dirEntry->name[n] = '\0';
}
//Unix listing format?
else
{
//Check file permissions
if(strchr(token, 'd') != NULL)
dirEntry->attributes |= FTP_FILE_ATTR_DIRECTORY;
if(strchr(token, 'w') == NULL)
dirEntry->attributes |= FTP_FILE_ATTR_READ_ONLY;
//Read next field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Discard owner field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Discard group field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Read size field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Save the size of the file
dirEntry->size = osStrtoul(token, NULL, 10);
//Read modification time (month)
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Decode the 3-letter month name
for(i = 1; i <= 12; i++)
{
//Compare month name
if(!osStrcmp(token, months[i]))
{
//Save month number
dirEntry->modified.month = i;
break;
}
}
//Read modification time (day)
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Save day number
dirEntry->modified.day = (uint8_t) osStrtoul(token, NULL, 10);
//Read next field
token = osStrtok_r(NULL, " ", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Check modification time format
if(osStrlen(token) == 4)
{
//The format of the year is yyyy
dirEntry->modified.year = (uint16_t) osStrtoul(token, NULL, 10);
}
else if(osStrlen(token) == 5)
{
//The format of the time hh:mm
token[2] = '\0';
dirEntry->modified.hours = (uint8_t) osStrtoul(token, NULL, 10);
dirEntry->modified.minutes = (uint8_t) osStrtoul(token + 3, NULL, 10);
}
else
{
//Invalid time format
return ERROR_INVALID_SYNTAX;
}
//Read filename field
token = osStrtok_r(NULL, " \r\n", &p);
//Invalid directory entry?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Retrieve the length of the filename
n = osStrlen(token);
//Limit the number of characters to copy
n = MIN(n, FTP_CLIENT_MAX_FILENAME_LEN);
//Copy the filename
osStrncpy(dirEntry->name, token, n);
//Properly terminate the string with a NULL character
dirEntry->name[n] = '\0';
}
//The directory entry is valid
return NO_ERROR;
} | 894 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ftpClientParsePwdReply | ftpClientParsePwdReply( FtpClientContext * context , char_t * path , size_t maxLen) | ['context', 'path', 'maxLen'] | error_t ftpClientParsePwdReply(FtpClientContext *context, char_t *path,
size_t maxLen)
{
size_t length;
char_t *p;
//Search for the last double quote
p = strrchr(context->buffer, '\"');
//Failed to parse the response?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//Split the string
*p = '\0';
//Search for the first double quote
p = strchr(context->buffer, '\"');
//Failed to parse the response?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//Retrieve the length of the working directory
length = osStrlen(p + 1);
//Limit the number of characters to copy
length = MIN(length, maxLen);
//Copy the string
osStrncpy(path, p + 1, length);
//Properly terminate the string with a NULL character
path[length] = '\0';
//Successful processing
return NO_ERROR;
} | 106 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientAddQueryParam | httpClientAddQueryParam( HttpClientContext * context , const char_t * name , const char_t * value) | ['context', 'name', 'value'] | error_t httpClientAddQueryParam(HttpClientContext *context,
const char_t *name, const char_t *value)
{
size_t nameLen;
size_t valueLen;
char_t separator;
char_t *p;
//Check parameters
if(context == NULL || name == NULL)
return ERROR_INVALID_PARAMETER;
//The parameter name must not be empty
if(name[0] == '\0')
return ERROR_INVALID_PARAMETER;
//Check HTTP request state
if(context->requestState != HTTP_REQ_STATE_FORMAT_HEADER)
return ERROR_WRONG_STATE;
//Make sure the buffer contains a valid HTTP request
if(context->bufferLen > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_INVALID_SYNTAX;
//Properly terminate the string with a NULL character
context->buffer[context->bufferLen] = '\0';
//The Request-Line begins with a method token
p = strchr(context->buffer, ' ');
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//The method token is followed by the Request-URI
p = strpbrk(p + 1, " ?");
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//The question mark is used as a separator
if(*p == '?')
{
//Point to the end of the query string
p = strchr(p + 1, ' ');
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//multiple query parameters are separated by an ampersand
separator = '&';
}
else
{
//The query string is not present
separator = '?';
}
//Compute the length of the parameter value
nameLen = osStrlen(name);
//Empty parameter value?
if(value == NULL)
{
//Make sure the buffer is large enough to hold the new query parameter
if((context->bufferLen + nameLen + 1) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Make room for the new query parameter
osMemmove(p + nameLen + 1, p, context->buffer + context->bufferLen + 1 - p);
//Multiple query parameters are separated by a delimiter
p[0] = separator;
//Copy parameter name
osStrncpy(p + 1, name, nameLen);
//Adjust the length of the request header
context->bufferLen += nameLen + 1;
}
else
{
//Compute the length of the parameter value
valueLen = osStrlen(value);
//Make sure the buffer is large enough to hold the new query parameter
if((context->bufferLen + nameLen + valueLen + 2) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Make room for the new query parameter
osMemmove(p + nameLen + valueLen + 2, p, context->buffer +
context->bufferLen + 1 - p);
//Multiple query parameters are separated by a delimiter
p[0] = separator;
//Copy parameter name
osStrncpy(p + 1, name, nameLen);
//The field name and value are separated by an equals sign
p[nameLen + 1] = '=';
//Copy parameter value
osStrncpy(p + nameLen + 2, value, valueLen);
//Adjust the length of the request header
context->bufferLen += nameLen + valueLen + 2;
}
//Successful processing
return NO_ERROR;
} | 357 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientSetMethod | httpClientSetMethod( HttpClientContext * context , const char_t * method) | ['context', 'method'] | error_t httpClientSetMethod(HttpClientContext *context, const char_t *method)
{
size_t m;
size_t n;
char_t *p;
//Check parameters
if(context == NULL || method == NULL)
return ERROR_INVALID_PARAMETER;
//Compute the length of the HTTP method
n = osStrlen(method);
//Make sure the length of the user name is acceptable
if(n == 0 || n > HTTP_CLIENT_MAX_METHOD_LEN)
return ERROR_INVALID_LENGTH;
//Make sure the buffer contains a valid HTTP request
if(context->bufferLen > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_INVALID_SYNTAX;
//Properly terminate the string with a NULL character
context->buffer[context->bufferLen] = '\0';
//The Request-Line begins with a method token
p = strchr(context->buffer, ' ');
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//Compute the length of the current method token
m = p - context->buffer;
//Make sure the buffer is large enough to hold the new HTTP request method
if((context->bufferLen + n - m) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Make room for the new method token
osMemmove(context->buffer + n, p, context->bufferLen + 1 - m);
//Copy the new method token
osStrncpy(context->buffer, method, n);
//Adjust the length of the request header
context->bufferLen = context->bufferLen + n - m;
//Save HTTP request method
osStrcpy(context->method, method);
//Successful processing
return NO_ERROR;
} | 177 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientSetQueryString | httpClientSetQueryString( HttpClientContext * context , const char_t * queryString) | ['context', 'queryString'] | error_t httpClientSetQueryString(HttpClientContext *context,
const char_t *queryString)
{
size_t m;
size_t n;
char_t *p;
char_t *q;
//Check parameters
if(context == NULL || queryString == NULL)
return ERROR_INVALID_PARAMETER;
//Check HTTP request state
if(context->requestState != HTTP_REQ_STATE_FORMAT_HEADER)
return ERROR_WRONG_STATE;
//Make sure the buffer contains a valid HTTP request
if(context->bufferLen > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_INVALID_SYNTAX;
//Properly terminate the string with a NULL character
context->buffer[context->bufferLen] = '\0';
//The Request-Line begins with a method token
p = strchr(context->buffer, ' ');
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//The method token is followed by the Request-URI
p = strpbrk(p + 1, " ?");
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//The question mark is used as a separator
if(*p == '?')
{
//Point to the end of the query string
q = strchr(p + 1, ' ');
//Any parsing error?
if(q == NULL)
return ERROR_INVALID_SYNTAX;
//Compute the length of the actual query string
m = q - p;
}
else
{
//The query string is not present
q = p;
m = 0;
}
//Compute the length of the new query string
n = osStrlen(queryString);
//Empty query string?
if(n == 0)
{
//Remove the query string
osMemmove(p, p + m, context->buffer + context->bufferLen + 1 - q);
}
else
{
//The question mark is not part of the query string
n++;
//Make sure the buffer is large enough to hold the new query string
if((context->bufferLen + n - m) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Make room for the new query string
osMemmove(p + n, q, context->buffer + context->bufferLen + 1 - q);
//The question mark is used as a separator
p[0] = '?';
//Copy the new query string
osStrncpy(p + 1, queryString, n - 1);
}
//Adjust the length of the request header
context->bufferLen = context->bufferLen + n - m;
//Successful processing
return NO_ERROR;
} | 274 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientSetUri | httpClientSetUri( HttpClientContext * context , const char_t * uri) | ['context', 'uri'] | error_t httpClientSetUri(HttpClientContext *context, const char_t *uri)
{
size_t m;
size_t n;
char_t *p;
char_t *q;
//Check parameters
if(context == NULL || uri == NULL)
return ERROR_INVALID_PARAMETER;
//The resource name must not be empty
if(uri[0] == '\0')
return ERROR_INVALID_PARAMETER;
//Check HTTP request state
if(context->requestState != HTTP_REQ_STATE_FORMAT_HEADER)
return ERROR_WRONG_STATE;
//Make sure the buffer contains a valid HTTP request
if(context->bufferLen > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_INVALID_SYNTAX;
//Properly terminate the string with a NULL character
context->buffer[context->bufferLen] = '\0';
//The Request-Line begins with a method token
p = strchr(context->buffer, ' ');
//Any parsing error?
if(p == NULL)
return ERROR_INVALID_SYNTAX;
//The method token is followed by the Request-URI
p++;
//Point to the end of the Request-URI
q = strpbrk(p, " ?");
//Any parsing error?
if(q == NULL)
return ERROR_INVALID_SYNTAX;
//Compute the length of the current URI
m = q - p;
//Compute the length of the new URI
n = osStrlen(uri);
//Make sure the buffer is large enough to hold the new resource name
if((context->bufferLen + n - m) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Make room for the new resource name
osMemmove(p + n, q, context->buffer + context->bufferLen + 1 - q);
//Copy the new resource name
osStrncpy(p, uri, n);
//Adjust the length of the request header
context->bufferLen = context->bufferLen + n - m;
//Successful processing
return NO_ERROR;
} | 201 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientFormatAuthorizationField | httpClientFormatAuthorizationField( HttpClientContext * context) | ['context'] | error_t httpClientFormatAuthorizationField(HttpClientContext *context)
{
size_t n;
char_t *p;
HttpClientAuthParams *authParams;
//Make sure the buffer contains a valid HTTP request
if(context->bufferLen < 2 || context->bufferLen > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_INVALID_SYNTAX;
//Point to the HTTP authentication parameters
authParams = &context->authParams;
#if (HTTP_CLIENT_BASIC_AUTH_SUPPORT == ENABLED)
//Basic authentication scheme?
if(authParams->mode == HTTP_AUTH_MODE_BASIC)
{
size_t k;
size_t m;
//Calculate the length of the username and password
n = osStrlen(authParams->username) + osStrlen(authParams->password);
//Make sure the buffer is large enough
if((context->bufferLen + n + 22) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Point to the buffer where to format the Authorization header field
p = context->buffer + context->bufferLen - 2;
//Format Authorization header field
n = osSprintf(p, "Authorization: Basic ");
//The client sends the username and password, separated by a single
//colon character, within a Base64-encoded string in the credentials
m = osSprintf(p + n, "%s:%s", authParams->username, authParams->password);
//The first pass calculates the length of the Base64-encoded string
base64Encode(p + n, m, NULL, &k);
//Make sure the buffer is large enough
if((context->bufferLen + n + k) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//The second pass encodes the string using Base64
base64Encode(p + n, m, p + n, &k);
//Update the total length of the header field
n += k;
//Make sure the buffer is large enough
if((context->bufferLen + n + 2) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Terminate the header field with a CRLF sequence
osSprintf(p + n, "\r\n\r\n");
//Adjust the length of the request header
context->bufferLen = context->bufferLen + n + 2;
}
else
#endif
#if (HTTP_CLIENT_DIGEST_AUTH_SUPPORT == ENABLED)
//Digest authentication scheme?
if(authParams->mode == HTTP_AUTH_MODE_DIGEST)
{
error_t error;
const char_t *q;
const char_t *uri;
size_t uriLen;
char_t response[HTTP_CLIENT_MAX_RESPONSE_LEN + 1];
//Properly terminate the string with a NULL character
context->buffer[context->bufferLen] = '\0';
//The Request-Line begins with a method token
q = strchr(context->buffer, ' ');
//Any parsing error?
if(q == NULL)
return ERROR_INVALID_SYNTAX;
//The method token is followed by the Request-URI
uri = q + 1;
//Point to the end of the Request-URI
q = strchr(uri, ' ');
//Any parsing error?
if(q == NULL)
return ERROR_INVALID_SYNTAX;
//Compute the length of the current URI
uriLen = q - uri;
//Check quality of protection
if(authParams->qop == HTTP_AUTH_QOP_AUTH ||
authParams->qop == HTTP_AUTH_QOP_AUTH_INT)
{
//Make sure that a valid callback function has been registered
if(context->randCallback == NULL)
return ERROR_PRNG_NOT_READY;
//A cryptographically strong random number generator must be used to
//generate the cnonce
error = context->randCallback(authParams->cnonce, HTTP_CLIENT_CNONCE_SIZE);
//Any error to report?
if(error)
return error;
//Convert the byte array to hex string
httpEncodeHexString(authParams->cnonce, HTTP_CLIENT_CNONCE_SIZE,
authParams->cnonce);
//Count of the number of requests (including the current request)
//that the client has sent with the nonce value in this request
authParams->nc++;
}
//Perform digest operation
error = httpClientComputeDigest(authParams, context->method,
osStrlen(context->method), uri, uriLen, response);
//Any error to report?
if(error)
return error;
//Determine the length of the header field
n = osStrlen(authParams->username) + osStrlen(authParams->realm) +
uriLen + osStrlen(authParams->nonce) + osStrlen(authParams->cnonce) +
osStrlen(response) + osStrlen(authParams->opaque);
//Make sure the buffer is large enough
if((context->bufferLen + n + 121) > HTTP_CLIENT_BUFFER_SIZE)
return ERROR_BUFFER_OVERFLOW;
//Point to the buffer where to format the Authorization header field
p = context->buffer + context->bufferLen - 2;
//Format Authorization header field
n = osSprintf(p, "Authorization: Digest ");
//Format username and realm parameter
n += osSprintf(p + n, "username=\"%s\", ", authParams->username);
n += osSprintf(p + n, "realm=\"%s\", ", authParams->realm);
//Format uri parameter
n += osSprintf(p + n, "uri=\"");
osStrncpy(p + n, uri, uriLen);
n += uriLen;
n += osSprintf(p + n, "\", ");
//Format nonce parameter
n += osSprintf(p + n, "nonce=\"%s\", ", authParams->nonce);
//Check quality of protection
if(authParams->qop == HTTP_AUTH_QOP_AUTH)
{
//Format qop, nc, cnonce parameters
n += osSprintf(p + n, "qop=auth, ");
n += osSprintf(p + n, "nc=%08x, ", authParams->nc);
n += osSprintf(p + n, "cnonce=\"%s\", ", authParams->cnonce);
}
//Format response parameter
n += osSprintf(p + n, "response=\"%s\"", response);
//The opaque parameter should be returned by the client unchanged in
//the Authorization header field of subsequent requests
if(authParams->opaque[0] != '\0')
{
//Format opaque parameter
n += osSprintf(p + n, ", opaque=\"%s\"", authParams->opaque);
}
//Terminate the header field with a CRLF sequence
osSprintf(p + n, "\r\n\r\n");
//Adjust the length of the request header
context->bufferLen = context->bufferLen + n + 2;
}
else
#endif
//Unknown authentication scheme?
{
//Just for sanity
}
//Successful processing
return NO_ERROR;
} | 696 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientParseQopParam | httpClientParseQopParam( const HttpParam * param , HttpWwwAuthenticateHeader * authHeader) | ['param', 'authHeader'] | void httpClientParseQopParam(const HttpParam *param,
HttpWwwAuthenticateHeader *authHeader)
{
#if (HTTP_CLIENT_DIGEST_AUTH_SUPPORT == ENABLED)
size_t i;
size_t n;
//This parameter is a quoted string of one or more tokens indicating
//the "quality of protection" values supported by the server
authHeader->qop = HTTP_AUTH_QOP_NONE;
//Parse the comma-separated list
for(i = 0; i < param->valueLen; i += (n + 1))
{
//Calculate the length of the current token
for(n = 0; (i + n) < param->valueLen; n++)
{
//Separator character found?
if(strchr(", \t", param->value[i + n]))
break;
}
//Check current token
if(n == 4 && !osStrncasecmp(param->value + i, "auth", 4))
{
//The value "auth" indicates authentication
authHeader->qop = HTTP_AUTH_QOP_AUTH;
}
}
//Quality of protection not supported?
if(authHeader->qop == HTTP_AUTH_QOP_NONE)
{
//The challenge should be ignored
authHeader->mode = HTTP_AUTH_MODE_NONE;
}
#endif
} | 130 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpClientParseHeaderField | httpClientParseHeaderField( HttpClientContext * context , char_t * line , size_t length) | ['context', 'line', 'length'] | error_t httpClientParseHeaderField(HttpClientContext *context, char_t *line,
size_t length)
{
error_t error;
char_t *name;
size_t nameLen;
char_t *value;
size_t valueLen;
char_t *separator;
//Properly terminate the string with a NULL character
line[length] = '\0';
//Debug message
TRACE_DEBUG("%s\r\n", line);
//The string must contains visible characters only
error = httpCheckCharset(line, length, HTTP_CHARSET_TEXT);
//Any error to report?
if(error)
return error;
//Header field values can be folded onto multiple lines if the continuation
//line begins with a space or horizontal tab
if(line[0] == ' ' || line[0] == '\t')
{
//A continuation line cannot immediately follows the Status-Line
if(context->bufferPos == 0)
return ERROR_INVALID_SYNTAX;
//Remove optional leading and trailing whitespace
value = strTrimWhitespace(line);
//Retrieve the length of the resulting string
valueLen = osStrlen(value);
//Sanity check
if(valueLen > 0)
{
//The folding LWS is replaced with a single SP before interpretation
//of the TEXT value (refer to RFC 2616, section 2.2)
context->buffer[context->bufferPos - 1] = ' ';
//Save field value
osMemmove(context->buffer + context->bufferPos, value, valueLen + 1);
//Update the size of the hash table
context->bufferLen = context->bufferPos + valueLen + 1;
}
}
else
{
//Each header field consists of a case-insensitive field name followed
//by a colon, optional leading whitespace, the field value, and optional
//trailing whitespace (refer to RFC 7230, section 3.2)
separator = strchr(line, ':');
//Any parsing error?
if(separator == NULL)
return ERROR_INVALID_SYNTAX;
//Split the line
*separator = '\0';
//Remove optional leading and trailing whitespace
name = strTrimWhitespace(line);
value = strTrimWhitespace(separator + 1);
//Retrieve the length of the resulting strings
nameLen = osStrlen(name);
valueLen = osStrlen(value);
//The field name cannot be empty
if(nameLen == 0)
return ERROR_INVALID_SYNTAX;
//Check header field name
if(!osStrcasecmp(name, "Connection"))
{
//Parse Connection header field
httpClientParseConnectionField(context, value);
}
else if(!osStrcasecmp(name, "Transfer-Encoding"))
{
//Parse Transfer-Encoding header field
httpClientParseTransferEncodingField(context, value);
}
else if(!osStrcasecmp(name, "Content-Length"))
{
//Parse Content-Length header field
httpClientParseContentLengthField(context, value);
}
#if (HTTP_CLIENT_AUTH_SUPPORT == ENABLED)
//WWW-Authenticate header field found?
else if(!osStrcasecmp(name, "WWW-Authenticate"))
{
//Parse WWW-Authenticate header field
httpClientParseWwwAuthenticateField(context, value);
}
#endif
else
{
//Discard unknown header fields
}
//Save each header field into a hash table by field name
osMemmove(context->buffer + context->bufferPos, name, nameLen + 1);
//Save field value
osMemmove(context->buffer + context->bufferPos + nameLen + 1, value,
valueLen + 1);
//Update the size of the hash table
context->bufferLen = context->bufferPos + nameLen + valueLen + 2;
}
//Decode the next header field
context->bufferPos = context->bufferLen;
//Successful processing
return NO_ERROR;
} | 371 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpCheckCharset | httpCheckCharset( const char_t * s , size_t length , uint_t charset) | ['s', 'length', 'charset'] | error_t httpCheckCharset(const char_t *s, size_t length, uint_t charset)
{
error_t error;
size_t i;
uint8_t c;
uint_t m;
//Initialize status code
error = NO_ERROR;
//Parse string
for(i = 0; i < length; i++)
{
//Get current character
c = (uint8_t) s[i];
//Any 8-bit sequence of data
m = HTTP_CHARSET_OCTET;
//Check if character is a control character
if(iscntrl(c))
m |= HTTP_CHARSET_CTL;
//Check if character is printable
if(isprint(c) && c <= 126)
m |= HTTP_CHARSET_TEXT | HTTP_CHARSET_VCHAR;
//Check if character is blank
if(c == ' ' || c == '\t')
m |= HTTP_CHARSET_TEXT | HTTP_CHARSET_LWS;
//Check if character is alphabetic
if(isalpha(c))
m |= HTTP_CHARSET_TCHAR | HTTP_CHARSET_ALPHA;
//Check if character is decimal digit
if(osIsdigit(c))
m |= HTTP_CHARSET_TCHAR | HTTP_CHARSET_DIGIT;
//Check if character is hexadecimal digit
if(isxdigit(c))
m |= HTTP_CHARSET_HEX;
//Check if character is in the extended character set
if(c >= 128)
m |= HTTP_CHARSET_TEXT | HTTP_CHARSET_OBS_TEXT;
//Check if character is a token character
if(strchr("!#$%&'*+-.^_`|~", c))
m |= HTTP_CHARSET_TCHAR;
//Invalid character?
if((m & charset) == 0)
error = ERROR_INVALID_SYNTAX;
}
//Return status code
return error;
} | 183 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpParseParam | httpParseParam( const char_t ** pos , HttpParam * param) | ['pos', 'param'] | error_t httpParseParam(const char_t **pos, HttpParam *param)
{
error_t error;
size_t i;
uint8_t c;
bool_t escapeFlag;
bool_t separatorFound;
const char_t *p;
//Check parameters
if(pos == NULL || param == NULL)
return ERROR_INVALID_PARAMETER;
//Initialize structure
param->name = NULL;
param->nameLen = 0;
param->value = NULL;
param->valueLen = 0;
//Initialize variables
escapeFlag = FALSE;
separatorFound = FALSE;
//Initialize status code
error = ERROR_IN_PROGRESS;
//Point to the first character
i = 0;
p = *pos;
//Loop through the list of parameters
while(error == ERROR_IN_PROGRESS)
{
//Get current character
c = (uint8_t) p[i];
//Check current state
if(param->name == NULL)
{
//Check current character
if(c == '\0')
{
//The list of parameters is empty
error = ERROR_NOT_FOUND;
}
else if(c == ' ' || c == '\t' || c == ',' || c == ';')
{
//Discard whitespace and separator characters
}
else if(isalnum(c) || strchr("!#$%&'*+-.^_`|~", c) || c >= 128)
{
//Point to the first character of the parameter name
param->name = p + i;
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
else if(param->nameLen == 0)
{
//Check current character
if(c == '\0' || c == ',' || c == ';')
{
//Save the length of the parameter name
param->nameLen = p + i - param->name;
//Successful processing
error = NO_ERROR;
}
else if(c == ' ' || c == '\t')
{
//Save the length of the parameter name
param->nameLen = p + i - param->name;
}
else if(c == '=')
{
//The key/value separator has been found
separatorFound = TRUE;
//Save the length of the parameter name
param->nameLen = p + i - param->name;
}
else if(isalnum(c) || strchr("!#$%&'*+-.^_`|~", c) || c >= 128)
{
//Advance data pointer
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
else if(!separatorFound)
{
//Check current character
if(c == '\0' || c == ',' || c == ';')
{
//Successful processing
error = NO_ERROR;
}
else if(c == ' ' || c == '\t')
{
//Discard whitespace characters
}
else if(c == '=')
{
//The key/value separator has been found
separatorFound = TRUE;
}
else if(c == '\"')
{
//Point to the first character that follows the parameter name
i = param->name + param->nameLen - p;
//Successful processing
error = NO_ERROR;
}
else if(isalnum(c) || strchr("!#$%&'*+-.^_`|~", c) || c >= 128)
{
//Point to the first character that follows the parameter name
i = param->name + param->nameLen - p;
//Successful processing
error = NO_ERROR;
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
else if(param->value == NULL)
{
//Check current character
if(c == '\0' || c == ',' || c == ';')
{
//Successful processing
error = NO_ERROR;
}
else if(c == ' ' || c == '\t')
{
//Discard whitespace characters
}
else if(c == '\"')
{
//A string of text is parsed as a single word if it is quoted
//using double-quote marks (refer to RFC 7230, section 3.2.6)
param->value = p + i;
}
else if(isalnum(c) || strchr("!#$%&'*+-.^_`|~", c) || c >= 128)
{
//Point to the first character of the parameter value
param->value = p + i;
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
else
{
//Quoted string?
if(param->value[0] == '\"')
{
//Check current character
if(c == '\0')
{
//The second double quote is missing
error = ERROR_INVALID_SYNTAX;
}
else if(escapeFlag)
{
//Recipients that process the value of a quoted-string must
//handle a quoted-pair as if it were replaced by the octet
//following the backslash
escapeFlag = FALSE;
}
else if(c == '\\')
{
//The backslash octet can be used as a single-octet quoting
//mechanism within quoted-string and comment constructs
escapeFlag = TRUE;
}
else if(c == '\"')
{
//Advance pointer over the double quote
i++;
//Save the length of the parameter value
param->valueLen = p + i - param->value;
//Successful processing
error = NO_ERROR;
}
else if(isprint(c) || c == '\t' || c >= 128)
{
//Advance data pointer
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
else
{
//Check current character
if(c == '\0' || c == ' ' || c == '\t' || c == ',' || c == ';')
{
//Save the length of the parameter value
param->valueLen = p + i - param->value;
//Successful processing
error = NO_ERROR;
}
else if(isalnum(c) || strchr("!#$%&'*+-.^_`|~", c) || c >= 128)
{
//Advance data pointer
}
else
{
//Invalid character
error = ERROR_INVALID_SYNTAX;
}
}
}
//Point to the next character of the string
if(error == ERROR_IN_PROGRESS)
i++;
}
//Check whether the parameter value is a quoted string
if(param->valueLen >= 2 && param->value[0] == '\"')
{
//Discard the surrounding quotes
param->value++;
param->valueLen -= 2;
}
//Actual position if the list of parameters
*pos = p + i;
//Return status code
return error;
} | 754 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpParseAuthorizationField | httpParseAuthorizationField( HttpConnection * connection , char_t * value) | ['connection', 'value'] | void httpParseAuthorizationField(HttpConnection *connection, char_t *value)
{
char_t *p;
char_t *token;
//Retrieve the authentication scheme
token = osStrtok_r(value, " \t", &p);
//Any parsing error?
if(token == NULL)
{
//Exit immediately
return;
}
#if (HTTP_SERVER_BASIC_AUTH_SUPPORT == ENABLED)
//Basic access authentication?
else if(!osStrcasecmp(token, "Basic"))
{
error_t error;
size_t n;
char_t *separator;
//Use the relevant authentication scheme
connection->request.auth.mode = HTTP_AUTH_MODE_BASIC;
//Retrieve the credentials
token = osStrtok_r(NULL, " \t", &p);
//Any parsing error?
if(token != NULL)
{
//Decrypt the Base64-encoded string
error = base64Decode(token, osStrlen(token), token, &n);
//Successful decoding?
if(!error)
{
//Properly terminate the string
token[n] = '\0';
//Check whether a separator is present
separator = strchr(token, ':');
//Separator found?
if(separator != NULL)
{
//Split the line
*separator = '\0';
//Save user name
strSafeCopy(connection->request.auth.user,
token, HTTP_SERVER_USERNAME_MAX_LEN);
//Point to the password
token = separator + 1;
//Save password
connection->request.auth.password = token;
}
}
}
//Debug message
TRACE_DEBUG("Authorization header:\r\n");
TRACE_DEBUG(" username: %s\r\n", connection->request.auth.user);
TRACE_DEBUG(" password: %s\r\n", connection->request.auth.password);
}
#endif
#if (HTTP_SERVER_DIGEST_AUTH_SUPPORT == ENABLED)
//Digest access authentication?
else if(!osStrcasecmp(token, "Digest"))
{
size_t n;
char_t *separator;
char_t *name;
//Use the relevant authentication scheme
connection->request.auth.mode = HTTP_AUTH_MODE_DIGEST;
//Get the first parameter
token = osStrtok_r(NULL, ",", &p);
//Parse the Authorization header field
while(token != NULL)
{
//Check whether a separator is present
separator = strchr(token, '=');
//Separator found?
if(separator != NULL)
{
//Split the string
*separator = '\0';
//Get field name and value
name = strTrimWhitespace(token);
value = strTrimWhitespace(separator + 1);
//Retrieve the length of the value field
n = osStrlen(value);
//Discard the surrounding quotes
if(n > 0 && value[n - 1] == '\"')
value[n - 1] = '\0';
if(value[0] == '\"')
value++;
//Check parameter name
if(!osStrcasecmp(name, "username"))
{
//Save user name
strSafeCopy(connection->request.auth.user,
value, HTTP_SERVER_USERNAME_MAX_LEN);
}
else if(!osStrcasecmp(name, "realm"))
{
//Save realm
connection->request.auth.realm = value;
}
else if(!osStrcasecmp(name, "nonce"))
{
//Save nonce parameter
connection->request.auth.nonce = value;
}
else if(!osStrcasecmp(name, "uri"))
{
//Save uri parameter
connection->request.auth.uri = value;
}
else if(!osStrcasecmp(name, "qop"))
{
//Save qop parameter
connection->request.auth.qop = value;
}
else if(!osStrcasecmp(name, "nc"))
{
//Save nc parameter
connection->request.auth.nc = value;
}
else if(!osStrcasecmp(name, "cnonce"))
{
//Save cnonce parameter
connection->request.auth.cnonce = value;
}
else if(!osStrcasecmp(name, "response"))
{
//Save response parameter
connection->request.auth.response = value;
}
else if(!osStrcasecmp(name, "opaque"))
{
//Save opaque parameter
connection->request.auth.opaque = value;
}
//Get next parameter
token = osStrtok_r(NULL, ",", &p);
}
}
//Debug message
TRACE_DEBUG("Authorization header:\r\n");
TRACE_DEBUG(" username: %s\r\n", connection->request.auth.user);
TRACE_DEBUG(" realm: %s\r\n", connection->request.auth.realm);
TRACE_DEBUG(" nonce: %s\r\n", connection->request.auth.nonce);
TRACE_DEBUG(" uri: %s\r\n", connection->request.auth.uri);
TRACE_DEBUG(" qop: %s\r\n", connection->request.auth.qop);
TRACE_DEBUG(" nc: %s\r\n", connection->request.auth.nc);
TRACE_DEBUG(" cnonce: %s\r\n", connection->request.auth.cnonce);
TRACE_DEBUG(" response: %s\r\n", connection->request.auth.response);
TRACE_DEBUG(" opaque: %s\r\n", connection->request.auth.opaque);
}
#endif
else
{
//The specified authentication scheme is not supported
return;
}
#if (HTTP_SERVER_BASIC_AUTH_SUPPORT == ENABLED || HTTP_SERVER_DIGEST_AUTH_SUPPORT == ENABLED)
//The Authorization header has been found
connection->request.auth.found = TRUE;
//Invoke user-defined callback, if any
if(connection->settings->authCallback != NULL)
{
//Check whether the access to the specified URI is authorized
connection->status = connection->settings->authCallback(connection,
connection->request.auth.user, connection->request.uri);
}
else
{
//Access to the specified URI is allowed
connection->status = HTTP_ACCESS_ALLOWED;
}
#endif
} | 753 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpParseRequestLine | httpParseRequestLine( HttpConnection * connection , char_t * requestLine) | ['connection', 'requestLine'] | error_t httpParseRequestLine(HttpConnection *connection, char_t *requestLine)
{
error_t error;
char_t *token;
char_t *p;
char_t *s;
//The Request-Line begins with a method token
token = osStrtok_r(requestLine, " \r\n", &p);
//Unable to retrieve the method?
if(token == NULL)
return ERROR_INVALID_REQUEST;
//The Method token indicates the method to be performed on the
//resource identified by the Request-URI
error = strSafeCopy(connection->request.method, token, HTTP_SERVER_METHOD_MAX_LEN);
//Any error to report?
if(error)
return ERROR_INVALID_REQUEST;
//The Request-URI is following the method token
token = osStrtok_r(NULL, " \r\n", &p);
//Unable to retrieve the Request-URI?
if(token == NULL)
return ERROR_INVALID_REQUEST;
//Check whether a query string is present
s = strchr(token, '?');
//Query string found?
if(s != NULL)
{
//Split the string
*s = '\0';
//Save the Request-URI
error = httpDecodePercentEncodedString(token,
connection->request.uri, HTTP_SERVER_URI_MAX_LEN);
//Any error to report?
if(error)
return ERROR_INVALID_REQUEST;
//Check the length of the query string
if(osStrlen(s + 1) > HTTP_SERVER_QUERY_STRING_MAX_LEN)
return ERROR_INVALID_REQUEST;
//Save the query string
osStrcpy(connection->request.queryString, s + 1);
}
else
{
//Save the Request-URI
error = httpDecodePercentEncodedString(token,
connection->request.uri, HTTP_SERVER_URI_MAX_LEN);
//Any error to report?
if(error)
return ERROR_INVALID_REQUEST;
//No query string
connection->request.queryString[0] = '\0';
}
//Redirect to the default home page if necessary
if(!osStrcasecmp(connection->request.uri, "/"))
osStrcpy(connection->request.uri, connection->settings->defaultDocument);
//Clean the resulting path
pathCanonicalize(connection->request.uri);
//The protocol version is following the Request-URI
token = osStrtok_r(NULL, " \r\n", &p);
//HTTP version 0.9?
if(token == NULL)
{
//Save version number
connection->request.version = HTTP_VERSION_0_9;
//Persistent connections are not supported
connection->request.keepAlive = FALSE;
}
//HTTP version 1.0?
else if(!osStrcasecmp(token, "HTTP/1.0"))
{
//Save version number
connection->request.version = HTTP_VERSION_1_0;
//By default connections are not persistent
connection->request.keepAlive = FALSE;
}
//HTTP version 1.1?
else if(!osStrcasecmp(token, "HTTP/1.1"))
{
//Save version number
connection->request.version = HTTP_VERSION_1_1;
//HTTP 1.1 makes persistent connections the default
connection->request.keepAlive = TRUE;
}
//HTTP version not supported?
else
{
//Report an error
return ERROR_INVALID_REQUEST;
}
//Successful processing
return NO_ERROR;
} | 339 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | httpReadRequestHeader | httpReadRequestHeader( HttpConnection * connection) | ['connection'] | error_t httpReadRequestHeader(HttpConnection *connection)
{
error_t error;
size_t length;
//Set the maximum time the server will wait for an HTTP
//request before closing the connection
error = socketSetTimeout(connection->socket, HTTP_SERVER_IDLE_TIMEOUT);
//Any error to report?
if(error)
return error;
//Read the first line of the request
error = httpReceive(connection, connection->buffer,
HTTP_SERVER_BUFFER_SIZE - 1, &length, SOCKET_FLAG_BREAK_CRLF);
//Unable to read any data?
if(error)
return error;
//Revert to default timeout
error = socketSetTimeout(connection->socket, HTTP_SERVER_TIMEOUT);
//Any error to report?
if(error)
return error;
//Properly terminate the string with a NULL character
connection->buffer[length] = '\0';
//Debug message
TRACE_INFO("%s", connection->buffer);
//Parse the Request-Line
error = httpParseRequestLine(connection, connection->buffer);
//Any error to report?
if(error)
return error;
//Default value for properties
connection->request.chunkedEncoding = FALSE;
connection->request.contentLength = 0;
#if (HTTP_SERVER_WEB_SOCKET_SUPPORT == ENABLED)
connection->request.upgradeWebSocket = FALSE;
connection->request.connectionUpgrade = FALSE;
osStrcpy(connection->request.clientKey, "");
#endif
//HTTP 0.9 does not support Full-Request
if(connection->request.version >= HTTP_VERSION_1_0)
{
//Local variables
char_t firstChar;
char_t *separator;
char_t *name;
char_t *value;
//This variable is used to decode header fields that span multiple lines
firstChar = '\0';
//Parse the header fields of the HTTP request
while(1)
{
//Decode multiple-line header field
error = httpReadHeaderField(connection, connection->buffer,
HTTP_SERVER_BUFFER_SIZE, &firstChar);
//Any error to report?
if(error)
return error;
//Debug message
TRACE_DEBUG("%s", connection->buffer);
//An empty line indicates the end of the header fields
if(!osStrcmp(connection->buffer, "\r\n"))
break;
//Check whether a separator is present
separator = strchr(connection->buffer, ':');
//Separator found?
if(separator != NULL)
{
//Split the line
*separator = '\0';
//Trim whitespace characters
name = strTrimWhitespace(connection->buffer);
value = strTrimWhitespace(separator + 1);
//Parse HTTP header field
httpParseHeaderField(connection, name, value);
}
}
}
//Prepare to read the HTTP request body
if(connection->request.chunkedEncoding)
{
connection->request.byteCount = 0;
connection->request.firstChunk = TRUE;
connection->request.lastChunk = FALSE;
}
else
{
connection->request.byteCount = connection->request.contentLength;
}
//The request header has been successfully parsed
return NO_ERROR;
} | 342 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ssiProcessEchoCommand | ssiProcessEchoCommand( HttpConnection * connection , const char_t * tag , size_t length) | ['connection', 'tag', 'length'] | error_t ssiProcessEchoCommand(HttpConnection *connection, const char_t *tag, size_t length)
{
error_t error;
char_t *separator;
char_t *attribute;
char_t *value;
//Discard invalid SSI directives
if(length < 4 || length >= HTTP_SERVER_BUFFER_SIZE)
return ERROR_INVALID_TAG;
//Skip the SSI echo command (4 bytes)
osMemcpy(connection->buffer, tag + 4, length - 4);
//Ensure the resulting string is NULL-terminated
connection->buffer[length - 4] = '\0';
//Check whether a separator is present
separator = strchr(connection->buffer, '=');
//Separator not found?
if(!separator)
return ERROR_INVALID_TAG;
//Split the tag
*separator = '\0';
//Get attribute name and value
attribute = strTrimWhitespace(connection->buffer);
value = strTrimWhitespace(separator + 1);
//Remove leading simple or double quote
if(value[0] == '\'' || value[0] == '\"')
value++;
//Get the length of the attribute value
length = osStrlen(value);
//Remove trailing simple or double quote
if(length > 0)
{
if(value[length - 1] == '\'' || value[length - 1] == '\"')
value[length - 1] = '\0';
}
//Enforce attribute name
if(osStrcasecmp(attribute, "var"))
return ERROR_INVALID_TAG;
//Remote address?
if(!osStrcasecmp(value, "REMOTE_ADDR"))
{
//The IP address of the host making this request
ipAddrToString(&connection->socket->remoteIpAddr, connection->buffer);
}
//Remote port?
else if(!osStrcasecmp(value, "REMOTE_PORT"))
{
//The port number used by the remote host when making this request
osSprintf(connection->buffer, "%" PRIu16, connection->socket->remotePort);
}
//Server address?
else if(!osStrcasecmp(value, "SERVER_ADDR"))
{
//The IP address of the server for this URL
ipAddrToString(&connection->socket->localIpAddr, connection->buffer);
}
//Server port?
else if(!osStrcasecmp(value, "SERVER_PORT"))
{
//The port number on this server to which this request was directed
osSprintf(connection->buffer, "%" PRIu16, connection->socket->localPort);
}
//Request method?
else if(!osStrcasecmp(value, "REQUEST_METHOD"))
{
//The method used for this HTTP request
osStrcpy(connection->buffer, connection->request.method);
}
//Document root?
else if(!osStrcasecmp(value, "DOCUMENT_ROOT"))
{
//The root directory
osStrcpy(connection->buffer, connection->settings->rootDirectory);
}
//Document URI?
else if(!osStrcasecmp(value, "DOCUMENT_URI"))
{
//The URI for this request relative to the root directory
osStrcpy(connection->buffer, connection->request.uri);
}
//Document name?
else if(!osStrcasecmp(value, "DOCUMENT_NAME"))
{
//The full physical path and filename of the document requested
httpGetAbsolutePath(connection, connection->request.uri,
connection->buffer, HTTP_SERVER_BUFFER_SIZE);
}
//Query string?
else if(!osStrcasecmp(value, "QUERY_STRING"))
{
//The information following the "?" in the URL for this request
osStrcpy(connection->buffer, connection->request.queryString);
}
//User name?
else if(!osStrcasecmp(value, "AUTH_USER"))
{
#if (HTTP_SERVER_BASIC_AUTH_SUPPORT == ENABLED || HTTP_SERVER_DIGEST_AUTH_SUPPORT == ENABLED)
//The username provided by the user to the server
osStrcpy(connection->buffer, connection->request.auth.user);
#else
//Basic access authentication is not supported
connection->buffer[0] = '\0';
#endif
}
//GMT time?
else if(!osStrcasecmp(value, "DATE_GMT"))
{
//The current date and time in Greenwich Mean Time
connection->buffer[0] = '\0';
}
//Local time?
else if(!osStrcasecmp(value, "DATE_LOCAL"))
{
//The current date and time in the local timezone
connection->buffer[0] = '\0';
}
//Unknown variable?
else
{
//Report an error
return ERROR_INVALID_TAG;
}
//Get the length of the resulting string
length = osStrlen(connection->buffer);
//Send the contents of the specified environment variable
error = httpWriteStream(connection, connection->buffer, length);
//Failed to send data?
if(error)
return error;
//Successful processing
return NO_ERROR;
} | 551 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ssiProcessExecCommand | ssiProcessExecCommand( HttpConnection * connection , const char_t * tag , size_t length) | ['connection', 'tag', 'length'] | error_t ssiProcessExecCommand(HttpConnection *connection, const char_t *tag, size_t length)
{
char_t *separator;
char_t *attribute;
char_t *value;
//First, check whether CGI is supported by the server
if(connection->settings->cgiCallback == NULL)
return ERROR_INVALID_TAG;
//Discard invalid SSI directives
if(length < 4 || length >= HTTP_SERVER_BUFFER_SIZE)
return ERROR_INVALID_TAG;
//Skip the SSI exec command (4 bytes)
osMemcpy(connection->buffer, tag + 4, length - 4);
//Ensure the resulting string is NULL-terminated
connection->buffer[length - 4] = '\0';
//Check whether a separator is present
separator = strchr(connection->buffer, '=');
//Separator not found?
if(!separator)
return ERROR_INVALID_TAG;
//Split the tag
*separator = '\0';
//Get attribute name and value
attribute = strTrimWhitespace(connection->buffer);
value = strTrimWhitespace(separator + 1);
//Remove leading simple or double quote
if(value[0] == '\'' || value[0] == '\"')
value++;
//Get the length of the attribute value
length = osStrlen(value);
//Remove trailing simple or double quote
if(length > 0)
{
if(value[length - 1] == '\'' || value[length - 1] == '\"')
value[length - 1] = '\0';
}
//Enforce attribute name
if(osStrcasecmp(attribute, "cgi") && osStrcasecmp(attribute, "cmd") && osStrcasecmp(attribute, "cmd_argument"))
return ERROR_INVALID_TAG;
//Check the length of the CGI parameter
if(osStrlen(value) > HTTP_SERVER_CGI_PARAM_MAX_LEN)
return ERROR_INVALID_TAG;
//The scratch buffer may be altered by the user-defined callback.
//So the CGI parameter must be copied prior to function invocation
osStrcpy(connection->cgiParam, value);
//Invoke user-defined callback
return connection->settings->cgiCallback(connection, connection->cgiParam);
} | 246 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ssiProcessIncludeCommand | ssiProcessIncludeCommand( HttpConnection * connection , const char_t * tag , size_t length , const char_t * uri , uint_t level) | ['connection', 'tag', 'length', 'uri', 'level'] | error_t ssiProcessIncludeCommand(HttpConnection *connection,
const char_t *tag, size_t length, const char_t *uri, uint_t level)
{
error_t error;
char_t *separator;
char_t *attribute;
char_t *value;
char_t *path;
char_t *p;
//Discard invalid SSI directives
if(length < 7 || length >= HTTP_SERVER_BUFFER_SIZE)
return ERROR_INVALID_TAG;
//Skip the SSI include command (7 bytes)
osMemcpy(connection->buffer, tag + 7, length - 7);
//Ensure the resulting string is NULL-terminated
connection->buffer[length - 7] = '\0';
//Check whether a separator is present
separator = strchr(connection->buffer, '=');
//Separator not found?
if(!separator)
return ERROR_INVALID_TAG;
//Split the tag
*separator = '\0';
//Get attribute name and value
attribute = strTrimWhitespace(connection->buffer);
value = strTrimWhitespace(separator + 1);
//Remove leading simple or double quote
if(value[0] == '\'' || value[0] == '\"')
value++;
//Get the length of the attribute value
length = osStrlen(value);
//Remove trailing simple or double quote
if(length > 0)
{
if(value[length - 1] == '\'' || value[length - 1] == '\"')
value[length - 1] = '\0';
}
//Check the length of the filename
if(osStrlen(value) > HTTP_SERVER_URI_MAX_LEN)
return ERROR_INVALID_TAG;
//The file parameter defines the included file as relative to the document path
if(!osStrcasecmp(attribute, "file"))
{
//Allocate a buffer to hold the path to the file to be included
path = osAllocMem(osStrlen(uri) + osStrlen(value) + 1);
//Failed to allocate memory?
if(path == NULL)
return ERROR_OUT_OF_MEMORY;
//Copy the path identifying the script file being processed
osStrcpy(path, uri);
//Search for the last slash character
p = strrchr(path, '/');
//Remove the filename from the path if applicable
if(p)
osStrcpy(p + 1, value);
else
osStrcpy(path, value);
}
//The virtual parameter defines the included file as relative to the document root
else if(!osStrcasecmp(attribute, "virtual"))
{
//Copy the absolute path
path = strDuplicate(value);
//Failed to duplicate the string?
if(path == NULL)
return ERROR_OUT_OF_MEMORY;
}
//Unknown parameter...
else
{
//Report an error
return ERROR_INVALID_TAG;
}
//Use server-side scripting to dynamically generate HTML code?
if(httpCompExtension(value, ".stm") ||
httpCompExtension(value, ".shtm") ||
httpCompExtension(value, ".shtml"))
{
//SSI processing (Server Side Includes)
error = ssiExecuteScript(connection, path, level + 1);
}
else
{
#if (HTTP_SERVER_FS_SUPPORT == ENABLED)
FsFile *file;
//Retrieve the full pathname
httpGetAbsolutePath(connection, path,
connection->buffer, HTTP_SERVER_BUFFER_SIZE);
//Open the file for reading
file = fsOpenFile(connection->buffer, FS_FILE_MODE_READ);
//Successful operation?
if(file)
{
//Send the contents of the requested file
while(1)
{
//Read data from the specified file
error = fsReadFile(file, connection->buffer, HTTP_SERVER_BUFFER_SIZE, &length);
//End of input stream?
if(error)
break;
//Send data to the client
error = httpWriteStream(connection, connection->buffer, length);
//Any error to report?
if(error)
break;
}
//Close the file
fsCloseFile(file);
//Successful file transfer?
if(error == ERROR_END_OF_FILE)
error = NO_ERROR;
}
else
{
//The specified URI cannot be found
error = ERROR_NOT_FOUND;
}
#else
const uint8_t *data;
//Retrieve the full pathname
httpGetAbsolutePath(connection, path,
connection->buffer, HTTP_SERVER_BUFFER_SIZE);
//Get the resource data associated with the file
error = resGetData(connection->buffer, &data, &length);
//Send the contents of the requested file
if(!error)
error = httpWriteStream(connection, data, length);
#endif
}
//Cannot found the specified resource?
if(error == ERROR_NOT_FOUND)
error = ERROR_INVALID_TAG;
//Release previously allocated memory
osFreeMem(path);
//return status code
return error;
} | 524 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | icecastClientConnect | icecastClientConnect( IcecastClientContext * context) | ['context'] | error_t icecastClientConnect(IcecastClientContext *context)
{
error_t error;
size_t length;
uint16_t serverPort;
IpAddr serverIpAddr;
NetInterface *interface;
//Underlying network interface
interface = context->settings.interface;
//Force traffic to go through a proxy server?
if(osStrcmp(interface->proxyName, ""))
{
//Icecast request template
const char_t requestTemplate[] =
"GET http://%s:%" PRIu16 "%s HTTP/1.1\r\n"
"Host: %s:%" PRIu16 "\r\n"
"User-agent: UserAgent\r\n"
"Icy-MetaData: 1\r\n"
"Connection: close\r\n"
"\r\n";
//Format Icecast request
length = osSprintf(context->buffer, requestTemplate,
context->settings.serverName, context->settings.serverPort,
context->settings.resource, context->settings.serverName,
context->settings.serverPort);
//The specified proxy server can be either an IP or a host name
error = getHostByName(interface, interface->proxyName, &serverIpAddr, 0);
//Unable to resolve server name?
if(error)
return error;
//Proxy server port
serverPort = interface->proxyPort;
}
else
{
//Icecast request template
const char_t requestTemplate[] =
"GET %s HTTP/1.1\r\n"
"Host: %s\r\n"
"User-agent: UserAgent\r\n"
"Icy-MetaData: 1\r\n"
"Connection: close\r\n"
"\r\n";
//Format Icecast request
length = osSprintf(context->buffer, requestTemplate,
context->settings.resource, context->settings.serverName);
//The specified Icecast server can be either an IP or a host name
error = getHostByName(interface, context->settings.serverName, &serverIpAddr, 0);
//Unable to resolve server name?
if(error)
return error;
//Icecast server port
serverPort = context->settings.serverPort;
}
//Open a TCP socket
context->socket = socketOpen(SOCKET_TYPE_STREAM, SOCKET_IP_PROTO_TCP);
//Failed to open socket?
if(context->socket == NULL)
return ERROR_OUT_OF_RESOURCES;
//Start of exception handling block
do
{
//Associate the socket with the relevant interface
error = socketBindToInterface(context->socket, interface);
//Unable to bind the socket to the desired interface?
if(error)
break;
//Adjust receive timeout
error = socketSetTimeout(context->socket, ICECAST_CLIENT_TIMEOUT);
//Any error to report?
if(error)
break;
//Connect to the server
error = socketConnect(context->socket, &serverIpAddr, serverPort);
//Connection with server failed?
if(error)
break;
//Display Icecast request for debugging purpose
TRACE_DEBUG(context->buffer);
//Send request to the server
error = socketSend(context->socket, context->buffer,
length, NULL, SOCKET_FLAG_WAIT_ACK);
//Failed to send the request?
if(error)
break;
//Parse response header
while(1)
{
char_t *separator;
char_t *property;
char_t *value;
//Read a line from the response header
error = socketReceive(context->socket, context->buffer,
ICECAST_CLIENT_METADATA_MAX_SIZE, &length, SOCKET_FLAG_BREAK_CRLF);
//Failed to read data?
if(error)
break;
//Properly terminate the string with a NULL character
context->buffer[length] = '\0';
//The end of the header has been reached?
if(!osStrcmp(context->buffer, "\r\n"))
break;
//Check whether a separator is present
separator = strchr(context->buffer, ':');
//Separator found?
if(separator)
{
//Split the line
*separator = '\0';
//Get property name and value
property = strTrimWhitespace(context->buffer);
value = strTrimWhitespace(separator + 1);
//Debug message
TRACE_INFO("<%s>=<%s>\r\n", property, value);
//Icy-Metaint property found?
if(!osStrcasecmp(property, "Icy-Metaint"))
{
//Retrieve the block size used by the Icecast server
context->blockSize = atoi(value);
}
}
}
//End of exception handling block
} while(0);
//Check whether an error occurred
if(error)
{
//Clean up side effects
socketClose(context->socket);
}
//Return status code
return error;
} | 473 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ipv6ComputeSolicitedNodeAddr | ipv6ComputeSolicitedNodeAddr( const Ipv6Addr * ipAddr , Ipv6Addr * solicitedNodeAddr) | ['ipAddr', 'solicitedNodeAddr'] | error_t ipv6ComputeSolicitedNodeAddr(const Ipv6Addr *ipAddr,
Ipv6Addr *solicitedNodeAddr)
{
error_t error;
//Ensure the specified address is a valid unicast or anycast address
if(!ipv6IsMulticastAddr(ipAddr))
{
//Copy the 104-bit prefix
ipv6CopyAddr(solicitedNodeAddr, &IPV6_SOLICITED_NODE_ADDR_PREFIX);
//Take the low-order 24 bits of the address (unicast or anycast) and
//append those bits to the prefix
solicitedNodeAddr->b[13] = ipAddr->b[13];
solicitedNodeAddr->b[14] = ipAddr->b[14];
solicitedNodeAddr->b[15] = ipAddr->b[15];
//Sucessful processing
error = NO_ERROR;
}
else
{
//Report an error
error = ERROR_INVALID_ADDRESS;
}
//Return status code
return error;
} | 90 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ipv6AddRoute | ipv6AddRoute( const Ipv6Addr * prefix , uint_t prefixLen , NetInterface * interface , const Ipv6Addr * nextHop , uint_t metric) | ['prefix', 'prefixLen', 'interface', 'nextHop', 'metric'] | error_t ipv6AddRoute(const Ipv6Addr *prefix, uint_t prefixLen,
NetInterface *interface, const Ipv6Addr *nextHop, uint_t metric)
{
error_t error;
uint_t i;
Ipv6RoutingTableEntry *entry;
Ipv6RoutingTableEntry *firstFreeEntry;
//Check parameters
if(prefix == NULL || interface == NULL)
return ERROR_INVALID_PARAMETER;
//Keep track of the first free entry
firstFreeEntry = NULL;
//Get exclusive access
osAcquireMutex(&netMutex);
//Loop through routing table entries
for(i = 0; i < IPV6_ROUTING_TABLE_SIZE; i++)
{
//Point to the current entry
entry = &ipv6RoutingTable[i];
//Valid entry?
if(entry->valid)
{
//Check prefix length
if(entry->prefixLen == prefixLen)
{
//Check whether the current entry matches the specified destination
if(ipv6CompPrefix(&entry->prefix, prefix, prefixLen))
break;
}
}
else
{
//Keep track of the first free entry
if(firstFreeEntry == NULL)
firstFreeEntry = entry;
}
}
//If the routing table does not contain the specified destination,
//then a new entry should be created
if(i >= IPV6_ROUTING_TABLE_SIZE)
entry = firstFreeEntry;
//Check whether the routing table runs out of space
if(entry != NULL)
{
//Network destination
entry->prefix = *prefix;
entry->prefixLen = prefixLen;
//Interface where to forward the packet
entry->interface = interface;
//Address of the next hop
if(nextHop != NULL)
entry->nextHop = *nextHop;
else
entry->nextHop = IPV6_UNSPECIFIED_ADDR;
//Metric value
entry->metric = metric;
//The entry is now valid
entry->valid = TRUE;
//Sucessful processing
error = NO_ERROR;
}
else
{
//The routing table is full
error = ERROR_FAILURE;
}
//Release exclusive access
osReleaseMutex(&netMutex);
//Return status code
return error;
} | 220 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ndpCheckOptions | ndpCheckOptions( const uint8_t * options , size_t length) | ['options', 'length'] | error_t ndpCheckOptions(const uint8_t *options, size_t length)
{
size_t i;
NdpOption *option;
//Point to the very first option of the NDP message
i = 0;
//Parse options
while((i + sizeof(NdpOption)) <= length)
{
//Point to the current option
option = (NdpOption *) (options + i);
//Nodes must silently discard an NDP message that contains
//an option with length zero
if(option->length == 0)
return ERROR_INVALID_OPTION;
//Jump to next the next option
i += option->length * 8;
}
//The Options field is valid
return NO_ERROR;
} | 72 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | ndpGetOption | ndpGetOption( uint8_t * options , size_t length , uint8_t type) | ['options', 'length', 'type'] | void *ndpGetOption(uint8_t *options, size_t length, uint8_t type)
{
size_t i;
NdpOption *option;
//Point to the very first option of the NDP message
i = 0;
//Parse options
while((i + sizeof(NdpOption)) <= length)
{
//Point to the current option
option = (NdpOption *) (options + i);
//Nodes must silently discard an NDP message that contains
//an option with length zero
if(option->length == 0)
break;
//Check option length
if((i + option->length * 8) > length)
break;
//Current option type matches the specified one?
if(option->type == type || type == NDP_OPT_ANY)
return option;
//Jump to next the next option
i += option->length * 8;
}
//Specified option type not found
return NULL;
} | 104 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | mqttSnClientDisconnect | mqttSnClientDisconnect( MqttSnClientContext * context) | ['context'] | error_t mqttSnClientDisconnect(MqttSnClientContext *context)
{
error_t error;
systime_t time;
//Make sure the MQTT-SN client context is valid
if(context == NULL)
return ERROR_INVALID_PARAMETER;
//Initialize status code
error = NO_ERROR;
//Disconnect procedure
while(!error)
{
//Get current time
time = osGetSystemTime();
//Check current state
if(context->state == MQTT_SN_CLIENT_STATE_ACTIVE)
{
//Save current time
context->startTime = time;
//The DISCONNECT message is sent by a client to indicate that it
//wants to close the connection
error = mqttSnClientSendDisconnect(context, 0);
}
else if(context->state == MQTT_SN_CLIENT_STATE_SENDING_REQ)
{
//Check whether the timeout has elapsed
if(timeCompare(time, context->startTime + context->timeout) >= 0)
{
//Terminate DTLS connection
mqttSnClientShutdownConnection(context);
//Report a timeout error
error = ERROR_TIMEOUT;
}
else if(timeCompare(time, context->retransmitStartTime +
MQTT_SN_CLIENT_RETRY_TIMEOUT) >= 0)
{
//If the retry timer times out and the expected gateway's reply
//is not received, the client retransmits the message
error = mqttSnClientSendDisconnect(context, 0);
}
else
{
//Wait for the gateway's reply
error = mqttSnClientProcessEvents(context, MQTT_SN_CLIENT_TICK_INTERVAL);
}
}
else if(context->state == MQTT_SN_CLIENT_STATE_DISCONNECTING)
{
//Terminate DTLS connection
error = mqttSnClientShutdownConnection(context);
//Close network connection
mqttSnClientCloseConnection(context);
//The connection is closed
context->state = MQTT_SN_CLIENT_STATE_DISCONNECTED;
}
else if(context->state == MQTT_SN_CLIENT_STATE_DISCONNECTED)
{
//The MQTT-SN client is disconnected
break;
}
else
{
//Invalid state
error = ERROR_WRONG_STATE;
}
}
//Any error to report?
if(error != NO_ERROR && error != ERROR_WOULD_BLOCK)
{
//Close network connection
mqttSnClientCloseConnection(context);
//Update MQTT-SN client state
context->state = MQTT_SN_CLIENT_STATE_DISCONNECTED;
}
//Return status code
return error;
} | 218 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | mqttSnClientSubscribe | mqttSnClientSubscribe( MqttSnClientContext * context , const char_t * topicName , MqttSnQosLevel qos) | ['context', 'topicName', 'qos'] | error_t mqttSnClientSubscribe(MqttSnClientContext *context,
const char_t *topicName, MqttSnQosLevel qos)
{
error_t error;
systime_t time;
//Check parameters
if(context == NULL || topicName == NULL)
return ERROR_INVALID_PARAMETER;
//Initialize status code
error = NO_ERROR;
//Topic subscribe procedure
while(!error)
{
//Get current time
time = osGetSystemTime();
//Check current state
if(context->state == MQTT_SN_CLIENT_STATE_ACTIVE)
{
//The message identifier allows the sender to match a message with
//its corresponding acknowledgment
mqttSnClientGenerateMessageId(context);
//Save current time
context->startTime = time;
//Send SUBSCRIBE message
error = mqttSnClientSendSubscribe(context, topicName, qos);
}
else if(context->state == MQTT_SN_CLIENT_STATE_SENDING_REQ)
{
//Check whether the timeout has elapsed
if(timeCompare(time, context->startTime + context->timeout) >= 0)
{
//Abort the retransmission procedure
context->state = MQTT_SN_CLIENT_STATE_DISCONNECTING;
//Report a timeout error
error = ERROR_TIMEOUT;
}
else if(timeCompare(time, context->retransmitStartTime +
MQTT_SN_CLIENT_RETRY_TIMEOUT) >= 0)
{
//If the retry timer times out and the expected gateway's reply
//is not received, the client retransmits the message
error = mqttSnClientSendSubscribe(context, topicName, qos);
}
else
{
//Wait for the gateway's reply
error = mqttSnClientProcessEvents(context, MQTT_SN_CLIENT_TICK_INTERVAL);
}
}
else if(context->state == MQTT_SN_CLIENT_STATE_RESP_RECEIVED)
{
//Update MQTT-SN client state
context->state = MQTT_SN_CLIENT_STATE_ACTIVE;
//Check the type of the received message
if(context->msgType == MQTT_SN_MSG_TYPE_SUBACK)
{
//If the subscribe request has not been accepted, the failure reason
//is encoded in the return code field of the SUBACK message
if(context->returnCode == MQTT_SN_RETURN_CODE_ACCEPTED)
{
//The topic ID field is not relevant in case of subscriptions to a
//topic name which contains wildcard characters
if(strchr(topicName, '#') == NULL && strchr(topicName, '+') == NULL)
{
//Save the topic ID assigned by the gateway
error = mqttSnClientAddTopic(context, topicName, context->topicId);
}
//A SUBACK message has been received
break;
}
else
{
//The subscribe request has been rejected by the gateway
error = ERROR_REQUEST_REJECTED;
}
}
else
{
//Report an error
error = ERROR_UNEXPECTED_RESPONSE;
}
}
else
{
//Invalid state
error = ERROR_NOT_CONNECTED;
}
}
//Return status code
return error;
} | 263 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | mqttSnClientSendUnsubscribe | mqttSnClientSendUnsubscribe( MqttSnClientContext * context , const char_t * topicName) | ['context', 'topicName'] | error_t mqttSnClientSendUnsubscribe(MqttSnClientContext *context,
const char_t *topicName)
{
error_t error;
systime_t time;
uint16_t topicId;
MqttSnFlags flags;
//Initialize status code
error = NO_ERROR;
//Reset unused flags
flags.all = 0;
//Check whether a predefined topic ID has been registered
topicId = mqttSnClientFindPredefTopicName(context, topicName);
//Predefined topic ID found?
if(topicId != MQTT_SN_INVALID_TOPIC_ID)
{
//The UNSUBSCRIBE message contains a predefined topic ID
flags.topicIdType = MQTT_SN_PREDEFINED_TOPIC_ID;
}
else
{
//Short topic name?
if(osStrlen(topicName) == 2 && strchr(topicName, '#') == NULL &&
strchr(topicName, '+') == NULL)
{
//The UNSUBSCRIBE message contains a short topic name
flags.topicIdType = MQTT_SN_SHORT_TOPIC_NAME;
}
else
{
//The UNSUBSCRIBE message contains a normal topic name
flags.topicIdType = MQTT_SN_NORMAL_TOPIC_NAME;
}
//Format UNSUBSCRIBE message
error = mqttSnFormatUnsubscribe(&context->message, flags,
context->msgId, topicId, topicName);
}
//Check status code
if(!error)
{
//Debug message
TRACE_INFO("Sending UNSUBSCRIBE message (%" PRIuSIZE " bytes)...\r\n",
context->message.length);
//Dump the contents of the message for debugging purpose
mqttSnDumpMessage(context->message.buffer, context->message.length);
//Send MQTT-SN message
error = mqttSnClientSendDatagram(context, context->message.buffer,
context->message.length);
//Get current time
time = osGetSystemTime();
//Save the time at which the message was sent
context->retransmitStartTime = time;
context->keepAliveTimestamp = time;
//Update MQTT-SN client state
context->state = MQTT_SN_CLIENT_STATE_SENDING_REQ;
context->msgType = MQTT_SN_MSG_TYPE_UNSUBSCRIBE;
}
//Return status code
return error;
} | 212 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | mqttSnClientIsShortTopicName | mqttSnClientIsShortTopicName( const char_t * topicName) | ['topicName'] | bool_t mqttSnClientIsShortTopicName(const char_t *topicName)
{
bool_t res;
//Initialize variable
res = FALSE;
//A short topic name is a topic name that has a fixed length of two octets
if(osStrlen(topicName) == 2)
{
//Ensure the topic name does not contains wildcard characters
if(strchr(topicName, '#') == NULL && strchr(topicName, '+') == NULL)
{
//The short topic name is a valid
res = TRUE;
}
}
//Return TRUE if the specified topic name is a short topic name
return res;
} | 56 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | webSocketParseAuthenticateField | webSocketParseAuthenticateField( WebSocket * webSocket , char_t * value) | ['webSocket', 'value'] | error_t webSocketParseAuthenticateField(WebSocket *webSocket, char_t *value)
{
#if (WEB_SOCKET_BASIC_AUTH_SUPPORT == ENABLED || WEB_SOCKET_DIGEST_AUTH_SUPPORT == ENABLED)
size_t n;
char_t *p;
char_t *token;
char_t *separator;
char_t *name;
WebSocketAuthContext *authContext;
//Point to the handshake context
authContext = &webSocket->authContext;
//Retrieve the authentication scheme
token = osStrtok_r(value, " \t", &p);
//Any parsing error?
if(token == NULL)
return ERROR_INVALID_SYNTAX;
//Basic access authentication?
if(!osStrcasecmp(token, "Basic"))
{
//Basic authentication is required by the WebSocket server
authContext->requiredAuthMode = WS_AUTH_MODE_BASIC;
}
//Digest access authentication?
else if(!osStrcasecmp(token, "Digest"))
{
//Digest authentication is required by the WebSocket server
authContext->requiredAuthMode = WS_AUTH_MODE_DIGEST;
}
//Unknown authentication scheme?
else
{
//Report an error
return ERROR_INVALID_SYNTAX;
}
//Get the first parameter
token = osStrtok_r(NULL, ",", &p);
//Parse the WWW-Authenticate field
while(token != NULL)
{
//Check whether a separator is present
separator = strchr(token, '=');
//Separator found?
if(separator != NULL)
{
//Split the string
*separator = '\0';
//Get field name and value
name = strTrimWhitespace(token);
value = strTrimWhitespace(separator + 1);
//Retrieve the length of the value field
n = osStrlen(value);
//Discard the surrounding quotes
if(n > 0 && value[n - 1] == '\"')
value[n - 1] = '\0';
if(value[0] == '\"')
value++;
//Check parameter name
if(!osStrcasecmp(name, "realm"))
{
//Save realm
strSafeCopy(authContext->realm, value, WEB_SOCKET_REALM_MAX_LEN);
}
#if (WEB_SOCKET_DIGEST_AUTH_SUPPORT == ENABLED)
else if(!osStrcasecmp(name, "nonce"))
{
//Save nonce
strSafeCopy(authContext->nonce, value, WEB_SOCKET_NONCE_MAX_LEN + 1);
}
else if(!osStrcasecmp(name, "opaque"))
{
//Save nonce
strSafeCopy(authContext->opaque, value, WEB_SOCKET_OPAQUE_MAX_LEN + 1);
}
else if(!osStrcasecmp(name, "stale"))
{
//Save stale flag
if(!osStrcasecmp(value, "true"))
authContext->stale = TRUE;
else
authContext->stale = FALSE;
}
#endif
//Get next parameter
token = osStrtok_r(NULL, ",", &p);
}
}
#endif
//Successful processing
return NO_ERROR;
} | 333 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | webSocketParseHeaderField | webSocketParseHeaderField( WebSocket * webSocket , char_t * line) | ['webSocket', 'line'] | error_t webSocketParseHeaderField(WebSocket *webSocket, char_t *line)
{
char_t *separator;
char_t *name;
char_t *value;
WebSocketHandshakeContext *handshakeContext;
//Point to the handshake context
handshakeContext = &webSocket->handshakeContext;
//Debug message
TRACE_DEBUG("%s", line);
//Check whether a separator is present
separator = strchr(line, ':');
//Separator found?
if(separator != NULL)
{
//Split the line
*separator = '\0';
//Get field name and value
name = strTrimWhitespace(line);
value = strTrimWhitespace(separator + 1);
//Upgrade header field found?
if(!osStrcasecmp(name, "Upgrade"))
{
if(!osStrcasecmp(value, "websocket"))
handshakeContext->upgradeWebSocket = TRUE;
}
//Connection header field found?
else if(!osStrcasecmp(name, "Connection"))
{
//Parse Connection header field
webSocketParseConnectionField(webSocket, value);
}
//Sec-WebSocket-Key header field found?
else if(!osStrcasecmp(name, "Sec-WebSocket-Key"))
{
//Server operation?
if(webSocket->endpoint == WS_ENDPOINT_SERVER)
{
//Save the contents of the Sec-WebSocket-Key header field
strSafeCopy(handshakeContext->clientKey, value,
WEB_SOCKET_CLIENT_KEY_SIZE + 1);
}
}
//Sec-WebSocket-Accept header field found?
else if(!osStrcasecmp(name, "Sec-WebSocket-Accept"))
{
//Client operation?
if(webSocket->endpoint == WS_ENDPOINT_CLIENT)
{
//Save the contents of the Sec-WebSocket-Accept header field
strSafeCopy(handshakeContext->serverKey, value,
WEB_SOCKET_SERVER_KEY_SIZE + 1);
}
}
#if (WEB_SOCKET_BASIC_AUTH_SUPPORT == ENABLED || WEB_SOCKET_DIGEST_AUTH_SUPPORT == ENABLED)
//WWW-Authenticate header field found?
else if(!osStrcasecmp(name, "WWW-Authenticate"))
{
//Parse WWW-Authenticate header field
webSocketParseAuthenticateField(webSocket, value);
}
#endif
//Content-Length header field found?
else if(!osStrcasecmp(name, "Content-Length"))
{
handshakeContext->contentLength = osStrtoul(value, NULL, 10);
}
}
//Successful processing
return NO_ERROR;
} | 249 | True | 1 |
CVE-2021-26788 | 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/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'name': 'https://github.com/Oryx-Embedded/CycloneTCP/commit/de5336016edbe1e90327d0ed1cba5c4e49114366?branch=de5336016edbe1e90327d0ed1cba5c4e49114366&diff=split', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oryx-embedded:cyclonetcp:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.7.6', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Oryx Embedded CycloneTCP 1.7.6 to 2.0.0, fixed in 2.0.2, is affected by incorrect input validation, which may cause a denial of service (DoS). To exploit the vulnerability, an attacker needs to have TCP connectivity to the target system. Receiving a maliciously crafted TCP packet from an unauthenticated endpoint is sufficient to trigger the bug.'}] | 2021-03-12T21:37Z | 2021-03-08T13: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 | OryxEmbeddedAdmin | 2021-01-08 10:16:26+01:00 | Version 2.0.2 | de5336016edbe1e90327d0ed1cba5c4e49114366 | False | Oryx-Embedded/CycloneTCP | Dual IPv4/IPv6 Stack | 2017-01-14 13:53:42 | 2022-06-30 05:56:20 | https://www.oryx-embedded.com/products/CycloneTCP | Oryx-Embedded | 101.0 | 56.0 | webSocketParseRequestLine | webSocketParseRequestLine( WebSocket * webSocket , char_t * line) | ['webSocket', 'line'] | error_t webSocketParseRequestLine(WebSocket *webSocket, char_t *line)
{
error_t error;
char_t *token;
char_t *p;
char_t *s;
//Debug message
TRACE_DEBUG("%s", line);
//The Request-Line begins with a method token
token = osStrtok_r(line, " \r\n", &p);
//Unable to retrieve the method?
if(token == NULL)
return ERROR_INVALID_REQUEST;
//The method of the request must be GET
if(osStrcasecmp(token, "GET"))
return ERROR_INVALID_REQUEST;
//The Request-URI is following the method token
token = osStrtok_r(NULL, " \r\n", &p);
//Unable to retrieve the Request-URI?
if(token == NULL)
return ERROR_INVALID_REQUEST;
//Check whether a query string is present
s = strchr(token, '?');
//Query string found?
if(s != NULL)
{
//Split the string
*s = '\0';
//Save the Request-URI
error = webSocketDecodePercentEncodedString(token,
webSocket->uri, WEB_SOCKET_URI_MAX_LEN);
//Any error to report?
if(error)
return ERROR_INVALID_REQUEST;
//Check the length of the query string
if(osStrlen(s + 1) > WEB_SOCKET_QUERY_STRING_MAX_LEN)
return ERROR_INVALID_REQUEST;
//Save the query string
osStrcpy(webSocket->queryString, s + 1);
}
else
{
//Save the Request-URI
error = webSocketDecodePercentEncodedString(token,
webSocket->uri, WEB_SOCKET_URI_MAX_LEN);
//Any error to report?
if(error)
return ERROR_INVALID_REQUEST;
//No query string
webSocket->queryString[0] = '\0';
}
//The protocol version is following the Request-URI
token = osStrtok_r(NULL, " \r\n", &p);
//HTTP version 0.9?
if(token == NULL)
{
//Save version number
webSocket->handshakeContext.version = WS_HTTP_VERSION_0_9;
//Persistent connections are not supported
webSocket->handshakeContext.connectionClose = TRUE;
}
//HTTP version 1.0?
else if(!osStrcasecmp(token, "HTTP/1.0"))
{
//Save version number
webSocket->handshakeContext.version = WS_HTTP_VERSION_1_0;
//By default connections are not persistent
webSocket->handshakeContext.connectionClose = TRUE;
}
//HTTP version 1.1?
else if(!osStrcasecmp(token, "HTTP/1.1"))
{
//Save version number
webSocket->handshakeContext.version = WS_HTTP_VERSION_1_1;
//HTTP 1.1 makes persistent connections the default
webSocket->handshakeContext.connectionClose = FALSE;
}
//HTTP version not supported?
else
{
//Report an error
return ERROR_INVALID_REQUEST;
}
//Successful processing
return NO_ERROR;
} | 290 | True | 1 |