The vulnerability allowed bypassing security policies (allowed-gadgets, disallow-pulling, verify-image) because client-supplied instance parameters could override global security parameters. The patch c51d419964f5b6f9344fcad4faba70e2e025212b in pkg/operators/oci-handler/oci.go addresses this.
-
The function (*ociHandler).InstantiateDataOperator was responsible for preparing parameters. In its vulnerable state, it merged instance parameters (from instanceParamValues, potentially client-controlled) into a common ociParams structure that also held global parameters. The CopyFromMap operation allowed instance parameters to overwrite global ones if they shared the same key. This is where the malicious input (instanceParamValues) could effectively alter security settings.
-
The function (*OciHandlerInstance).init then used this ociParams structure to make decisions based on security policies (e.g., checking disallowPulling, verifyImage). Because ociParams could contain overridden values, the security checks were performed against the client-manipulated settings, not the intended global policies.
The patch rectifies this by ensuring globalParams and instanceParams are handled separately throughout the OciHandlerInstance lifecycle. Security-critical parameters are now explicitly read from globalParams in the init method, preventing instance parameters from overriding them. The identified functions are the ones directly involved in the flawed parameter handling (InstantiateDataOperator) and the consumption of these flawed parameters for security decisions (init).