Bug 2042600 - Alone, the io.kubernetes.cri-o.Devices option poses a security risk
Summary: Alone, the io.kubernetes.cri-o.Devices option poses a security risk
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Peter Hunt
QA Contact: Weinan Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-19 19:26 UTC by Peter Hunt
Modified: 2022-03-10 16:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:40:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github cri-o cri-o pull 5551 0 None open config: add allowed_devices field 2022-01-20 05:48:07 UTC
Github cri-o cri-o pull 5561 0 None open [1.23] config: add allowed_devices field 2022-01-21 20:58:17 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:41:06 UTC

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


Note You need to log in before you can comment on or make changes to this bug.