I'm hoping to get this fixed in noble - otherwise these tools will be
unusable for the lifecycle of this LTS. Below is the SRU template.
Please let me know if additional information is required.

[ Impact ]

The userspace processes lastcomm and dump-acct in the acct package are
currently unusable on noble. This results in an inability to effectively
process accounting data written by the kernel.

The bug is a buffer overflow in the dev_hash.c code, which this patch
fixes by adding an additional sizeof(char) to the fullname buffer to
account for the added "/" character in the subsequent sprintf().

[ Test Plan ]

To reproduce:

* Install Ubuntu noble
* Install the acct package
apt install acct
* Ensure process accounting is enabled
accton on
* Run lastcomm to get a list executed commands or dump-acct to dump the acct 
file
lastcomm
dump-acct /var/log/account/pacct
* Process will terminate with a buffer overflow
*** buffer overflow detected ***: terminated
Aborted (core dumped)

Once the fixed package is installed, running lastcomm will succeed and
produce a list of executed commands. Running dump-acct will succeed and
dump the acct file in human-readable format.

[ Where problems could occur ]

This is a fairly trivial buffer overflow fix and is unlikely to break
anything else. This code only affects the acct userspace processes,
which are currently unusable.

I have tested this patch on several noble systems, and it properly
corrects the bug without introducing any other problems.

[ Other Info ]

This patch has been applied to RedHat/Fedora since May 2023 and Gentoo
since March 2024, with no apparent problems reported.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2095035

Title:
  lastcomm buffer overflow detected terminated

To manage notifications about this bug go to:
https://bugs.launchpad.net/acct/+bug/2095035/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to