From 9fa924efd78e94b1202c2a591c48a89e4ae26763 Mon Sep 17 00:00:00 2001 From: zhongjiawei Date: Fri, 30 Aug 2024 16:12:33 +0800 Subject: [PATCH] runc:format log instead panic when procError missing payload --- ...instead-panic-when-procError-missing.patch | 33 +++++++++++++++++++ runc.spec | 8 ++++- series.conf | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 patch/0153-runc-format-log-instead-panic-when-procError-missing.patch diff --git a/patch/0153-runc-format-log-instead-panic-when-procError-missing.patch b/patch/0153-runc-format-log-instead-panic-when-procError-missing.patch new file mode 100644 index 0000000..95faac4 --- /dev/null +++ b/patch/0153-runc-format-log-instead-panic-when-procError-missing.patch @@ -0,0 +1,33 @@ +From c9928ac212fd6e436d8e528bc5e9d9fda3fe51d8 Mon Sep 17 00:00:00 2001 +From: zhongjiawei +Date: Fri, 30 Aug 2024 16:10:28 +0800 +Subject: [PATCH] runc:format log instead panic when procError missing payload + +--- + libcontainer/sync.go | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libcontainer/sync.go b/libcontainer/sync.go +index cf7b45b..9b5cd0d 100644 +--- a/libcontainer/sync.go ++++ b/libcontainer/sync.go +@@ -2,6 +2,7 @@ package libcontainer + + import ( + "encoding/json" ++ "errors" + "fmt" + "io" + +@@ -96,7 +97,7 @@ func parseSync(pipe io.Reader, fn func(*syncT) error) error { + return ierr + } + // Programmer error. +- panic("No error following JSON procError payload.") ++ return errors.New("procError missing error payload") + } + + if err := fn(&sync); err != nil { +-- +2.33.0 + diff --git a/runc.spec b/runc.spec index af4d1d2..2460d8b 100644 --- a/runc.spec +++ b/runc.spec @@ -2,7 +2,7 @@ Name: docker-runc Version: 1.0.0.rc3 -Release: 226 +Release: 227 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -41,6 +41,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Fri Aug 30 2024 zhongjiawei - 1.0.0.rc3-227 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:format log instead panic when procError missing payload + * Thu Jul 11 2024 zhongjiawei - 1.0.0.rc3-226 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index acf00ea..e9621b7 100644 --- a/series.conf +++ b/series.conf @@ -144,3 +144,4 @@ 0150-runc-Fix-File-to-Close.patch 0151-runc-Fix-tmpfs-mode-opts-when-dir-already-exis.patch 0152-runc-do-not-support-set-umask-through-native.umask.patch +0153-runc-format-log-instead-panic-when-procError-missing.patch -- Gitee