Skip to content
OpenAdvisories

Weakness (CWE)

CWE-170: Improper Null Termination

Base Incomplete

The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.

How to prevent it (5 mitigations)
  1. Requirements

    Use a language that is not susceptible to these issues. However, be careful of null byte interaction errors (CWE-626) with lower-level constructs that may be written in a language that is susceptible.

  2. Implementation

    Ensure that all string functions used are understood fully as to how they append null characters. Also, be wary of off-by-one errors when appending nulls to the end of strings.

  3. Implementation

    If performance constraints permit, special code can be added that validates null-termination of string buffers, this is a rather naive and error-prone solution.

  4. Implementation

    Switch to bounded string manipulation functions. Inspect buffer lengths involved in the buffer overrun trace reported with the defect.

  5. Implementation

    Add code that fills buffers with nulls (however, the length of buffers still needs to be inspected, to ensure that the non null-terminated string is not written at the physical end of the buffer).

Source: MITRE CWE-170

8 results · Clear filters · Feed

  • Critical 9.8

    Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key

    A remote, unauthenticated attacker can trigger memory corruption in Zephyr's HTTP server WebSocket upgrade path by sending a crafted Sec-WebSocket-Key header. The HTTP/1 header parser copies the header into a fixed-size buffer using a bounded copy that does n…

  • Critical 9.8

    Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLs

    Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLs. Password parameters in PKCS12.xs are declared char *, which routes through Perl's default typemap to SvPV_nolen. The Perl length is discarded. The C code (or OpenSS…

  • Critical 9.8

    An issue was discovered in DriveLock 24.1 before 24.1.6, 24.2 before 24.2.7, and 25.1 before 25.1.5. An unprivileged us…

  • Critical 9.9

    Cisco Jabber Desktop and Mobile Client Software Vulnerabilities

    Multiple vulnerabilities in Cisco Jabber for Windows, Cisco Jabber for MacOS, and Cisco Jabber for mobile platforms could allow an attacker to execute arbitrary programs on the underlying operating system with elevated privileges, access sensitive information…

  • Critical 9.9

    Cisco Jabber Desktop and Mobile Client Software Vulnerabilities

    Multiple vulnerabilities in Cisco Jabber for Windows, Cisco Jabber for MacOS, and Cisco Jabber for mobile platforms could allow an attacker to execute arbitrary programs on the underlying operating system with elevated privileges, access sensitive information…

  • Critical 9.9

    Cisco Jabber Desktop and Mobile Client Software Vulnerabilities

    Multiple vulnerabilities in Cisco Jabber for Windows, Cisco Jabber for MacOS, and Cisco Jabber for mobile platforms could allow an attacker to execute arbitrary programs on the underlying operating system with elevated privileges, access sensitive information…

  • Critical 9.9

    Cisco Jabber Desktop and Mobile Client Software Vulnerabilities

    Multiple vulnerabilities in Cisco Jabber for Windows, Cisco Jabber for MacOS, and Cisco Jabber for mobile platforms could allow an attacker to execute arbitrary programs on the underlying operating system with elevated privileges, access sensitive information…

  • Critical 9.9

    Cisco Jabber Desktop and Mobile Client Software Vulnerabilities

    Multiple vulnerabilities in Cisco Jabber for Windows, Cisco Jabber for MacOS, and Cisco Jabber for mobile platforms could allow an attacker to execute arbitrary programs on the underlying operating system with elevated privileges, access sensitive information…