All Policies
Check Node for CVE-2022-0185
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/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
7 policies.kyverno.io/category: Other
8 policies.kyverno.io/severity: high
9 kyverno.io/kyverno-version: 1.6.0
10 policies.kyverno.io/minversion: 1.6.0
11 kyverno.io/kubernetes-version: "1.23"
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 validate:
30 message: "Kernel is vulnerable to CVE-2022-0185."
31 deny:
32 conditions:
33 any:
34 - key: "{{request.object.status.nodeInfo.kernelVersion}}"
35 operator: Equals
36 value: "5.10.84-1"
37 - key: "{{request.object.status.nodeInfo.kernelVersion}}"
38 operator: Equals
39 value: "5.15.5-2"