Your message dated Sat, 06 Jan 2024 07:04:13 +0000
with message-id <e1rm0j7-007omo...@fasolo.debian.org>
and subject line Bug#1053731: fixed in atop 2.10.0-1
has caused the Debian Bug report #1053731,
regarding atop crashes with a floating point exception when atopaccdt service 
fails
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1053731: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053731
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: atop
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu mantic ubuntu-patch
X-Debbugs-Cc: vladimir.pe...@canonical.com

Dear Maintainer,

When the atopacctd service crashes, it may leave a 0-length shadow file.
atopacctd() routine tries to read it and fails. It returns 1 (success)
and sets maxshadowrec size to the size from the 'current' file. The rest
of the code assumes that the shadow file read was successful and tries
to use an empty acct structure, causing a division by zero.
This was reproduced during armhf autopkgtest in Ubuntu because atopacctd did
not have sufficient permissions to run.
The issue was fixed upstream and the commit was applied as a patch.

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/atopacctd_return_error.patch: apply upstream patch to fix SIGFPE in
    acctprocnt() (LP: #1725896, LP: #2037910).


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers lunar-updates
  APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar'), 
(100, 'lunar-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.2.0-34-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru atop-2.9.0/debian/patches/atopacctd_return_error.patch 
atop-2.9.0/debian/patches/atopacctd_return_error.patch
--- atop-2.9.0/debian/patches/atopacctd_return_error.patch      1970-01-01 
12:00:00.000000000 +1200
+++ atop-2.9.0/debian/patches/atopacctd_return_error.patch      2023-10-05 
15:25:12.000000000 +1300
@@ -0,0 +1,31 @@
+Description: Avoid floating point exception when atopacctd fails
+ When the atopacctd service crashes, it may leave a 0-length shadow file.
+ atopacctd() routine tries to read it and fails. It returns 1 (success)
+ and sets maxshadowrec size to the size from the 'current' file. The rest
+ of the code assumes that the shadow file read was successful and tries
+ to use an empty acct structure, causing a division by zero.
+Author: Gerlof Langeveld <gerlof.langev...@atoptool.nl>
+Bug: https://github.com/Atoptool/atop/issues/277
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/atop/+bug/2037910
+Applied-Upstream: 
https://github.com/Atoptool/atop/commit/f72f7c06278ec9ad2209975eca67c2e3c0b3a44b
+Last-Update: 2023-10-08
+--- a/acctproc.c
++++ b/acctproc.c
+@@ -430,7 +430,6 @@ atopacctd(int swon)
+                               {
+                                       if ( swon && !acctvers(acctfd) )
+                                       {
+-
+                                               int maxcnt = 40;
+
+                                               if ( fork() == 0 )
+@@ -453,7 +452,8 @@ atopacctd(int swon)
+                                                               &semunlock, 1);
+
+                                                       regainrootprivs();
+-                                                      return 1;
++                                                      maxshadowrec = 0;
++                                                      return -1;  // try other
+                                               }
+                                       }
+
diff -Nru atop-2.9.0/debian/patches/series atop-2.9.0/debian/patches/series
--- atop-2.9.0/debian/patches/series    2023-07-02 02:37:19.000000000 +1200
+++ atop-2.9.0/debian/patches/series    2023-10-05 15:25:12.000000000 +1300
@@ -15,3 +15,4 @@
 no-atopgpud
 handle-default-file
 default
+atopacctd_return_error.patch

--- End Message ---
--- Begin Message ---
Source: atop
Source-Version: 2.10.0-1
Done: Marc Haber <mh+debian-packa...@zugschlus.de>

We believe that the bug you reported is fixed in the latest version of
atop, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1053...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marc Haber <mh+debian-packa...@zugschlus.de> (supplier of updated atop package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 06 Jan 2024 07:07:38 +0100
Source: atop
Architecture: source
Version: 2.10.0-1
Distribution: unstable
Urgency: medium
Maintainer: Marc Haber <a...@packages.debian.org>
Changed-By: Marc Haber <mh+debian-packa...@zugschlus.de>
Closes: 1053731
Changes:
 atop (2.10.0-1) unstable; urgency=medium
 .
   * new upstream version 2.10.0
     * avoids floating point exception when atopacctd fails.
       Thanks to Witold Baryluk (Closes: #1053731)
   * refresh patches
   * add libglib2.0-dev to build-depends
   * remove unnecessary lintian override
   * properly use dpkg-buildflags
   * add new patch that honors locally set LDFLAGS
Checksums-Sha1:
 5b7518484b98c354a1905155c7182d6e44690969 1913 atop_2.10.0-1.dsc
 bb97dc2ccf1019fb05dccb09dfdd9c7c70672d0e 304111 atop_2.10.0.orig.tar.gz
 f97541d8044492b53f5675cb1218f29cf1b4ce7b 16268 atop_2.10.0-1.debian.tar.xz
 000dd91a8d76c200c0d1e7de95e9d1579d768d11 6944 atop_2.10.0-1_source.buildinfo
Checksums-Sha256:
 696052f5344c1c0b764f75df1f0fd847765a3ca6e778d880e2522c2310fb3d8a 1913 
atop_2.10.0-1.dsc
 e7a673cf2c82578e7dd82ecb0dec83fd9ecb30828b2561c28a9fa5aaf75d5f93 304111 
atop_2.10.0.orig.tar.gz
 4bef8e6f3296cf4090944fd95e18eb8799bbd1b4dfdb12bb22fc88f8250d100b 16268 
atop_2.10.0-1.debian.tar.xz
 7c874741b29b998d85b91d8103d09fb6f5f4a3117a0946384999a618e4e1bbf0 6944 
atop_2.10.0-1_source.buildinfo
Files:
 d8a323897db23d9c67d6245793073aec 1913 admin optional atop_2.10.0-1.dsc
 6d14559b59e25d15dbcfa978ed0ec50e 304111 admin optional atop_2.10.0.orig.tar.gz
 859f7a326f07ec2ba822fb14de4a2cef 16268 admin optional 
atop_2.10.0-1.debian.tar.xz
 51838de0b97127ebcf99cc8a0ad3679d 6944 admin optional 
atop_2.10.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE6QL5UJ/L0pcuNEbjj3cgEwEyBEIFAmWY9eMACgkQj3cgEwEy
BEKMYA//UI70uUAqvovghmsFivzVBVeApi/RJvlfk7oVAMWsh4W9YZN6ofpXXjKf
LjHzGBZbq9VmoPfO947+hWWs+VPG1PclWCdmKm7kt3jIXYS9XoKKnoJElbvwlBax
SI3TibSoBwj8egW/eokhVPf5zDa7aOemYBiIOUYQCZ22DjlgXw469iGZzI3cbhEb
ES5TpQuI8H42ObahL2KKr2LV5IT24kFqJgktOow+2FfVrzAIv8m0jasV2XKIuU9r
V3uf0uJ0Upy7p21NjHkzBwFx1Rt04iJfp/HOpUpe2Qc6gXWzPo4Z7r1de2yEDMDH
I+C82tbugbZCcb2gWotXFFiYn6snxlm57BeKJguDaIJRvoAHQhGtHQjW/F2tUqRB
Lclp49Fe+b6ihgiU+4EN7blBxVfpfcIhkDQGUHEwKX9QO3/88avFRe11Rk0Ga4sE
XTuJ3CvOwGZfr3Xx3b2BGOaCE9zGVZJkcT3baHCswH3WVzzm6CyPQNPMjOJkcn/x
nRXPZxxGHi46BtJfwXyWx1evFgHtTmTKTBg14J9/nygUq2/i7PlRHWXJO9od4xVn
N5xO6VnQz8RS9cej/YgAyPSC4qVKuROP/OltnJ3LVU5fATW6kwo2XMAgENaBFUBR
vSgGdSyO8pJ6d2GuI1hDcxJ6OCwxxOVgI9YeHezDA7UDmpg2fVc=
=7wpW
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to