You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address CVE-2024-1725: Restrict access to infrastructure PVCs by requiring matching infraClusterLabels on tenant PVCs (#103)
The CVE describes how an attacker may create a PV/PVC in a guest cluster to access any PVC in the infra cluster namespace.
The infra clusters may belong to other guest clusters or have been created out of band from the kubevirt-csi driver.
This PR addresses the issue by:
1. infraClusterLabels are required (but is up to admin to make sure they are unique per tenant)
2. guest may only access infra PVCs with matching labels
3. guest can only access PVCs with specific prefix (default is "pvc-")
Shoutout to awels who actually implemented this based on input from davidvossel.
Signed-off-by: Michael Henriksen <[email protected]>
Co-authored-by: Alexander Wels <[email protected]>
Copy file name to clipboardExpand all lines: cmd/kubevirt-csi-driver/kubevirt-csi-driver.go
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ var (
25
25
infraClusterNamespace=flag.String("infra-cluster-namespace", "", "The infra-cluster namespace")
26
26
infraClusterKubeconfig=flag.String("infra-cluster-kubeconfig", "", "the infra-cluster kubeconfig file. If not set, defaults to in cluster config.")
27
27
infraClusterLabels=flag.String("infra-cluster-labels", "", "The infra-cluster labels to use when creating resources in infra cluster. 'name=value' fields separated by a comma")
28
+
volumePrefix=flag.String("volume-prefix", "pvc", "The prefix expected for persistent volumes")
28
29
// infraStorageClassEnforcement = flag.String("infra-storage-class-enforcement", "", "A string encoded yaml that represents the policy of enforcing which infra storage classes are allowed in persistentVolume of type kubevirt")
0 commit comments