bugTiger UNIX security tool - Bugs: bug #34028, check_signatures $loc_signature...


bug #34028: check_signatures $loc_signature variable assignment

Submitted by:  pyllyukko <pyllyukko>
Submitted on:  Tue 16 Aug 2011 07:26:14 PM UTC  
Category:  Security check modules Severity:  5-Critical
Item Group:  Script error Status:  Fixed
Privacy:  Public Assigned to:  Javier Fernandez-Sanguino Peña <jfs>
Open/Closed:  Open Operating System:  Any Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 04 Feb 2018 08:36:32 PM UTC, comment #1: 

Thank for the patch. I have used it to fix the script. The push has been submitted to GIT.

Javier Fernandez-Sanguino Peña <jfs>
Project AdministratorIn charge of this item.
Tue 16 Aug 2011 07:26:14 PM UTC, original submission:  

There is a bug in the check_signatures script in the part where the variable $loc_signature is assigned. The output of md5sum is assigned to this variable and md5sum also outputs the source where the hash was computed instead of just the hash.

From MD5SUM(1): "The default mode is to print a line with checksum, a character indicating type (`*' for binary, ` ' for text), and name for each FILE."

In this case the input (or the FILE) is STDIN which is represented as a hyphen.

So the actual check in the Bash script looks like this:
+ '[' '<hash>  -' = <hash> ']'
And this produces sig004w false positives out of every file it

This can be easily fixed by using Awk. See the attached patch file.

pyllyukko <pyllyukko>


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

Attach Files:

Attached Files
file #23818:  check_signatures.patch added by pyllyukko (518B - text/x-diff)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jfs (Posted a comment)
  • -email is unavailable- added by pyllyukko (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-04 jfs StatusNone => Fixed
        Assigned toNone => jfs
    2011-08-16 pyllyukko Carbon-CopyRemoved pyllyukko => -
    2011-08-16 pyllyukko Attached File- => Added check_signatures.patch, #23818
    2011-08-16 pyllyukko Carbon-Copy- => Added pyllyukko

    Back to the top

    Powered by Savane 3.6