cisb-O2 / README.md
Akirayasha's picture
Upload README.md with huggingface_hub
44ad462 verified
|
Raw
History Blame Contribute Delete
2.52 kB
metadata
language:
  - en
license: mit
task_categories:
  - text-generation
tags:
  - assembly
  - security
  - compiler-bugs
  - CISB
  - program-repair
size_categories:
  - n<1K

CISB-O2: Compiler-Introduced Security Bugs at -O2

Overview

This dataset collects the unsafe half of the Compiler-Introduced Security Bugs (CISB) benchmark: each record is a CISB case compiled with LLVM/Clang-17 at -O2, where the optimizer eliminated or bypassed a security check that is still present in the -O0 build.

Because the -O0 build is the safe variant and the -O2 build is the unsafe one, every record here is unsafe by construction -- there is no flag column. The intended task is repair: given the unsafe -O2 assembly and the verifier's failure output, produce a corrected assembly that restores the security property without changing other behavior.

Dataset Structure

Column Description
task_name Task identifier, e.g. b-4-var-0
source_code Original C source (code.c)
x86_64 x86-64 assembly at -O2 (Intel syntax, built with -masm=intel)
aarch64_linux AArch64 assembly at -O2
riscv RISC-V RV64 (rv64gc/lp64d) assembly at -O2
run_output Combined stdout+stderr of the verifier harness (test.c) run against the x86-64 build
test_c C source of the verifier harness (test.c) -- links against the assembly under test and reports its verdict via exit code

Statistics

  • Total records: 36
  • Bug families: 6 (b-4, b-9, b-12, b-14, b-21, l-30), 6 variants each

Security Oracle

The test.c harness reports its verdict through the process exit code:

  • 0 -> SAFE (security check preserved)
  • 1 -> UNSAFE (security check eliminated) -- the expected state for every record here
  • 2 -> HARNESS_ERROR
  • killed by signal -> CRASH; no exit in time -> TIMEOUT

The run_output column captures what that harness printed while returning UNSAFE, so it can be fed to a model as the failure description for a repair task.

Usage

from datasets import load_dataset

ds = load_dataset("Akirayasha/cisb-O2", split="test")

record = ds[0]
unsafe_asm = record["x86_64"]      # assembly to repair
failure     = record["run_output"] # why the verifier says it is unsafe
harness     = record["test_c"]     # verifier source, to rebuild/rerun it against a candidate

Citation

Part of the CISC-to-RISC transpilation research project at MBZUAI.