Use after free

From zakirkun/ice-tea · View interactive version

Use after free is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects potential use-after-free vulnerabilities where memory is accessed after being freed.

How to use this skill

Skill file

Use After Free

Overview

Use-after-free (UAF) occurs when a program continues to use a pointer after the memory it points to has been freed. This can lead to:

UAF vulnerabilities are common in browsers, kernels, and network services.

Detection Strategy

Remediation

Vulnerable:

char *buf = malloc(256);
free(buf);
strcpy(buf, input); // Use after free!

Safe:

char *buf = malloc(256);
free(buf);
buf = NULL; // Prevent use after free
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.