bugGNU Accounting Utilities - Bugs: bug #56282, [Mayhem] dump-acct crashes with...

 
 

bug #56282: [Mayhem] dump-acct crashes with exit status 139 - Forwarded from Debian

Submitter:  None
Submitted:  Tue 07 May 2019 06:37:59 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 22 Sep 2025 06:08:42 PM UTC, comment #1: 

This is reproducible with the original reporter's supplied reproducer or with the following command line:

printf AAAAAAAAAAAAAAAAAAAAAAAA > temp; dump-acct -r temp

The cause is not considering that the length of the file may not be a multiple of the record size when reading backwards, either because of an incompletely written record at the end or the file being garbage.

The attached fix copes with an incomplete last record and also deals appropriately with not being able to seek/tell in the case of the input being from a pipe. With this fix, the segfault no longer occurs:

$ printf AAAAAAAAAAAAAAAAAAAAAAAA > temp; ./dump-acct -r temp
warning: data beyond last complete record

(file #57676)

Andrew Bower <abower>
Tue 07 May 2019 06:37:59 PM UTC, original submission:  

Hello.

dump-acct crashes with exit status 139. We confirmed the crash by
re-running it in a fresh debian unstable installation.

The attachment contains a testcase (under ./crash) crashing the
program. It ensures that you can easily reproduce the bug. Additionally, under ./crash_info/, we include more information about the crash such as a core dump, the dmesg generated by the crash, and its output.

Regards,
The Mayhem Team (Alexandre Rebert, Thanassis Avgerinos, Sang Kil Cha, David Brumley, Manuel Egele)
Cylab, Carnegie Mellon University

Anonymous

 

Attached Files

Attached Files
file #57676:  fix-reverse-read-incomplete-record.patch added by abower (1.2KiB - text/x-patch - Patch to fix reverse reading with incomplete trailing record)
file #46875:  dump-acct-report.tar.bz2 added by None (21KiB - application/x-bzip)

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by abower (Updated the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-09-22 abower Attached File- Added fix-reverse-read-incomplete-record.patch, #57676
    2019-05-07 None Attached File- Added dump-acct-report.tar.bz2, #46875

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code