syz-extract-constants

Automates extraction and definition of kernel constants for syzkaller syzlang descriptions.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill syz-extract-constants
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: syz-extract-constants
Source: https://github.com/KaiserWhoLearns/skillsbench/tree/main/tasks/syzkaller-ppdev-syzlang/environment/skills/syz-extract-constants
Command: npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill syz-extract-constants

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kernel fuzzing requires accurate constants (ioctl numbers, flags) to generate valid syzkaller programs. This skill provides two workflows: manual .const files for environments without kernel sources, and the syz-extract tool to pull values from kernel headers when sources are available.

Core Features & Use Cases

  • Manual constants workflow: Define a .const file alongside your syzlang description to pin constant values per architecture and ensure consistency.
  • Automated extraction workflow: Use syz-extract to pull constants from kernel headers and integrate them into syzkaller task descriptions.
  • Use Case: When adding support for new kernel features in syzkaller descriptions, this skill guarantees correct ioctl numbers and kernel constant values across multiple files.

Quick Start

Choose either manual constants file workflow or run syz-extract with kernel headers when available to obtain constants.

Frequently Asked Questions about syz-extract-constants

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract kernel constants for syzkaller syzlang descriptions?

To extract kernel constants for syzkaller syzlang descriptions, use the syz-extract tool to pull ioctl numbers and flag values from kernel headers, or manually define a .const file to pin values per architecture when sources are unavailable.

What is the best way to define syzlang constants without kernel sources?

The best way to define syzlang constants without kernel sources is creating a manual .const file alongside your syzlang description, which pins constant values per architecture and ensures consistency across targets without requiring header access.

Can I use syz-extract to pull ioctl numbers for multiple architectures?

Yes, syz-extract can pull ioctl numbers and kernel constant values across multiple descriptions and targets, enforcing naming conventions and integrating with syzkaller builds to support accurate fuzzing across architectures.

Why do my syzkaller programs fail with invalid ioctl numbers?

Syzkaller programs fail with invalid ioctl numbers when kernel constants are inaccurate. This skill automates extraction and definition of these constants from kernel headers, ensuring valid syzkaller programs across multiple targets.

When do I need a manual .const file versus running syz-extract?

Use a manual .const file when kernel sources are unavailable, or run syz-extract when sources are accessible to pull values directly from kernel headers and integrate them into syzkaller task descriptions.