cncf / cncf/cncf-fuzzing

runc fuzz harnesses use removed internal cgroups packages and APIs

Open
#585 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
133
Forks
53
PR merge metrics
No merged PRs in 30d

Description

### Description
The runc fuzz harnesses in cncf-fuzzing/projects/runc still assume the pre‑migration runc package layout.

The runc commit a75076b4a413f628c4b6aa4c5568b159aa128a56 removed the internal runc cgroups packages and migrated them to github.com/opencontainers/cgroups. It also removed the internal stripRoot helper and changed the Intel RDT test support used by the existing harnesses.

The current harnesses still:
- call the removed stripRoot function;
- import github.com/opencontainers/runc/libcontainer/cgroups;
- import github.com/opencontainers/runc/libcontainer/cgroups/systemd;
- use the removed runc/libcontainer/cgroups/fs2, devices, and fscommon directories;
- depend on the obsolete Intel RDT test helper API.

These incompatibilities prevent the runc fuzz build from compiling after the user fuzzer path is corrected.

### Steps to reproduce
1. Check out runc commit 4ccedcbfe826933dd0773515a5e876f2dcd304ee.
2. Update runc/tests/fuzzing/oss_fuzz_build.sh to use: github.com/moby/sys/user
3. Check out cncf‑fuzzing commit 3f40cbe6b1aa30f1f6e9d9cc312de571ad2b4212.
4. Run projects/runc/build.sh in an OSS‑Fuzz Go builder.
5. Observe the runc harness compilation.

### Results received and expected
The build fails because the harnesses reference APIs and directories removed from runc.

Observed failures include:
libcontainer/utils/libcontainer_utils_fuzzer.go:36:6: undefined: stripRoot
and attempts to move harnesses into the removed path: /src/runc/libcontainer/cgroups/fs2/

Expected:
The runc harnesses should use the current external cgroups module and current runc APIs, and all harnesses should compile successfully.

### cncf‑fuzzing version
Commit: 3f40cbe6b1aa30f1f6e9d9cc312de571ad2b4212
Affected path: projects/runc

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with projects/runc/build.sh and runc/tests/fuzzing/oss_fuzz_build.sh, then inspect the affected harnesses such as libcontainer/utils/libcontainer_utils_fuzzer.go and the removed cgroups paths. Compare their imports, stripRoot usage, and Intel RDT helper calls with the current runc APIs and github.com/opencontainers/cgroups, then run the OSS-Fuzz Go build; done means all runc harnesses compile.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.