CWE-126 · Słabość
Buffer Over-read
- Abstrakcja
- Wariant
- Status
- Szkic
- Dodano
- 19 lipca 2006
- Ostatnia zmiana
- 11 grudnia 2025
Opis
The product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer.
Skutki
Confidentiality
Read Memory
Confidentiality
Bypass Protection Mechanism
By reading out-of-bounds memory, an attacker might be able to get secret values, such as memory addresses, which can bypass protection mechanisms such as ASLR in order to improve the reliability and likelihood of exploiting a separate weakness to achieve code execution instead of just denial of service.
Availability, Integrity
DoS: Crash, Exit, or Restart
An attacker might be able to cause a crash or other denial of service by causing the product to read a memory location that is not allowed (such as a segmentation fault), or to cause other conditions in which the read operation returns more data than is expected.
Przykłady podatności
- CVE-2022-1733 Text editor has out-of-bounds read past end of line while indenting C code
- CVE-2014-0160 Chain: "Heartbleed" bug receives an inconsistent length parameter (CWE-130) enabling an out-of-bounds read (CWE-126), returning memory that could include private cryptographic keys and other sensitive data.
- CVE-2009-2523 Chain: product does not handle when an input string is not NULL terminated, leading to buffer over-read or heap-based buffer overflow.
Słabość nadrzędna
Kiedy powstaje
- Implementation
Dotyczy
Memory-Unsafe, C, C++
Uwagi
These problems may be resultant from missing sentinel values (CWE-463) or trusting a user-influenced input length variable.
A buffer over-read typically occurs when the pointer or its index is incremented to a position past the end of the buffer or when pointer arithmetic results in a position after the valid memory location.
Źródła
- Breaking the memory secrecy assumption — Raoul Strackx, Yves Younan, Pieter Philippaerts, Frank Piessens, Sven Lachmund, Thomas Walter, ACM, 2009
- The info leak era on software exploitation — Fermin J. Serna, 2012
- 24 Deadly Sins of Software Security — Michael Howard, David LeBlanc, John Viega, "Sin 5: Buffer Overruns." Page 89, McGraw-Hill, 2010
- AddressSanitizer
Wpis z katalogu CWE 4.20.