diff --git a/git-commit b/git-commit index 92d8930d80524c3b323e809f3a260a1dbd7091d6..563348ae7c28dd3a4f1afdbab324d560bd8745cf 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -1251c89d252bb9f8136d47c5892497829e78683f +1b7091b305556e0de2c50f193cd7bf50af035c01 diff --git a/patch/0047-runc-fix-can-t-set-cpuset-cpus-and-cpuset-mems-at-th.patch b/patch/0047-runc-fix-can-t-set-cpuset-cpus-and-cpuset-mems-at-th.patch new file mode 100644 index 0000000000000000000000000000000000000000..a2a2dc3f523046c255dc50ce178c384246d7a624 --- /dev/null +++ b/patch/0047-runc-fix-can-t-set-cpuset-cpus-and-cpuset-mems-at-th.patch @@ -0,0 +1,42 @@ +From 316c33ea56636e2e19be332362973b7def6d1a2a Mon Sep 17 00:00:00 2001 +From: zhongjiawei +Date: Fri, 27 Sep 2024 14:11:49 +0800 +Subject: [PATCH] runc:fix can't set cpuset-cpus and cpuset-mems at the same + time + +--- + libcontainer/cgroups/fs/cpuset.go | 4 +++- + libcontainer/cgroups/fs/cpuset_test.go | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libcontainer/cgroups/fs/cpuset.go b/libcontainer/cgroups/fs/cpuset.go +index 32719600..d33e9f91 100644 +--- a/libcontainer/cgroups/fs/cpuset.go ++++ b/libcontainer/cgroups/fs/cpuset.go +@@ -146,7 +146,9 @@ func (s *CpusetGroup) setCpuset(path, cpuset string) error { + func (s *CpusetGroup) Set(path string, r *configs.Resources) error { + var ret error + if r.CpusetCpus != "" { +- return s.setCpuset(path, r.CpusetCpus) ++ if err := s.setCpuset(path, r.CpusetCpus); err != nil { ++ return err ++ } + } + if r.CpusetMems != "" { + if err := cgroups.WriteFile(path, "cpuset.mems", r.CpusetMems); err != nil { +diff --git a/libcontainer/cgroups/fs/cpuset_test.go b/libcontainer/cgroups/fs/cpuset_test.go +index 0c72c7db..a8a6caae 100644 +--- a/libcontainer/cgroups/fs/cpuset_test.go ++++ b/libcontainer/cgroups/fs/cpuset_test.go +@@ -81,7 +81,7 @@ type cpusetTestCase struct { + + func getCpusetTestcaes() []cpusetTestCase { + testDir := "/sys/fs/cgroup/cpuset/runc-test" +- errStr1 := "failed to set" ++ errStr1 := "failed to stat" + errStr2 := "invalid cpuset format" + errStr3 := "invalid preferred_cpus" + return []cpusetTestCase{ +-- +2.33.0 + diff --git a/runc.spec b/runc.spec index 6cd683a06d4ec1e74056ce4f3eb561e9003f6f3b..8b6348bedc29f20d6461c56e37f1269561502892 100644 --- a/runc.spec +++ b/runc.spec @@ -3,7 +3,7 @@ Name: runc Version: 1.1.8 -Release: 21 +Release: 24 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -57,6 +57,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Sun Sep 29 2024 zhongjiawei - 1.1.8-24 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix can't set cpuset-cpus and cpuset-mems at the same time + * Tue Sep 10 2024 Song Zhang - 1.1.8-21 - Type:CVE - CVE:CVE-2024-45310 diff --git a/series.conf b/series.conf index 9d22af3af5d256fd2de6a119f52fcd6afca168f6..5841a44f7880c4cc42ec8e17cacd740e4748cb4b 100644 --- a/series.conf +++ b/series.conf @@ -42,3 +42,4 @@ patch/0043-runc-do-not-support-set-umask-through-native.umask.patch patch/0044-runc-format-log-instead-panic-when-procError-missing.patch patch/0045-rootfs-consolidate-mountpoint-creation-logic.patch patch/0046-rootfs-try-to-scope-MkdirAll-to-stay-inside-the-root.patch +patch/0047-runc-fix-can-t-set-cpuset-cpus-and-cpuset-mems-at-th.patch