Skip to content

runc fuzz harnesses use removed internal cgroups packages and APIs #585

Description

@xingyaner

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 3f40cbe.
  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: 3f40cbe
Affected path: projects/runc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions