Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,27 +1,73 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
-
|
| 15 |
-
dtype: string
|
| 16 |
-
splits:
|
| 17 |
-
- name: test
|
| 18 |
-
num_bytes: 214418
|
| 19 |
-
num_examples: 36
|
| 20 |
-
download_size: 56754
|
| 21 |
-
dataset_size: 214418
|
| 22 |
-
configs:
|
| 23 |
-
- config_name: default
|
| 24 |
-
data_files:
|
| 25 |
-
- split: test
|
| 26 |
-
path: data/test-*
|
| 27 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- assembly
|
| 9 |
+
- security
|
| 10 |
+
- compiler-bugs
|
| 11 |
+
- CISB
|
| 12 |
+
- program-repair
|
| 13 |
+
size_categories:
|
| 14 |
+
- n<1K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# CISB-O2: Compiler-Introduced Security Bugs at -O2
|
| 18 |
+
|
| 19 |
+
## Overview
|
| 20 |
+
|
| 21 |
+
This dataset collects the **unsafe** half of the **Compiler-Introduced Security Bugs
|
| 22 |
+
(CISB)** benchmark: each record is a CISB case compiled with LLVM/Clang-17 at **-O2**,
|
| 23 |
+
where the optimizer eliminated or bypassed a security check that is still present in
|
| 24 |
+
the **-O0** build.
|
| 25 |
+
|
| 26 |
+
Because the -O0 build is the safe variant and the -O2 build is the unsafe one, every
|
| 27 |
+
record here is unsafe by construction -- there is no `flag` column. The intended task is
|
| 28 |
+
**repair**: given the unsafe -O2 assembly and the verifier's failure output, produce a
|
| 29 |
+
corrected assembly that restores the security property without changing other behavior.
|
| 30 |
+
|
| 31 |
+
## Dataset Structure
|
| 32 |
+
|
| 33 |
+
| Column | Description |
|
| 34 |
+
|--------|-------------|
|
| 35 |
+
| `task_name` | Task identifier, e.g. `b-4-var-0` |
|
| 36 |
+
| `source_code` | Original C source (`code.c`) |
|
| 37 |
+
| `x86_64` | x86-64 assembly at -O2 (**Intel syntax**, built with `-masm=intel`) |
|
| 38 |
+
| `aarch64_linux` | AArch64 assembly at -O2 |
|
| 39 |
+
| `riscv` | RISC-V RV64 (`rv64gc`/`lp64d`) assembly at -O2 |
|
| 40 |
+
| `run_output` | Combined stdout+stderr of the verifier harness (`test.c`) run against the x86-64 build |
|
| 41 |
+
|
| 42 |
+
## Statistics
|
| 43 |
+
|
| 44 |
+
- **Total records**: 36
|
| 45 |
+
- **Bug families**: 6 (`b-4`, `b-9`, `b-12`, `b-14`, `b-21`, `l-30`), 6 variants each
|
| 46 |
+
|
| 47 |
+
## Security Oracle
|
| 48 |
+
|
| 49 |
+
The `test.c` harness reports its verdict through the process exit code:
|
| 50 |
+
|
| 51 |
+
- `0` -> **SAFE** (security check preserved)
|
| 52 |
+
- `1` -> **UNSAFE** (security check eliminated) -- the expected state for every record here
|
| 53 |
+
- `2` -> **HARNESS_ERROR**
|
| 54 |
+
- killed by signal -> **CRASH**; no exit in time -> **TIMEOUT**
|
| 55 |
+
|
| 56 |
+
The `run_output` column captures what that harness printed while returning UNSAFE, so it
|
| 57 |
+
can be fed to a model as the failure description for a repair task.
|
| 58 |
+
|
| 59 |
+
## Usage
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from datasets import load_dataset
|
| 63 |
+
|
| 64 |
+
ds = load_dataset("Akirayasha/cisb-O2", split="test")
|
| 65 |
+
|
| 66 |
+
record = ds[0]
|
| 67 |
+
unsafe_asm = record["x86_64"] # assembly to repair
|
| 68 |
+
failure = record["run_output"] # why the verifier says it is unsafe
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Citation
|
| 72 |
+
|
| 73 |
+
Part of the CISC-to-RISC transpilation research project at MBZUAI.
|