From 726d5ec8206ff244ed2eda65450bf8c5761fdc36 Mon Sep 17 00:00:00 2001 From: zhongjiawei Date: Fri, 30 Aug 2024 16:08:44 +0800 Subject: [PATCH] runc:format log instead panic when procError missing payload (cherry picked from commit 3e6d985df0056574bc1f8bd4b8fe2c52544ede68) --- git-commit | 2 +- ...instead-panic-when-procError-missing.patch | 25 +++++++++++++++++++ runc.spec | 8 +++++- series.conf | 1 + 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 patch/0056-runc-format-log-instead-panic-when-procError-missing.patch diff --git a/git-commit b/git-commit index 0cee8d1..e9525fd 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -730600d399df40399622cdf301a5bcf159b71a9f +757473cdeea474eec67d70dcefa3b9c90ba51ce1 diff --git a/patch/0056-runc-format-log-instead-panic-when-procError-missing.patch b/patch/0056-runc-format-log-instead-panic-when-procError-missing.patch new file mode 100644 index 0000000..5699852 --- /dev/null +++ b/patch/0056-runc-format-log-instead-panic-when-procError-missing.patch @@ -0,0 +1,25 @@ +From 46b7c30e013c15fc254a17e5151f05c99da6def4 Mon Sep 17 00:00:00 2001 +From: zhongjiawei +Date: Fri, 30 Aug 2024 15:55:15 +0800 +Subject: [PATCH] runc:format log instead panic when procError missing payload + +--- + libcontainer/sync.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcontainer/sync.go b/libcontainer/sync.go +index 25dc286..e6029fd 100644 +--- a/libcontainer/sync.go ++++ b/libcontainer/sync.go +@@ -115,7 +115,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 769e442..85fdc94 100644 --- a/runc.spec +++ b/runc.spec @@ -3,7 +3,7 @@ Name: runc Version: 1.1.3 -Release: 28 +Release: 29 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -54,6 +54,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Fri Aug 30 2024 zhongjiawei - 1.1.3-29 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:format log instead panic when procError missing payload + * Thu Jul 11 2024 zhongjiawei - 1.1.3-28 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index 3b448db..64a79bf 100644 --- a/series.conf +++ b/series.conf @@ -53,3 +53,4 @@ patch/0052-runc-check-cmd-exist.patch patch/0053-runc-fix-CVE-2024-3154.patch patch/0054-runc-Set-temporary-single-CPU-affinity-before-cgroup-cpus.patch patch/0055-runc-do-not-support-set-umask-through-native.umask.patch +patch/0056-runc-format-log-instead-panic-when-procError-missing.patch -- Gitee