Skip to content

Upgrade from 1.23.1 to 1.24 requires extended SELinux permissions #1879

@saschagrunert

Description

@saschagrunert

When upgrading crun to 1.24 within the SPO CI, then I get the following error on the Fedora 39 machine:

Sep 12 08:17:09 fedora crio[5196]: time="2025-09-12T08:17:09.854346878Z" level=error msg="Container creation error: systemd failed to install eBPF device filter on cgroup `/sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod13ca77474fb81b3c3d015919985171dc.slice/crio-ce72d38c8945299ae27c3e05a09da750684989fc22df53d0ce3e731dbd0bef95.scope`\n" id=e4c76c70-76c6-40c4-91f5-561a39db3d03 name=/runtime.v1.RuntimeService/CreateContainer

Caused by:

if (n_progs == 0)
return crun_make_error (err, 0, "systemd failed to install eBPF device filter on cgroup `%s`", full_path);

Audit logging exposes the following issue:

type=AVC msg=audit(1757664843.839:14803): avc:  denied  { prog_run } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:container_runtime_t:s0 tclass=bpf permissive=0
        Was caused by:
                Missing type enforcement (TE) allow rule.

                You can use audit2allow to generate a loadable module to allow this access.

Means we would require an additional SELinux rule for that, like:

module my-mod 1.0;

require {
        type init_t;
        type container_runtime_t;
        class bpf prog_run;
}

#============= init_t ==============
allow init_t container_runtime_t:bpf prog_run;

Is this intentional?

Ref: #1865

cc @sohankunkerkar @ngopalak-redhat

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