docker: fix nil pointer dereference when GraphDriver is nil#3816
Merged
dims merged 1 commit intogoogle:masterfrom Jan 16, 2026
Merged
docker: fix nil pointer dereference when GraphDriver is nil#3816dims merged 1 commit intogoogle:masterfrom
dims merged 1 commit intogoogle:masterfrom
Conversation
690c0d2 to
f80a8be
Compare
The migration to github.com/moby/moby modules in b20bcf1 changed GraphDriver from a value type to a pointer type. This causes a nil pointer dereference when Docker doesn't include GraphDriver in the container inspect response (which can happen with certain storage drivers or container configurations). Add a nil check before accessing GraphDriver.Data and log a warning at V(4) verbosity level when GraphDriver is not found. Fixes google#3815 Signed-off-by: Davanum Srinivas <davanum@gmail.com>
f80a8be to
d238044
Compare
Collaborator
Author
|
@thaJeztah FYI please see the change i made here, others may run into it in other projects. |
Contributor
|
Ah, thanks! We should probably look if we can remove all the devicemapper bits; at least, I think this is only used when using the devicemapper storage driver, which has been removed from docker for some time now. |
humblec
added a commit
to humblec/kubernetes
that referenced
this pull request
Feb 27, 2026
Update github.com/google/cadvisor from v0.56.0 to v0.56.2. v0.56.2 fixes a nil pointer dereference when Docker GraphDriver is nil (google/cadvisor#3816). Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The migration to github.com/moby/moby modules in b20bcf1 changed GraphDriver from a value type to a pointer type. This causes a nil pointer dereference when Docker doesn't include GraphDriver in the container inspect response (which can happen with certain storage drivers or container configurations).
Add a nil check before accessing GraphDriver.Data and log a warning at V(4) verbosity level when GraphDriver is not found.
Fixes #3815