All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][wrynose][PATCH 1/2] containerd: Fix CVE-2026-95837
@ 2026-11-05  6:03 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
  2026-11-05  6:03 ` [meta-virtualization][wrynose][PATCH 2/2] containerd: Fix CVE-2026-95838 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
  2026-11-05 16:37 ` [meta-virtualization][wrynose][PATCH 1/2] containerd: Fix CVE-2026-95837 Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-11-05  6:03 UTC (permalink / raw)
  To: meta-virtualization

From: Deepak Rathore <deeratho@cisco.com>

This patch applies the upstream release/2.2 fix for
CVE-2026-95837. It disables checkpoint restore through
CreateContainer by default, while keeping an explicit opt-in for
users who need this experimental behavior. The upstream fix is
referenced in [1], and the Debian tracker entry that records the fix
commit is referenced in [2].

[1] https://github.com/containerd/containerd/commit/5c3a47036ec08f8a7517a01a0baf113d6146eca0
[2] https://security-tracker.debian.org/tracker/CVE-2026-95837

Signed-off-by: Deepak Rathore <deeratho@cisco.com>
---
 .../containerd/CVE-2026-95837.patch           | 231 +++++++++++++++++++
 .../containerd/containerd_git.bb              |   1 +
 2 files changed, 232 insertions(+)
 create mode 100644 recipes-containers/containerd/containerd/CVE-2026-95837.patch

