Command Palette

Search for a command to run...

Назад к скиллам
скилл № 95337

Null Pointer Dereference

Detects code that dereferences pointers or return values that could be NULL without validation, causing crashes or privilege escalation.

БесплатноБез исполняемых скриптов
zakirkunот zakirkun★ 40 звёзд на GitHub

Установить Null Pointer Dereference в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Null Pointer Dereference

Overview

Null pointer dereference occurs when code uses a pointer without checking whether it's NULL. This causes:

  • Crash/DoS: SIGSEGV on Unix, access violation on Windows
  • Kernel privilege escalation: NULL pointer dereference in kernel context can map page 0 and execute attacker code
  • Logic bypass: Skipping NULL checks allows unexpected code paths

Detection Strategy

  • Return values of malloc(), calloc(), realloc() used without NULL check
  • Results of fopen(), popen() dereferenced without NULL check
  • Java objects returned from getById() or map lookups used without null check

Remediation

Always check pointers for NULL before dereferencing.

Vulnerable (C):

char *buf = malloc(256);
strcpy(buf, input); // buf might be NULL if malloc failed!

Safe (C):

char *buf = malloc(256);
if (buf == NULL) { perror("malloc"); exit(1); }
strcpy(buf, input);

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • patterns.yaml

FAQ

Что делает скилл Null Pointer Dereference?

Detects code that dereferences pointers or return values that could be NULL without validation, causing crashes or privilege escalation.

Как установить скилл Null Pointer Dereference?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Null Pointer Dereference запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Null Pointer Dereference с