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.
DescriptionRob Rozestraten
2018-08-24 16:51:33 UTC
Description of problem:
audisp-remote heap fills up when krb5 is enabled.
[root(rdosogne)@sitea-db3 ~]# ps auwwxf | grep audisp-remot[e]
root 20519 0.9 39.4 26024224 25912716 ? S< Jul10 302:16 \_ /sbin/audisp-remote
7f68637e0000-7f6eb0567000 rw-p 00000000 00:00 0 [heap]
Size: 26424860 kB
Rss: 26222544 kB
Pss: 26222544 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 26222544 kB
Referenced: 23867740 kB
Anonymous: 26222544 kB
AnonHugePages: 23259136 kB
Swap: 202212 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac sd
Version-Release number of selected component (if applicable):
2.8.1-3
How reprducible:
Use audisp-remote with krb5 enabled.
Steps to Reproduce:
1. Setup audispd to use audisp-remote
2. Enable krb5 in audisp-remote.conf
3. Make a lot of audit log entries
Actual results:
audisp-remote heap grows forever (reached 27G on a db box within a couple weeks).
Expected results:
audisp-remote heap not growing uncontrollably.
Additional info:
It appears this is happening from etok.value in recv_token not being free'd (audisp/plugins/remote/audisp-remote.c). Tested patch where we free this in recv_msg_gss (alongside utok.value) with no further leakage. Heap stayed at a paltry 184K during rigorous logging tests.
Pull request submitted here: https://github.com/linux-audit/audit-userspace/pull/61
Before (running ~ 15 seconds):
==15473== 2,631,956 bytes in 34,631 blocks are definitely lost in loss record 185 of 185
==15473== at 0x4C29C23: malloc (vg_replace_malloc.c:299)
==15473== by 0x10B69F: recv_token (audisp-remote.c:658)
==15473== by 0x10B86F: recv_msg_gss (audisp-remote.c:1278)
==15473== by 0x10CBFC: relay_sock_managed (audisp-remote.c:1500)
==15473== by 0x10D0AE: relay_sock (audisp-remote.c:1559)
==15473== by 0x10D0AE: relay_event (audisp-remote.c:1580)
==15473== by 0x10D0AE: send_one (audisp-remote.c:440)
==15473== by 0x10AE58: main (audisp-remote.c:599)
==15473==
==15473== LEAK SUMMARY:
==15473== definitely lost: 2,633,044 bytes in 34,640 blocks
==15473== indirectly lost: 9,934 bytes in 51 blocks
==15473== possibly lost: 76 bytes in 1 blocks
==15473== still reachable: 14,290 bytes in 189 blocks
==15473== suppressed: 0 bytes in 0 blocks
After (running ~ 30 mins):
==24368== LEAK SUMMARY:
==24368== definitely lost: 1,088 bytes in 9 blocks
==24368== indirectly lost: 9,934 bytes in 51 blocks
==24368== possibly lost: 0 bytes in 0 blocks
==24368== still reachable: 14,311 bytes in 189 blocks
==24368== suppressed: 0 bytes in 0 blocks
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-2019:2191