Skip to content

Commit 360f8f9

Browse files
authored
Merge pull request #4494 from kolyshkin/12-4490
[1.2] Post overlay addition and dmz removal nits
2 parents 3016408 + 258cd8b commit 360f8f9

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

libcontainer/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Process struct {
4949
// ExtraFiles specifies additional open files to be inherited by the container
5050
ExtraFiles []*os.File
5151

52-
// open handles to cloned binaries -- see dmz.ClonedBinary for more details
52+
// open handles to cloned binaries -- see dmz.CloneSelfExe for more details
5353
clonedExes []*os.File
5454

5555
// Initial sizings for the console

libcontainer/setns_init_linux.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ func (l *linuxSetnsInit) Init() error {
150150
// (otherwise the (*os.File) finaliser could close the wrong file). See
151151
// CVE-2024-21626 for more information as to why this protection is
152152
// necessary.
153-
//
154-
// This is not needed for runc-dmz, because the extra execve(2) step means
155-
// that all O_CLOEXEC file descriptors have already been closed and thus
156-
// the second execve(2) from runc-dmz cannot access internal file
157-
// descriptors from runc.
158153
if err := utils.UnsafeCloseFrom(l.config.PassedFilesCount + 3); err != nil {
159154
return err
160155
}

libcontainer/standard_init_linux.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,6 @@ func (l *linuxStandardInit) Init() error {
284284
// (otherwise the (*os.File) finaliser could close the wrong file). See
285285
// CVE-2024-21626 for more information as to why this protection is
286286
// necessary.
287-
//
288-
// This is not needed for runc-dmz, because the extra execve(2) step means
289-
// that all O_CLOEXEC file descriptors have already been closed and thus
290-
// the second execve(2) from runc-dmz cannot access internal file
291-
// descriptors from runc.
292287
if err := utils.UnsafeCloseFrom(l.config.PassedFilesCount + 3); err != nil {
293288
return err
294289
}

script/check-config.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ flags=(
241241

242242
# required for bind-mounting /dev/mqueue into containers
243243
POSIX_MQUEUE
244+
245+
# Most containers use overlayfs, and now runc itself uses it.
246+
OVERLAY_FS
244247
)
245248
check_flags "${flags[@]}"
246249

0 commit comments

Comments
 (0)