5 research outputs found

    MarkUs: Drop-in use-after-free prevention for low-level languages

    Get PDF
    Use-after-free vulnerabilities have plagued software written in low-level languages, such as C and C++, becoming one of the most frequent classes of exploited software bugs. Attackers identify code paths where data is manually freed by the programmer, but later incorrectly reused, and take advantage by reallocating the data to themselves. They then alter the data behind the program’s back, using the erroneous reuse to gain control of the application and, potentially, the system. While a variety of techniques have been developed to deal with these vulnerabilities, they often have unacceptably high performance or memory overheads, especially in the worst case. We have designed MarkUs, a memory allocator that prevents this form of attack at low overhead, sufficient for deployment in real software, even under allocation- and memory-intensive scenarios. We prevent use-after-free attacks by quarantining data freed by the programmer and forbidding its reallocation until we are sure that there are no dangling pointers targeting it. To identify these we traverse live-objects accessible from registers and memory, marking those we encounter, to check whether quarantined data is accessible from any currently allocated location. Unlike garbage collection, which is unsafe in C and C++, MarkUs ensures safety by only freeing data that is both quarantined by the programmer and has no identifiable dangling pointers. The information provided by the programmer’s allocations and frees further allows us to optimize the process by freeing physical addresses early for large objects, specializing analysis for small objects, and only performing marking when sufficient data is in quarantine. Using MarkUs, we reduce the overheads of temporal safety in low-level languages to 1.1× on average for SPEC CPU2006, with a maximum slowdown of only 2×, vastly improving upon the state-of-the-art.Arm Limite

    Generational Garbage Collection of C++ Targeted to SPARC Architectures

    Get PDF
    Dynamic memory management plays a crucial role in the development of large software systems. Traditional techniques for managing dynamic memory require the programmer to free an allocated object when it is no longer required. In addition to posing an intellectual burden on the programmer, this approach has often proved error-prone. Many bugs in existing software systems are known to be caused by dynamic memory management errors. Garbage collectors free the programmer from this intellectual burden by automatically reclaiming allocated objects that are no longer in use. In systems with garbage collection, the programmer need not concern himself with releasing objects no longer in use. Most traditional garbage collectors suspend the application program during the collection process. Generational garbage collectors are known to achieve short pause times as they rely on the observation that most objects die young. They concentrate most of their efforts in reclaiming recently allocated objects, occasionally performing a complete collection. In this project, we have implemented a generational garbage collector for C++ targeted to SPARC architectures. Our technique imposes only minor restrictions on the usage of dynamic memory in C++ and runs on stock hardware. * Portions of this paper were excerpted from Code Generation to Support Efficient Accurate Garbage Collection of C++ on Stock Hardware , a paper currently being prepared for publication by Kelvin Nilsen, Ravichandran Ganesan, Satish Guggilla, Satish Kumar, and Kannan Narasimhan

    Muistin siivous

    Get PDF
    Tutkielmassa esitellään roskan käsite tietojenkäsittelytieteessä, roskienkeruun keskeiset käsitteet ja perusmenetelmät muunnelmineen sekä nykyaikaiset tehokkaat algoritmit. Keskipisteenä ovat kuitenkin muistinhallintatutkimuksen 2000-luvun saavutukset, tutkimusaiheet ja tutkimusvälineet. Näitä hyödyntää tutkielmassa esiteltävä uusi CBRC-roskienkeruualgoritmi. Lisäksi katsastetaan ohjelmoijan vastuu automaattisessa muistinhallinnassa sekä ohjelmoinnissa käytettävissä olevat roskienkeruutietoiset välineet eräissä ohjelmointikielissä ja –ympäristöissä (Java, .Net, C++). Avainsanat ja -sanonnat: roskienkeruu, muistinsiivous, muistinhallinta, algoritmit, ohjelmointikielet CR-luokat: D 3.4, D.4.2, D.3.

    Gestion de cycle de vie des objets par aspects pour C +++

    Get PDF
    Les langages tels Java, Simula, Eiffel, Modula III sont des langages orientés objet qui ont gagné leur popularité grâce à la sûreté du traitement des exceptions et à la politique de sécurité qu'ils utilisent, notamment pour la gestion mémoire. En effet, Meyer a placé la gestion automatique de la mémoire en troisième position dans les "sept commandements" de la programmation orientée objet. L'entité utilisée pour assurer la gestion automatique de la mémoire est appelée Garbage Collector ou ramasse-miettes. Certains langages comme C, C++, Ada, Pascal et bien d'autres utilisent une libération explicite de la mémoire. L'avantage majeur de cette libération par rapport au Garbbage Collector est sans doute l'emploi des pointeurs, outil très important permettant un accès direct à certaines zones mémoires et une utilisation plus optimale de l'espace mémoire. Le C++ est l'un des langages de programmation les plus utilisés actuellement. Il est à la fois facile à utiliser et très efficace. Les caractéristiques du C++ en font un langage idéal pour certains types de projets. Il est incontournable dans la réalisation des grands programmes. Les optimisations des compilateurs actuels en font également un langage de prédilection pour ceux qui recherchent les performances. Puisqu'il est une extension de l'ANSI-C, C++ utilise une gestion explicite de la mémoire avec les delete, new, free et malloc. Pour Ellis et Stroustrup, la gestion de mémoire explicite via le Garbbage Collector n'est pas une composante du langage C++. Nous proposons dans notre travail de recherche un outil assurant une gestion implicite de la mémoire basé sur la programmation aspect, notamment avec l'extension AspectC++ qui est un préprocesseur pour un compilateur C++ usuel. L'idée est d'implémenter via AspectC++ des compteurs de références pour les objets nouvellement créés. Il s'agit d'attribuer un compteur de références à un objet, d'incrémenter ce compteur chaque fois qu'un autre objet crée une référence vers le premier objet et de décrémenter ce compteur chaque fois qu'une référence est supprimée. L'objet sera détruit dès que son compteur associé sera à zéro

    Safe, Efficient Garbage Collection for C++

    No full text
    We propose adding safe, efficient garbage collection to C++, eliminating the possibility of storage-management bugs and making the design of complex, object-oriented systems much easier. This can be accomplished with almost no change to the language itself and only small changes to existing implementations, while retaining compatibility with existing class libraries. Our proposal is the first to take a holistic, system-level approach, integrating four technologies. The language interface specifies how programmers access garbage collection through the language. An optional safe subset of the language automatically enforces the safe-use rules of garbage collection and precludes storage bugs. A variety of collection algorithms are compatible with the language interface, but some are easier to implement and more compatible with existing C++ and C implementations. Finally, codegenerator safety ensures that compilers generate correct code for use with collectors
    corecore