Headline
CVE-2022-31076: fix fuzzer extract message error by vincentgoat · Pull Request #3899 · kubeedge/kubeedge
KubeEdge is built upon Kubernetes and extends native containerized application orchestration and device management to hosts at the Edge. In affected versions a malicious message can crash CloudCore by triggering a nil-pointer dereference in the UDS Server. Since the UDS Server only communicates with the CSI Driver on the cloud side, the attack is limited to the local host network. As such, an attacker would already need to be an authenticated user of the Cloud. Additionally it will be affected only when users turn on the unixsocket switch in the config file cloudcore.yaml. This bug has been fixed in Kubeedge 1.11.0, 1.10.1, and 1.9.3. Users should update to these versions to resolve the issue. Users unable to upgrade should sisable the unixsocket switch of CloudHub in the config file cloudcore.yaml.
@@ -80,19 +80,19 @@ func handlePersistentVolumeClaimFromMetaDB(content []byte) (*api.PersistentVolum return nil, fmt.Errorf("persistentvolumeclaim length from meta db is %d", len(lists)) }
var pvc *api.PersistentVolumeClaim var pvc api.PersistentVolumeClaim err = json.Unmarshal([]byte(lists[0]), &pvc) if err != nil { return nil, fmt.Errorf("unmarshal message to persistentvolumeclaim from db failed, err: %v", err) } return pvc, nil return &pvc, nil }
func handlePersistentVolumeClaimFromMetaManager(content []byte) (*api.PersistentVolumeClaim, error) { var pvc *api.PersistentVolumeClaim var pvc api.PersistentVolumeClaim err := json.Unmarshal(content, &pvc) if err != nil { return nil, fmt.Errorf("unmarshal message to persistentvolumeclaim failed, err: %v", err) } return pvc, nil return &pvc, nil }
Related news
### Impact A malicious message can crash CloudCore by triggering a null-pointer dereference in the UDS Server. Since the UDS Server only communicates with the CSI Driver on the cloud side, the attack is limited to the local host network. As such, an attacker would already need to be an authenticated user of the Cloud. It will be affected only when users turn on the unixsocket switch in the config file `cloudcore.yaml` as below: ``` modules: cloudHub: ... unixsocket: address: xxx enable: true ``` ### Patches This bug has been fixed in Kubeedge 1.11.0, 1.10.1, and 1.9.3. Users should update to these versions to resolve the issue. ### Workarounds Disable the unixsocket switch of CloudHub in the config file `cloudcore.yaml`. ### References NA ### Credits Thanks David Korczynski and Adam Korczynski of ADA Logics for responsibly disclosing this issue in accordance with the [kubeedge security policy](https://github.com/kubeedge/kubeedge/security/policy) during a se...