[packages/atop] Up to 2.13.0

arekm arekm at pld-linux.org
Thu Oct 29 08:24:57 CET 2026


commit 5f533b8d72e62f0fae8ff839f0006853fedd1395
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Oct 29 00:41:45 2026 +0100

    Up to 2.13.0
    
    Fixes CVE-2025-31160.

 atop-cgroups-opendir.patch | 33 ++++++++++++++++++++++++++++++++
 atop-drawbar-fpe.patch     | 47 ++++++++++++++++++++++++++++++++++++++++++++++
 atop.spec                  | 20 +++++++++++++-------
 3 files changed, 93 insertions(+), 7 deletions(-)
---
diff --git a/atop.spec b/atop.spec
index 8dc96b1..50217dd 100644
--- a/atop.spec
+++ b/atop.spec
@@ -3,15 +3,20 @@
 Summary:	AT Computing System and Process Monitor
 Summary(pl.UTF-8):	Monitor obciążenia systemu alternatywny dla programu top
 Name:		atop
-Version:	2.7.1
+Version:	2.13.0
 Release:	1
 License:	GPL v2+
 Group:		Applications/System
-Source0:	http://www.atoptool.nl/download/%{name}-%{version}.tar.gz
-# Source0-md5:	25b41209435da224e4509dcc12bba328
+Source0:	https://www.atoptool.nl/download/%{name}-%{version}.tar.gz
+# Source0-md5:	fbebe2c00e4407f07d64d2f903db6355
+# https://github.com/Atoptool/atop/commit/c0034e64f879a317077ccbb3b9e2388d9fc6e29e
+Patch0:		%{name}-cgroups-opendir.patch
+# https://github.com/Atoptool/atop/commit/b5bd37cdfa0b8a8a42382e713397025a1049606e
+Patch1:		%{name}-drawbar-fpe.patch
 URL:		https://www.atoptool.nl/
+BuildRequires:	glib2-devel
 BuildRequires:	ncurses-devel
-BuildRequires:	sed >= 4.0
+BuildRequires:	pkgconfig
 BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +38,8 @@ również które procesy są odpowiedzialne za generowane obciążenie
 
 %prep
 %setup -q
-
-%{__sed} -i -e '/chown root/d' Makefile
+%patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__make} \
@@ -59,10 +64,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHOR ChangeLog README
+%doc AUTHORS ChangeLog README
 %attr(755,root,root) %{_bindir}/atop
 %attr(755,root,root) %{_bindir}/atopcat
 %attr(755,root,root) %{_bindir}/atopconvert
+%attr(755,root,root) %{_bindir}/atophide
 %attr(755,root,root) %{_bindir}/atopsar
 %attr(755,root,root) %{_sbindir}/atopacctd
 %attr(755,root,root) %{_sbindir}/atopgpud
diff --git a/atop-cgroups-opendir.patch b/atop-cgroups-opendir.patch
new file mode 100644
index 0000000..6a3867e
--- /dev/null
+++ b/atop-cgroups-opendir.patch
@@ -0,0 +1,33 @@
+From c0034e64f879a317077ccbb3b9e2388d9fc6e29e Mon Sep 17 00:00:00 2001
+From: Bui Quang Minh <minhquangbui99 at gmail.com>
+Date: Fri, 4 Sep 2026 21:27:45 +0700
+Subject: [PATCH] cgroups: check the returned value of opendir
+
+We have an unusual case when a cgroup controller directory grants other
+users with execute (x) permission but without read (r) permission. As a
+result, when running atop as a user who is not the owner of the
+directory, we succeed in the chdir but fail on opendir. Therefore,
+opendir returns NULL and leads to a crash. This commit checks the
+returned value of opendir and returns error when the value is NULL to
+avoid the crash.
+---
+ cgroups.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/cgroups.c b/cgroups.c
+index 434a0043..a7108028 100644
+--- a/cgroups.c
++++ b/cgroups.c
+@@ -375,6 +375,12 @@ walkcgroup(char *dirname, struct cgchainer *cparent, int parentseq,
+ 	//
+ 	dirp = opendir(".");
+ 
++	// If we don't have read permission in this directory,
++	// the opendir fails. Return error in that case.
++	//
++	if (!dirp)
++		return -1;
++
+ 	while ( (entp = readdir(dirp)) )
+ 	{
+ 		// skip dot files/directories
diff --git a/atop-drawbar-fpe.patch b/atop-drawbar-fpe.patch
new file mode 100644
index 0000000..4437d40
--- /dev/null
+++ b/atop-drawbar-fpe.patch
@@ -0,0 +1,47 @@
+From b5bd37cdfa0b8a8a42382e713397025a1049606e Mon Sep 17 00:00:00 2001
+From: Gerlof Langeveld <gerlof.langeveld at atoptool.nl>
+Date: Fri, 9 Oct 2026 18:16:42 +0200
+Subject: [PATCH] Solve FPE when terminal lines >= 125 (solves #416)
+
+When the number of terminal lines is greater than 124 more than
+100 lines are used for the PSI bar of memory in bar graph mode.
+The bar has been limited to a height of 100 now.
+Besides, the height of the CPU and disk graphs (that show
+percentages) was limited to 25 lines. This has been increased
+to 100 lines.
+---
+ drawbar.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drawbar.c b/drawbar.c
+index 651a81ec..6b8c7346 100644
+--- a/drawbar.c
++++ b/drawbar.c
+@@ -164,7 +164,7 @@ static WINDOW 	*headwin, *midline, *colupper, *collower;
+ // struct for calling drawvertbars()
+ //
+ #define	MAXCAT		5	// maximum number of categories within one bar
+-#define	MAXHEIGHT	25	// maximum bar height in lines
++#define	MAXHEIGHT	100	// maximum bar height in lines
+ 
+ struct vertval {
+ 	int	barval;			// total value of bar
+@@ -1251,7 +1251,7 @@ drawvertbars(   struct perwindow *w,
+ 	int 	i, j, curline, curcol, barlines, realbars,
+ 		realcols, availcols, needcols;
+ 	int	autoscale, color, labwidth = 0, spacing = 1;
+-	float	valperunit, level;
++	double	valperunit, level;
+ 	int	ytitlelen  = strlen(ytitle), xtitlelen  = strlen(xtitle);
+ 	int	ytitleline, xtitlespace;
+ 	int	scalelen = snprintf(buf, sizeof buf, "%d", (int)barscale),
+@@ -2237,6 +2237,9 @@ drawmemory(struct perwindow *w, struct sstat *sstat, int nsecs,
+ 
+ 		if (psilines < 7)	// not enough lines?
+ 			psilines = 7;
++
++		if (psilines > MAXHEIGHT)
++			psilines = MAXHEIGHT;
+ 	}
+ 	else
+ 	{
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/atop.git/commitdiff/5f533b8d72e62f0fae8ff839f0006853fedd1395



More information about the pld-cvs-commit mailing list