Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-1077:Floating Point Comparison with Incorrect Operator
Weakness ID:1077
Version:v4.17
Weakness Name:Floating Point Comparison with Incorrect Operator
Vulnerability Mapping:Allowed
Abstraction:Variant
Structure:Simple
Status:Incomplete
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

The code performs a comparison such as an equality test between two float (floating point) values, but it uses comparison operators that do not account for the possibility of loss of precision.

▼Extended Description

Numeric calculation using floating point values can generate imprecise results because of rounding errors. As a result, two different calculations might generate numbers that are mathematically equal, but have slightly different bit representations that do not translate to the same mathematically-equal values. As a result, an equality test or other comparison might produce unexpected results.

This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfDiscouragedP697Incorrect Comparison
Nature: ChildOf
Mapping: Discouraged
Type: Pillar
ID: 697
Name: Incorrect Comparison
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedC1129CISQ Quality Measures (2016) - Reliability
MemberOfProhibitedC1306CISQ Quality Measures - Reliability
MemberOfProhibitedC1397Comprehensive Categorization: Comparison
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1129
Name: CISQ Quality Measures (2016) - Reliability
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1306
Name: CISQ Quality Measures - Reliability
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1397
Name: Comprehensive Categorization: Comparison
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-317Reduce Reliability (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-317
Name: Reduce Reliability (impact)
▼Relevant To View
Relevant to the view"CISQ Quality Measures (2020) - (1305)"
NatureMappingTypeIDName
MemberOfProhibitedC1306CISQ Quality Measures - Reliability
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1306
Name: CISQ Quality Measures - Reliability
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
OtherN/AReduce Reliability
N/A
Scope: Other
Likelihood: N/A
Impact: Reduce Reliability
Note:
N/A
▼Potential Mitigations
▼Modes Of Introduction
▼Applicable Platforms
▼Demonstrative Examples
▼Observed Examples
ReferenceDescription
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      Indirect
      N/A
      Ordinality: Indirect
      Description:
      N/A
      ▼Detection Methods
      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      OMG ASCRMASCRM-RLB-9N/AN/A
      Taxonomy Name: OMG ASCRM
      Entry ID: ASCRM-RLB-9
      Fit: N/A
      Entry Name: N/A
      ▼Related Attack Patterns
      IDName
      ▼References
      Reference ID: REF-961
      Title: Automated Source Code Reliability Measure (ASCRM)
      Author: Object Management Group (OMG)
      Section: ASCRM-RLB-9
      Publication:
      Publisher:
      Edition:
      URL:http://www.omg.org/spec/ASCRM/1.0/
      URL Date:
      Day:N/A
      Month:01
      Year:2016
      Reference ID: REF-975
      Title: Comparing Floating Point Numbers, 2012 Edition
      Author: Bruce Dawson
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
      URL Date:
      Day:25
      Month:02
      Year:2012
      Details not found