Skip to content

avoid nil deref in ToOCILinuxSyscalls#276

Merged
mikebrow merged 1 commit intocontainerd:mainfrom
grey3228:bugfix/nil-errno-deref
Mar 4, 2026
Merged

avoid nil deref in ToOCILinuxSyscalls#276
mikebrow merged 1 commit intocontainerd:mainfrom
grey3228:bugfix/nil-errno-deref

Conversation

@grey3228
Copy link
Copy Markdown

@grey3228 grey3228 commented Mar 3, 2026

Hello!

In ToOCILinuxSyscalls in case if syscall.ErrnoRet is not nil, nil ptr errnoRet will be dereferenced without any previous initialization, so it will cause panic.

Avoid dereferencing nil ptr errnoRet by adding previous initialization.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

In ToOCILinuxSyscalls in case if syscall.ErrnoRet is not nil,
nil ptr errnoRet will be dereferenced without any previous
initialization, so it will cause panic.

Avoid dereferencing nil ptr errnoRet by adding previous initialization.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
@klihub klihub requested a review from mikebrow March 4, 2026 10:34
Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikebrow mikebrow merged commit 9f467ef into containerd:main Mar 4, 2026
16 checks passed
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.

3 participants