Skip to content

Conversation

@dcantah
Copy link
Contributor

@dcantah dcantah commented May 13, 2022

This fixes a nil deref possible if no shim options for the runtime
specified were supplied. For example:

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runhcs-wcow-process.options]

vs.

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runhcs-wcow-process.options]
SandboxIsolation = 0

This fixes a nil deref possible if no shim options for the runtime
specified were supplied. For example:

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runhcs-wcow-process.options]

vs.

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runhcs-wcow-process.options]
    SandboxIsolation = 0

Signed-off-by: Daniel Canter <[email protected]>
@dcantah dcantah requested a review from a team as a code owner May 13, 2022 18:09
@kevpar
Copy link
Member

kevpar commented May 13, 2022

I'm 90% sure we've fixed this same issue in the past. Can we add a test that covers this case?

@dcantah
Copy link
Contributor Author

dcantah commented May 17, 2022

I'm 90% sure we've fixed this same issue in the past. Can we add a test that covers this case?

@kevpar Agree. We could add a cri-containerd test, but we don't run those on CI here yet. Or did you have something else in mind that I might be brain farting on?

Change initialization of shim options so we don't need to check nil

Signed-off-by: Daniel Canter <[email protected]>
@helsaawy helsaawy self-assigned this May 17, 2022
@dcantah dcantah merged commit 5c518f1 into microsoft:master May 20, 2022
anmaxvl added a commit that referenced this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants