All Policies
Check Node for CVE-2022-0185 in CEL expressions
Linux CVE-2022-0185 can allow a container escape in Kubernetes if left unpatched. The affected Linux kernel versions, at this time, are 5.10.84-1 and 5.15.5-2. For more information, refer to https://security-tracker.debian.org/tracker/CVE-2022-0185. This policy runs in background mode and flags an entry in the ClusterPolicyReport if any Node is reporting one of the affected kernel versions.
Policy Definition
/other-cel/check-node-for-cve-2022-0185/check-node-for-cve-2022-0185.yaml
1apiVersion: kyverno.io/v1
2kind: ClusterPolicy
3metadata:
4 name: check-kernel
5 annotations:
6 policies.kyverno.io/title: Check Node for CVE-2022-0185 in CEL expressions
7 policies.kyverno.io/category: Other in CEL
8 policies.kyverno.io/severity: high
9 kyverno.io/kyverno-version: 1.11.0
10 policies.kyverno.io/minversion: 1.11.0
11 kyverno.io/kubernetes-version: "1.26-1.27"
12 policies.kyverno.io/subject: Node
13 policies.kyverno.io/description: >-
14 Linux CVE-2022-0185 can allow a container escape in Kubernetes if left unpatched.
15 The affected Linux kernel versions, at this time, are 5.10.84-1 and 5.15.5-2.
16 For more information, refer to https://security-tracker.debian.org/tracker/CVE-2022-0185.
17 This policy runs in background mode and flags an entry in the ClusterPolicyReport
18 if any Node is reporting one of the affected kernel versions.
19spec:
20 validationFailureAction: Audit
21 background: true
22 rules:
23 - name: kernel-validate
24 match:
25 any:
26 - resources:
27 kinds:
28 - Node
29 operations:
30 - CREATE
31 - UPDATE
32 validate:
33 cel:
34 expressions:
35 - expression: "!(object.status.nodeInfo.kernelVersion in ['5.10.84-1', '5.15.5-2'])"
36 message: "Kernel is vulnerable to CVE-2022-0185."
37