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 684017 - memory leak in quota-3.17-64-bit-quota-support.patch
Summary: memory leak in quota-3.17-64-bit-quota-support.patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: quota
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Petr Pisar
QA Contact: qe-baseos-daemons
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-10 22:10 UTC by Kamil Dudka
Modified: 2015-01-19 13:35 UTC (History)
3 users (show)

Fixed In Version: quota-3.17-15.el6
Doc Type: Bug Fix
Doc Text:
Cause Processing vsfv1 quota file by quota tools (quota, quotacheck) on file system with disabled quota enforcing caused memory leaks. Consequence Processing huge vfsv1 quota file or handling RPC queries on vfsv1 file system with disabled quota enforcing by rpc.rquotad repeatedly for long time period could consume lot of physical memory. Fix When processing vfsv1 quota file, memory is freed properly once it's not needed anymore. Result No memory leaks occur.
Clone Of:
: 684189 (view as bug list)
Environment:
Last Closed: 2011-05-19 14:10:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix ddquot buffer leak (1.27 KB, patch)
2011-03-11 11:49 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0716 0 normal SHIPPED_LIVE quota bug fix and enhancement update 2011-05-18 18:09:46 UTC

Description Kamil Dudka 2011-03-10 22:10:50 UTC
Description of problem:
qtree_read_dquot() calls smalloc(info->dqi_entry_size) to allocate memory that is never freed afterwards.


Version-Release number of selected component (if applicable):
quota-3.17-14.el6

Comment 4 Petr Pisar 2011-03-11 09:56:18 UTC
You are right. The ddquot buffer is allocated, under a condition filled by data and its content parsed and copied into dquot, and then the function exits. So the ddquot buffer should be freed before return.

Upstream development version is affected too.

Comment 5 Petr Pisar 2011-03-11 10:01:28 UTC
The same bug is in qtree_write_dquot() in the same file.

Comment 6 Petr Pisar 2011-03-11 10:20:34 UTC
Reported to upstream with a proposed fix.

Comment 7 Kamil Dudka 2011-03-11 10:48:23 UTC
(In reply to comment #5)
> The same bug is in qtree_write_dquot() in the same file.

You are right.  Neither v2r0_mem2diskdqblk(), nor v2r1_mem2diskdqblk() frees the allocated memory.

Comment 8 Petr Pisar 2011-03-11 11:49:18 UTC
Created attachment 483694 [details]
Fix ddquot buffer leak

Fix submitted to upstream, it applies to RHEL-6 version cleanly, leaks in both functions are covered.

Comment 11 Florian Nadge 2011-03-30 14:24:12 UTC
Hi,
I am reviewing and editing erratum:
http://errata.devel.redhat.com/errata/stateview/10703
and would need some more details for this bug to state all the necessary points.

Could you give a few key words to the points I pasted into the Technical Notes field. Once I have the text I can start on the approval process. 

Thanks

Comment 12 Florian Nadge 2011-03-30 14:24:12 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.

Comment 14 Petr Pisar 2011-03-31 09:01:30 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,9 +1,14 @@
 Cause
-    What actions or circumstances cause this bug to present.
+    Processing vsfv1 quota file by quota tools (quota,
+    quotacheck) on file system with disabled quota
+    enforcing caused memory leaks.
 Consequence
-    What happens when the bug presents.
+    Processing huge vfsv1 quota file or handling RPC
+    queries on vfsv1 file system with disabled quota
+    enforcing by rpc.rquotad repeatedly for long time
+    period could consume lot of physical memory.
 Fix
-    What was done to fix the bug.
+    When processing vfsv1 quota file, memory is freed
+    properly once it's not needed anymore.
 Result
-    What now happens when the actions or circumstances above occur.
+    No memory leaks occur.-    Note: this is not the same as the bug doesn’t present anymore.

Comment 15 errata-xmlrpc 2011-05-19 14:10:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0716.html


Note You need to log in before you can comment on or make changes to this bug.