Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1591141

Summary: abrt-action-save-package-data dies in segfault
Product: Red Hat Enterprise Linux 7 Reporter: Renaud Métrich <rmetrich>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED ERRATA QA Contact: Martin Kyral <mkyral>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: mkyral, mmarusak
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:41:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2018-06-14 07:19:56 UTC
Description of problem:

When searching for the GPGKeysDir entry in /etc/abrt/gpg_keys.conf, not finding the entry results in comparing against a NULL pointer:

Core was generated by `abrt-action-save-package-data'.
Program terminated with signal 11, Segmentation fault.
#0  load_gpg_keys () at abrt-action-save-package-data.c:91
91	    if (strcmp(gpg_keys_dir, "") != 0)

(gdb) disassemble
...
   0x0000561da0a4fe64 <+964>:	mov    %rbp,%rdi
   0x0000561da0a4fe67 <+967>:	callq  0x561da0a4f8d0 <g_hash_table_lookup@plt>
=> 0x0000561da0a4fe6c <+972>:	cmpb   $0x0,(%rax)

(gdb) printf "0x%lx\n", $rax
0x0

(gdb) list
86	        error_msg("Can't load '%s'", GPG_CONF);
87	        return;
88	    }
89	
90	    const char *gpg_keys_dir = get_map_string_item_or_NULL(settings, "GPGKeysDir");
91	    if (strcmp(gpg_keys_dir, "") != 0)

--> Line 91: comparison against NULL pointer ("gpg_keys_dir")


Version-Release number of selected component (if applicable):

abrt-2.1.11-50.el7.x86_64 but also previous releases


How reproducible:

Don't know how to build "GPGKeysDir" to make that fail.


Additional info:

get_map_string_item_or_empty() should be used instead of get_map_string_item_or_NULL.

Comment 2 Matej Habrnal 2018-06-14 12:48:44 UTC
Thank you for the bug report!

This commit fixes this bug
https://github.com/abrt/abrt/commit/22516be4cea566c3eafc73e318e035defe59cea5

Will be backported to RHEL 7.6

Comment 8 errata-xmlrpc 2018-10-30 11:41:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3285