diff --git a/recipes-containers/containerd/containerd/CVE-2026-95837.patch b/recipes-containers/containerd/containerd/CVE-2026-95837.patch
new file mode 100644
index 00000000..e3e03d21
--- /dev/null
+++ b/recipes-containers/containerd/containerd/CVE-2026-95837.patch
@@ -0,0 +1,231 @@
+From 746209812edc4b43ca19f8b0ee7b6627d2f7eca5 Mon Sep 17 00:00:00 2001
+From: Samuel Karp <me@samuelkarp.com>
+Date: Sun, 25 Oct 2026 23:23:55 -0700
+Subject: [PATCH] cri: disable restore in CreateContainer by default
+
+Checkpoint restore via CreateContainer was intended to be experimental,
+but was enabled by default. While the enable_criu knob can disable CRIU
+entirely, explicit forensic checkpoints still benefit from CRIU while
+restore via CreateContainer should be disabled by default.
+
+Add the enable_experimental_restore_via_create configuration knob to
+control restore via CreateContainer independently from enable_criu,
+defaulting to disabled.
+
+CVE: CVE-2026-95837
+Upstream-Status: Backport [https://github.com/containerd/containerd/commit/5c3a47036ec08f8a7517a01a0baf113d6146eca0]
+
+Backport Changes:
+- The release/2.2 fix assumes two CRIU controls already present in
+  that branch: the enable_criu configuration option [1] and checkCriu
+  availability and version validation [2]. Containerd 2.2.2 has
+  neither. Carrying both controls would add broader CRIU functionality,
+  so this backport instead disables CreateContainer restore by default
+  and adds a separate opt-in configuration.
+- The docs/cri/config.md comment uses concise target wording: it describes the
+  option as allowing checkpoint restore via CreateContainer and says it is
+  disabled by default, omitting upstream's expanded experimental wording.
+- Keep the v2/v3 config documentation and equivalent regression tests for
+  default denial and TOML/JSON parsing. Omit README.md (unrelated link
+  change), RELEASES.md (release notes), contrib checkpoint shell tests
+  (standalone integration scripts not run by this recipe), and
+  enable_criu_linux_test.go (tests for the unavailable CRIU controls).
+
+References:
+[1] https://github.com/containerd/containerd/commit/7d41b25c9884c0f94acdb0f7e78fbab2752fccb6
+[2] https://github.com/containerd/containerd/commit/48116fa596fd0e926749dcdfd3ef92da00fc6dc8
+
+Assisted-by: Antigravity
+Signed-off-by: Samuel Karp <samuelkarp@google.com>
+(cherry picked from commit 928c03c6898cad95f795300281fdff0dbc55a32f)
+(cherry picked from commit 5c3a47036ec08f8a7517a01a0baf113d6146eca0)
+Signed-off-by: Deepak Rathore <deeratho@cisco.com>
+---
+ docs/cri/config.md                            |  5 ++
+ internal/cri/config/config.go                 |  5 ++
+ internal/cri/config/config_test.go            | 46 +++++++++++++++++++
+ internal/cri/config/config_unix.go            | 25 +++++-----
+ internal/cri/config/config_windows.go         |  3 +-
+ .../cri/server/container_checkpoint_linux.go  |  4 ++
+ .../server/container_checkpoint_linux_test.go |  6 +++
+ 7 files changed, 81 insertions(+), 13 deletions(-)
+
+diff --git a/docs/cri/config.md b/docs/cri/config.md
+index 49c81a272..ba11e0982 100644
+--- a/docs/cri/config.md
++++ b/docs/cri/config.md
+@@ -272,6 +272,7 @@ version = 3
+     cdi_spec_dirs = ['/etc/cdi', '/var/run/cdi']
+     drain_exec_sync_io_timeout = '0s'
+     ignore_deprecation_warnings = []
++    enable_experimental_restore_via_create = false
+ 
+     [plugins.'io.containerd.cri.v1.runtime'.containerd]
+       default_runtime_name = 'runc'
+@@ -470,6 +471,10 @@ version = 2
+   # For example, the value can be '5h', '2h30m', '10s'.
+   drain_exec_sync_io_timeout = "0s"
+ 
++  # enable_experimental_restore_via_create allows restoring checkpoints via
++  # CreateContainer. This is disabled by default.
++  enable_experimental_restore_via_create = false
++
+   # 'plugins."io.containerd.grpc.v1.cri".x509_key_pair_streaming' contains a x509 valid key pair to stream with tls.
+   [plugins."io.containerd.grpc.v1.cri".x509_key_pair_streaming]
+     # tls_cert_file is the filepath to the certificate paired with the "tls_key_file"
+diff --git a/internal/cri/config/config.go b/internal/cri/config/config.go
+index 98d62a705..0c86b6648 100644
+--- a/internal/cri/config/config.go
++++ b/internal/cri/config/config.go
+@@ -427,6 +427,11 @@ type RuntimeConfig struct {
+ 	// IgnoreDeprecationWarnings is the list of the deprecation IDs (such as "io.containerd.deprecation/pull-schema-1-image")
+ 	// that should be ignored for checking "ContainerdHasNoDeprecationWarnings" condition.
+ 	IgnoreDeprecationWarnings []string `toml:"ignore_deprecation_warnings" json:"ignoreDeprecationWarnings"`
++
++	// EnableExperimentalRestoreViaCreate enables experimental restore of container checkpoints via CreateContainer.
++	// When set to false, checkpoint restore via CreateContainer will be disabled.
++	// Default: false
++	EnableExperimentalRestoreViaCreate bool `toml:"enable_experimental_restore_via_create" json:"enableExperimentalRestoreViaCreate"`
+ }
+ 
+ // X509KeyPairStreaming contains the x509 configuration for streaming
+diff --git a/internal/cri/config/config_test.go b/internal/cri/config/config_test.go
+index a9134ed9d..10a8432ff 100644
+--- a/internal/cri/config/config_test.go
++++ b/internal/cri/config/config_test.go
+@@ -18,9 +18,11 @@ package config
+ 
+ import (
+ 	"context"
++	"encoding/json"
+ 	"runtime"
+ 	"testing"
+ 
++	"github.com/pelletier/go-toml/v2"
+ 	"github.com/stretchr/testify/assert"
+ 	criruntime "k8s.io/cri-api/pkg/apis/runtime/v1"
+ 
+@@ -508,3 +510,47 @@ func TestCheckLocalImagePullConfigs(t *testing.T) {
+ 		})
+ 	}
+ }
++
++func TestParseEnableExperimentalRestoreViaCreate(t *testing.T) {
++	testCases := []struct {
++		name            string
++		tomlStr         string
++		expectedRestore bool
++	}{
++		{
++			name:            "enabled",
++			tomlStr:         "enable_experimental_restore_via_create = true",
++			expectedRestore: true,
++		},
++		{
++			name:            "disabled",
++			tomlStr:         "enable_experimental_restore_via_create = false",
++			expectedRestore: false,
++		},
++		{
++			name:            "absent defaults to disabled",
++			tomlStr:         "# no restore setting",
++			expectedRestore: false,
++		},
++	}
++
++	for _, tc := range testCases {
++		t.Run(tc.name, func(t *testing.T) {
++			cfg := DefaultRuntimeConfig()
++			err := toml.Unmarshal([]byte(tc.tomlStr), &cfg)
++			assert.NoError(t, err)
++			assert.Equal(t, tc.expectedRestore, cfg.EnableExperimentalRestoreViaCreate)
++		})
++	}
++}
++
++func TestJSONEnableExperimentalRestoreViaCreate(t *testing.T) {
++	cfg := DefaultRuntimeConfig()
++	err := json.Unmarshal([]byte(`{"enableExperimentalRestoreViaCreate":true}`), &cfg)
++	assert.NoError(t, err)
++	assert.True(t, cfg.EnableExperimentalRestoreViaCreate)
++
++	b, err := json.Marshal(cfg)
++	assert.NoError(t, err)
++	assert.Contains(t, string(b), `"enableExperimentalRestoreViaCreate":true`)
++}
+diff --git a/internal/cri/config/config_unix.go b/internal/cri/config/config_unix.go
+index 7c4514b68..5694e6ac5 100644
+--- a/internal/cri/config/config_unix.go
++++ b/internal/cri/config/config_unix.go
+@@ -97,17 +97,18 @@ func DefaultRuntimeConfig() RuntimeConfig {
+ 				},
+ 			},
+ 		},
+-		EnableSelinux:                    false,
+-		SelinuxCategoryRange:             1024,
+-		MaxContainerLogLineSize:          16 * 1024,
+-		DisableProcMount:                 false,
+-		TolerateMissingHugetlbController: true,
+-		DisableHugetlbController:         true,
+-		IgnoreImageDefinedVolumes:        false,
+-		EnableCDI:                        true,
+-		CDISpecDirs:                      []string{"/etc/cdi", "/var/run/cdi"},
+-		DrainExecSyncIOTimeout:           "0s",
+-		EnableUnprivilegedPorts:          true,
+-		EnableUnprivilegedICMP:           true,
++		EnableSelinux:                      false,
++		SelinuxCategoryRange:               1024,
++		MaxContainerLogLineSize:            16 * 1024,
++		DisableProcMount:                   false,
++		TolerateMissingHugetlbController:   true,
++		DisableHugetlbController:           true,
++		IgnoreImageDefinedVolumes:          false,
++		EnableCDI:                          true,
++		CDISpecDirs:                        []string{"/etc/cdi", "/var/run/cdi"},
++		DrainExecSyncIOTimeout:             "0s",
++		EnableUnprivilegedPorts:            true,
++		EnableUnprivilegedICMP:             true,
++		EnableExperimentalRestoreViaCreate: false,
+ 	}
+ }
+diff --git a/internal/cri/config/config_windows.go b/internal/cri/config/config_windows.go
+index 789d499c6..716d00863 100644
+--- a/internal/cri/config/config_windows.go
++++ b/internal/cri/config/config_windows.go
+@@ -86,6 +86,7 @@ func DefaultRuntimeConfig() RuntimeConfig {
+ 		IgnoreImageDefinedVolumes: false,
+ 		// TODO(windows): Add platform specific config, so that most common defaults can be shared.
+ 
+-		DrainExecSyncIOTimeout: "0s",
++		DrainExecSyncIOTimeout:             "0s",
++		EnableExperimentalRestoreViaCreate: false,
+ 	}
+ }
+diff --git a/internal/cri/server/container_checkpoint_linux.go b/internal/cri/server/container_checkpoint_linux.go
+index 26f0d9b25..dc6c13d0c 100644
+--- a/internal/cri/server/container_checkpoint_linux.go
++++ b/internal/cri/server/container_checkpoint_linux.go
+@@ -189,6 +189,10 @@ func (c *criService) CRImportCheckpoint(
+ 	sandbox *sandbox.Sandbox,
+ 	sandboxConfig *runtime.PodSandboxConfig,
+ ) (ctrID string, retErr error) {
++	if !c.config.EnableExperimentalRestoreViaCreate {
++		return "", errors.New("checkpoint restore via CreateContainer is disabled by configuration")
++	}
++
+ 	var mountPoint string
+ 	start := time.Now()
+ 	// Ensure that the image to restore the checkpoint from has been provided.
+diff --git a/internal/cri/server/container_checkpoint_linux_test.go b/internal/cri/server/container_checkpoint_linux_test.go
+index 740a52100..5ba9d73ad 100644
+--- a/internal/cri/server/container_checkpoint_linux_test.go
++++ b/internal/cri/server/container_checkpoint_linux_test.go
+@@ -235,3 +235,9 @@ func TestCheckpointArchiveEntryAllowed(t *testing.T) {
+ 		})
+ 	}
+ }
++
++func TestCRImportCheckpointRestoreViaCreateDisabledByDefault(t *testing.T) {
++	c := newTestCRIService()
++	_, err := c.CRImportCheckpoint(context.Background(), nil, nil, nil)
++	require.ErrorContains(t, err, "checkpoint restore via CreateContainer is disabled by configuration")
++}
diff --git a/recipes-containers/containerd/containerd_git.bb b/recipes-containers/containerd/containerd_git.bb
index 48d41dbc..176bdc7e 100644
--- a/recipes-containers/containerd/containerd_git.bb
+++ b/recipes-containers/containerd/containerd_git.bb
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/containerd/containerd;branch=release/2.2;protocol=ht
            file://CVE-2026-53495.patch \
            file://CVE-2026-53493_p1.patch \
            file://CVE-2026-53493_p2.patch \
+           file://CVE-2026-95837.patch \
           "
 
 # Apache-2.0 for containerd
-- 
2.35.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-05 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05  6:03 [meta-virtualization][wrynose][PATCH 1/2] containerd: Fix CVE-2026-95837 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-05  6:03 ` [meta-virtualization][wrynose][PATCH 2/2] containerd: Fix CVE-2026-95838 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-05 16:37 ` [meta-virtualization][wrynose][PATCH 1/2] containerd: Fix CVE-2026-95837 Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.