CETS
Temporal memory safety errors, such as dangling pointer dereferences and double frees, are a prevalent source of software bugs in unmanaged languages such as C. Existing schemes that attempt to retrofit temporal safety for such languages have high runtime overheads and/or are incomplete, thereby lim...
Published in: | ACM SIGPLAN Notices |
---|---|
Main Authors: | , , , |
Format: | Article in Journal/Newspaper |
Language: | English |
Published: |
Association for Computing Machinery (ACM)
2010
|
Subjects: | |
Online Access: | http://dx.doi.org/10.1145/1837855.1806657 https://dl.acm.org/doi/pdf/10.1145/1837855.1806657 |
id |
cracm:10.1145/1837855.1806657 |
---|---|
record_format |
openpolar |
spelling |
cracm:10.1145/1837855.1806657 2024-06-23T07:57:10+00:00 CETS compiler enforced temporal safety for C Nagarakatte, Santosh Zhao, Jianzhou Martin, Milo M.K. Zdancewic, Steve 2010 http://dx.doi.org/10.1145/1837855.1806657 https://dl.acm.org/doi/pdf/10.1145/1837855.1806657 en eng Association for Computing Machinery (ACM) ACM SIGPLAN Notices volume 45, issue 8, page 31-40 ISSN 0362-1340 1558-1160 journal-article 2010 cracm https://doi.org/10.1145/1837855.1806657 2024-05-27T12:55:15Z Temporal memory safety errors, such as dangling pointer dereferences and double frees, are a prevalent source of software bugs in unmanaged languages such as C. Existing schemes that attempt to retrofit temporal safety for such languages have high runtime overheads and/or are incomplete, thereby limiting their effectiveness as debugging aids. This paper presents CETS, a compile-time transformation for detecting all violations of temporal safety in C programs. Inspired by existing approaches, CETS maintains a unique identifier with each object, associates this metadata with the pointers in a disjoint metadata space to retain memory layout compatibility, and checks that the object is still allocated on pointer dereferences. A formal proof shows that this is sufficient to provide temporal safety even in the presence of arbitrary casts if the program contains no spatial safety violations. Our CETS prototype employs both temporal check removal optimizations and traditional compiler optimizations to achieve a runtime overhead of just 48% on average. When combined with a spatial-checking system, the average overall overhead is 116% for complete memory safety Article in Journal/Newspaper The Pointers ACM Publications (Association for Computing Machinery) ACM SIGPLAN Notices 45 8 31 40 |
institution |
Open Polar |
collection |
ACM Publications (Association for Computing Machinery) |
op_collection_id |
cracm |
language |
English |
description |
Temporal memory safety errors, such as dangling pointer dereferences and double frees, are a prevalent source of software bugs in unmanaged languages such as C. Existing schemes that attempt to retrofit temporal safety for such languages have high runtime overheads and/or are incomplete, thereby limiting their effectiveness as debugging aids. This paper presents CETS, a compile-time transformation for detecting all violations of temporal safety in C programs. Inspired by existing approaches, CETS maintains a unique identifier with each object, associates this metadata with the pointers in a disjoint metadata space to retain memory layout compatibility, and checks that the object is still allocated on pointer dereferences. A formal proof shows that this is sufficient to provide temporal safety even in the presence of arbitrary casts if the program contains no spatial safety violations. Our CETS prototype employs both temporal check removal optimizations and traditional compiler optimizations to achieve a runtime overhead of just 48% on average. When combined with a spatial-checking system, the average overall overhead is 116% for complete memory safety |
format |
Article in Journal/Newspaper |
author |
Nagarakatte, Santosh Zhao, Jianzhou Martin, Milo M.K. Zdancewic, Steve |
spellingShingle |
Nagarakatte, Santosh Zhao, Jianzhou Martin, Milo M.K. Zdancewic, Steve CETS |
author_facet |
Nagarakatte, Santosh Zhao, Jianzhou Martin, Milo M.K. Zdancewic, Steve |
author_sort |
Nagarakatte, Santosh |
title |
CETS |
title_short |
CETS |
title_full |
CETS |
title_fullStr |
CETS |
title_full_unstemmed |
CETS |
title_sort |
cets |
publisher |
Association for Computing Machinery (ACM) |
publishDate |
2010 |
url |
http://dx.doi.org/10.1145/1837855.1806657 https://dl.acm.org/doi/pdf/10.1145/1837855.1806657 |
genre |
The Pointers |
genre_facet |
The Pointers |
op_source |
ACM SIGPLAN Notices volume 45, issue 8, page 31-40 ISSN 0362-1340 1558-1160 |
op_doi |
https://doi.org/10.1145/1837855.1806657 |
container_title |
ACM SIGPLAN Notices |
container_volume |
45 |
container_issue |
8 |
container_start_page |
31 |
op_container_end_page |
40 |
_version_ |
1802650682980827136 |