[Bugs] [Bug 1129939] NetBSD port

bugzilla at redhat.com bugzilla at redhat.com
Sat Apr 11 18:13:04 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1129939



--- Comment #296 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10109 committed in master by Vijay Bellur
(vbellur at redhat.com) 
------
commit d10bd788fada54ad095e19b5aedf949e23fdabb2
Author: Emmanuel Dreyfus <manu at netbsd.org>
Date:   Wed Apr 8 10:49:07 2015 +0200

    crypt xlator: Fix memory coruption after free

    crypt xlator allocated local memory through mem_get0(), but code called
    through STACK_DESTROY()/FRAME_DESTROY() does not expect memory to be
    allocated that way: it will use GF_FREE() even for data allocated by
    mem_get0(), which should be given the mem_put() treatment. As a result,
    allocating using mem_get0(), while relying on FRAME_DESTROY() cleanup
    led to memory corruption.

    Using GF_CALLOC() instead of mem_get0() sets memory allocation on par
    with cleanup code, and crypt.t can pass on NetBSD.

    The initial patch was crafted by Raghavendra Talur.

    BUG: 1129939
    Change-Id: Ib71b4b57f8d1bb782f950e3c8fa74a4f7e10946e
    Signed-off-by: Emmanuel Dreyfus <manu at netbsd.org>
    Reviewed-on: http://review.gluster.org/10109
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle at redhat.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Bugs mailing list