Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reading previously dynamically allocated memory after it has been deallocated can lead to abnormal program termination and denial-of-service attacks. Writing memory that has been deallocated can lead to the execution of arbitrary code with the permissions of the vulnerable process.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

MEM50-CPP

High

Likely

No

NoMedium

P18P9

L1L2

Automated Detection

BDRES-FREESplintSplintPRQA QA-4303, 4304 6.22General analysis rule set

Tool

Version

Checker

Description

Astrée

Include Page
Astrée_V
Astrée_V

dangling_pointer_use
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC++-MEM50
Clang
Include Page
Clang_V
Clang_V
clang-analyzer-cplusplus.NewDelete
clang-analyzer-alpha.security.ArrayBoundV2 
Checked by clang-tidy, but does not catch all violations of this rule.
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

ALLOC.UAF

Use after free
Compass/ROSE




Coverity

Include Page
Coverity_V
Coverity_V

USE_AFTER_FREE

Can detect the specific instances where memory is deallocated more than once or read/written to the target of a freed pointer

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C++4303, C++4304


Klocwork
Include Page
Klocwork_V
Klocwork_V
UFM.DEREF.MIGHT
UFM.DEREF.MUST
UFM.FFM.MIGHT
UFM.FFM.MUST
UFM.RETURN.MIGHT
UFM.RETURN.MUST
UFM.USE.MIGHT
UFM.USE.MUSTMUST 


LDRA tool suite
Include Page
LDRA_V
LDRA_V

483 S, 484 S

Partially implemented

Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
CERT_CPP-MEM50-a

Do not use resources that have been freed

Parasoft Insure++

Runtime detectionSplint
Polyspace Bug Finder

Include Page

Polyspace Bug Finder_V

Polyspace Bug Finder_V

CERT C++4.1 : MEM50-CPP

Checks for:

  • Pointer access out of bounds
  • Deallocation of previously deallocated pointer
  • Use of previously freed pointer

Rule partially covered.

PVS-Studio

Include Page

PVS-Studio

_V
PVS-Studio_V

V586, V774
Security Reviewer - Static Reviewer

6.02

CPP_12
CPP_14
CPP_15
Fully implemented
Splint
Include Page
Splint_V
Splint_V



Related Vulnerabilities

VU#623332 describes a double-free vulnerability in the MIT Kerberos 5 function krb5_recvauth() [VU# 623332].

...