Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2042600

Summary: Alone, the io.kubernetes.cri-o.Devices option poses a security risk
Product: OpenShift Container Platform Reporter: Peter Hunt <pehunt>
Component: NodeAssignee: Peter Hunt <pehunt>
Node sub component: CRI-O QA Contact: Weinan Liu <weinliu>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, weinliu
Version: 4.10   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:40:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Hunt 2022-01-19 19:26:50 UTC
Description of problem:
If there exists a workload or runtime class that has the "io.kubernetes.cri-o.Devices" option enabled as an allowed_annotation, then CRI-O will mount any device into any container that requests that workload/runtime class and specifies that annotation. There needs to be some filtering mechanism so users are restricted in which devices they're allowed to set.

Version-Release number of selected component (if applicable):
only 4.10 is affected, and it has not been released yet. This bug will be made a blocker to prevent 4.10.0 going out the door with this issue.

How reproducible:
100%

Steps to Reproduce:
1. Add these two annotations to any pod:
io.openshift.builder: ""
io.kubernetes.cri-o.Devices: "/dev/random" # this can be any device

Actual results:

containers in the pod are allowed to access the device

Expected results:
the pod is denied access

Additional info:

Comment 1 Peter Hunt 2022-01-19 19:27:41 UTC
fixed in attached PR

Comment 8 errata-xmlrpc 2022-03-10 16:40:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056