UNGOML: Automated Classification of unsafe Usages in Go

06/01/2023
by   Anna-Katharina Wickert, et al.
0

The Go programming language offers strong protection from memory corruption. As an escape hatch of these protections, it provides the unsafe package. Previous studies identified that this unsafe package is frequently used in real-world code for several purposes, e.g., serialization or casting types. Due to the variety of these reasons, it may be possible to refactor specific usages to avoid potential vulnerabilities. However, the classification of unsafe usages is challenging and requires the context of the call and the program's structure. In this paper, we present the first automated classifier for unsafe usages in Go, UNGOML, to identify what is done with the unsafe package and why it is used. For UNGOML, we built four custom deep learning classifiers trained on a manually labeled data set. We represent Go code as enriched control-flow graphs (CFGs) and solve the label prediction task with one single-vertex and three context-aware classifiers. All three context-aware classifiers achieve a top-1 accuracy of more than 86 in a set-valued conformal prediction setting, we achieve accuracies of more than 93 be used to efficiently filter unsafe usages for use cases such as refactoring or a security audit. UNGOML: https://github.com/stg-tud/ungoml Artifact: https://dx.doi.org/10.6084/m9.figshare.22293052

READ FULL TEXT

page 9

page 10

research
10/21/2020

Uncovering the Hidden Dangers: Finding Unsafe Go Code in the Wild

The Go programming language aims to provide memory and thread safety thr...
research
03/07/2023

Face: Fast, Accurate and Context-Aware Audio Annotation and Classification

This paper presents a context-aware framework for feature selection and ...
research
07/10/2023

False Sense of Security: Leveraging XAI to Analyze the Reasoning and True Performance of Context-less DGA Classifiers

The problem of revealing botnet activity through Domain Generation Algor...
research
03/21/2023

Learning Context-aware Classifier for Semantic Segmentation

Semantic segmentation is still a challenging task for parsing diverse co...
research
09/11/2023

Enhancing Hyperedge Prediction with Context-Aware Self-Supervised Learning

Hypergraphs can naturally model group-wise relations (e.g., a group of u...
research
06/14/2023

Your Email Address Holds the Key: Understanding the Connection Between Email and Password Security with Deep Learning

In this work, we investigate the effectiveness of deep-learning-based pa...
research
08/09/2023

rCanary: Detecting Memory Leaks Across Semi-automated Memory Management Boundary in Rust

Rust is an effective system programming language that guarantees memory ...

Please sign up or login with your details

Forgot password? Click here to reset