diff --git a/0002-Fix-the-invalid-memory-address-reference.patch b/0002-Fix-the-invalid-memory-address-reference.patch new file mode 100644 index 0000000000000000000000000000000000000000..0373f10cc836c156d7039dad041198952a358877 --- /dev/null +++ b/0002-Fix-the-invalid-memory-address-reference.patch @@ -0,0 +1,31 @@ +From a9e6a71f9435a50c582993e946be4d53828bb48d Mon Sep 17 00:00:00 2001 +From: maminjie +Date: Sat, 13 Mar 2021 16:03:03 +0800 +Subject: [PATCH] Fix the invalid memory address or nil pointer reference + +--- + libpod/stats.go | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/libpod/stats.go b/libpod/stats.go +index c58a461..97a2169 100644 +--- a/libpod/stats.go ++++ b/libpod/stats.go +@@ -57,9 +57,11 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container + previousCPU := previousStats.CPUNano + previousSystem := previousStats.SystemNano + stats.CPU = calculateCPUPercent(cgroupStats, previousCPU, previousSystem) +- stats.MemUsage = cgroupStats.Memory.Usage.Usage +- stats.MemLimit = getMemLimit(cgroupStats.Memory.Usage.Limit) +- stats.MemPerc = (float64(stats.MemUsage) / float64(stats.MemLimit)) * 100 ++ if cgroupStats.Memory != nil { ++ stats.MemUsage = cgroupStats.Memory.Usage.Usage ++ stats.MemLimit = getMemLimit(cgroupStats.Memory.Usage.Limit) ++ stats.MemPerc = (float64(stats.MemUsage) / float64(stats.MemLimit)) * 100 ++ } + stats.PIDs = 0 + if conState == ContainerStateRunning { + stats.PIDs = cgroupStats.Pids.Current +-- +2.23.0 + diff --git a/podman.spec b/podman.spec index 3a353d8b7b3e55a6c54c394d074280fa1db2bd8d..459c84356e2f274f8a7fb8723bde5efd0edfd0d3 100644 --- a/podman.spec +++ b/podman.spec @@ -1,6 +1,6 @@ Name: podman Version: 0.10.1 -Release: 7 +Release: 8 Summary: A daemonless container engine for managing Containers Epoch: 1 License: ASL 2.0 @@ -114,6 +114,7 @@ Patch2: CVE-2021-20188-PRE1.patch Patch3: CVE-2021-20188-PRE2.patch Patch4: CVE-2021-20188-PRE3.patch Patch5: CVE-2021-20188.patch +Patch6: 0002-Fix-the-invalid-memory-address-reference.patch %description Podman manages the entire container ecosystem which includes pods, @@ -222,6 +223,9 @@ install -Dp -m644 libpod.conf %{buildroot}%{_datadir}/containers/libpod.conf %{_mandir}/man5/*.5* %changelog +* Sat Mar 13 2021 maminjie - 1:0.10.1-8 +- Fix the invalid memory address reference + * Thu Mar 4 2021 wangxiao - 1:0.10.1-7 - Fix CVE-2021-20188