Buffer over-read

From HandWiki
Revision as of 21:53, 6 February 2024 by S.Timg (talk | contribs) (fix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In computer security and programming, a buffer over-read[1][2] is an anomaly where a program, while reading data from a buffer, overruns the buffer's boundary and reads (or tries to read) adjacent memory. This is a special case of violation of memory safety. Buffer over-reads can be triggered, as in the Heartbleed bug, by maliciously crafted inputs that are designed to exploit a lack of bounds checking to read parts of memory not intended to be accessible. They may also be caused by programming errors alone. Buffer over-reads can result in erratic program behavior, including memory access errors, incorrect results, a crash, or a breach of system security. Thus, they are the basis of many software vulnerabilities and can be maliciously exploited to access privileged information.[citation needed]

Programming languages commonly associated with buffer over-reads include C and C++, which provide no built-in protection against using pointers to access data in any part of virtual memory, and which do not automatically check that reading data from a block of memory is safe; respective examples are attempting to read more elements than contained in an array, or failing to append a trailing terminator to a null-terminated string. Bounds checking can prevent buffer over-reads,[3] while fuzz testing can help detect them.

See also

References

  1. "CWE – CWE-126: Buffer Over-read (2.6)". Cwe.mitre.org. February 18, 2014. http://cwe.mitre.org/data/definitions/126.html. Retrieved April 10, 2014. 
  2. Strackx, Raoul; Younan, Yves; Philippaerts, Pieter; Piessens, Frank; Lachmund, Sven; Walter, Thomas (2009-01-01). "Breaking the memory secrecy assumption". Proceedings of the Second European Workshop on System Security. EUROSEC '09. New York, NY, USA: ACM. pp. 1–8. doi:10.1145/1519144.1519145. ISBN 9781605584720. https://lirias.kuleuven.be/handle/123456789/228745. 
  3. "Efficient protection against heap-based buffer overflows without resorting to magic". Dept. of Computer Science, Katholieke Universiteit Leuven. 2013-02-25. http://www.fort-knox.org/files/younan_malloc.pdf. Retrieved 2014-04-24. 

External links