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 606335 - glibc detected *** corosync: malloc(): memory corruption
Summary: glibc detected *** corosync: malloc(): memory corruption
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: corosync
Version: 6.0
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jan Friesse
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 271561
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-21 12:50 UTC by Milos Malik
Modified: 2010-11-10 22:07 UTC (History)
3 users (show)

Fixed In Version: corosync-1.2.3-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 22:07:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (970 bytes, patch)
2010-06-22 09:13 UTC, Jan Friesse
no flags Details | Diff

Description Milos Malik 2010-06-21 12:50:04 UTC
Description of problem:


Version-Release number of selected component (if applicable):
corosync-1.2.3-2.el6.i686
corosynclib-1.2.3-2.el6.i686

How reproducible:
always

Steps to Reproduce:
# mv /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf
# service corosync status
corosync is stopped
# service corosync start
Starting Corosync Cluster Engine (corosync): *** glibc detected *** corosync: free(): invalid next size (fast): 0x09b34138 ***
*** glibc detected *** corosync: malloc(): memory corruption: 0x09b34148 ***

  
Actual results:


Expected results:

Comment 3 Steven Dake 2010-06-21 16:47:07 UTC
Did you set selinux to permissive before reproducing this bug?  There are currently issues with selinux and service corosync start.  Can you try corosync -f instead?

Comment 4 Nate Straz 2010-06-21 17:21:45 UTC
SELinux issues for the entire cluster stack are being handled in bug 271561.  There is currently one outstanding issue regarding the way corosync libraries create a communications socket with corosync.

Comment 5 Steven Dake 2010-06-21 19:27:49 UTC
The issue with corosync and selinux ATM is that service corosync start doesn't start creating all sorts of AVC denials.

Milos,

Can you verify you tried with permissive mode and received this error?

Comment 6 Milos Malik 2010-06-22 06:19:33 UTC
This bug seems to be reproducible in enforcing mode only:

# setenforce 0
# service corosync start
Starting Corosync Cluster Engine (corosync): [  OK  ]
# service corosync stop
Signaling Corosync Cluster Engine (corosync) to terminate: [  OK  ]
Waiting for corosync services to unload:.[  OK  ]
# setenforce 1
# service corosync start
Starting Corosync Cluster Engine (corosync): *** glibc detected *** corosync: free(): invalid next size (fast): 0x094dc260 ***
*** glibc detected *** corosync: malloc(): memory corruption: 0x094dc270 ***

Comment 7 Jan Friesse 2010-06-22 09:13:27 UTC
Created attachment 425871 [details]
Proposed patch

Main problem was hidden in calling pathconf (internally calls statfs) which fails. After this fail, newly allocated memory for readdir_r was smaller than expected and memory was overwritten by readdir_r.

Patch removes calling of pathconf and rather use NAME_MAX constant which is always large enough for all file systems.

Also return value of malloc SHOULD be checked.

Comment 8 Jan Friesse 2010-06-23 08:45:58 UTC
Patch committed revision 2962.

Comment 10 Nate Straz 2010-07-08 20:58:35 UTC
[root@morph-01 ~]# rpm -q corosync
corosync-1.2.3-9.el6.i686
[root@morph-01 ~]# setenforce 1
[root@morph-01 ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          permissive
Policy version:                 24
Policy from config file:        targeted
[root@morph-01 ~]# service corosync start
Starting Corosync Cluster Engine (corosync): [  OK  ]
[root@morph-01 ~]# service corosync status
corosync (pid  1820) is running...

Comment 11 releng-rhel@redhat.com 2010-11-10 22:07:16 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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