!249 [sync] PR-244: runc:check cmd exist
From: @openeuler-sync-bot Reviewed-by: @zhangsong234 Signed-off-by: @zhangsong234
This commit is contained in:
commit
57d46706c4
36
patch/0149-runc-check-cmd-exist.patch
Normal file
36
patch/0149-runc-check-cmd-exist.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From aff0fc10d4e651b722b40950c794435c55a33034 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhongjiawei <zhongjiawei1@huawei.com>
|
||||||
|
Date: Mon, 5 Feb 2024 17:24:25 +0800
|
||||||
|
Subject: [PATCH] runc:check cmd exist
|
||||||
|
|
||||||
|
---
|
||||||
|
libcontainer/setns_init_linux.go | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libcontainer/setns_init_linux.go b/libcontainer/setns_init_linux.go
|
||||||
|
index e38165d..74a91a6 100644
|
||||||
|
--- a/libcontainer/setns_init_linux.go
|
||||||
|
+++ b/libcontainer/setns_init_linux.go
|
||||||
|
@@ -6,6 +6,7 @@ package libcontainer
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
+ "os/exec"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/opencontainers/runc/libcontainer/apparmor"
|
||||||
|
@@ -64,6 +65,11 @@ func (l *linuxSetnsInit) Init() error {
|
||||||
|
if err := finalizeNamespace(l.config); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
+ // Check for the arg early to make sure it exists.
|
||||||
|
+ _, err := exec.LookPath(l.config.Args[0])
|
||||||
|
+ if err != nil {
|
||||||
|
+ return err
|
||||||
|
+ }
|
||||||
|
if err := apparmor.ApplyProfile(l.config.AppArmorProfile); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: docker-runc
|
Name: docker-runc
|
||||||
Version: 1.0.0.rc3
|
Version: 1.0.0.rc3
|
||||||
Release: 223
|
Release: 224
|
||||||
Summary: runc is a CLI tool for spawning and running containers according to the OCI specification.
|
Summary: runc is a CLI tool for spawning and running containers according to the OCI specification.
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -41,6 +41,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc
|
|||||||
%{_bindir}/runc
|
%{_bindir}/runc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 5 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.0.0.rc3-224
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:check cmd exist
|
||||||
|
|
||||||
* Thu Feb 1 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.0.0.rc3-223
|
* Thu Feb 1 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.0.0.rc3-223
|
||||||
- Type:CVE
|
- Type:CVE
|
||||||
- CVE:CVE-2024-21626
|
- CVE:CVE-2024-21626
|
||||||
|
|||||||
@ -140,3 +140,4 @@
|
|||||||
0146-runc-delete-do-not-ignore-error-from-destroy.patch
|
0146-runc-delete-do-not-ignore-error-from-destroy.patch
|
||||||
0147-runc-libct-Destroy-don-t-proceed-in-case-of-errors.patch
|
0147-runc-libct-Destroy-don-t-proceed-in-case-of-errors.patch
|
||||||
0148-runc-fix-CVE-2024-21626.patch
|
0148-runc-fix-CVE-2024-21626.patch
|
||||||
|
0149-runc-check-cmd-exist.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user