[Bugs] [Bug 1503394] New: Mishandling null check at send_brick_req of glusterfsd/ src/gf_attach.c

bugzilla at redhat.com bugzilla at redhat.com
Wed Oct 18 02:31:39 UTC 2017


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

            Bug ID: 1503394
           Summary: Mishandling null check at send_brick_req of
                    glusterfsd/src/gf_attach.c
           Product: GlusterFS
           Version: mainline
         Component: glusterd
          Severity: low
          Assignee: bugs at gluster.org
          Reporter: srakonde at redhat.com
                CC: alexc at sbrella.com, bugs at gluster.org,
                    srakonde at redhat.com
        Depends On: 1502928



+++ This bug was initially created as a clone of Bug #1502928 +++

Description of problem:

There are three of `goto out` at `send_brick_req`

        iobuf = iobuf_get2 (rpc->ctx->iobuf_pool, req_size);
        if (!iobuf)
                goto out;

        iobref = iobref_new ();
        if (!iobref)
                goto out;

        frame = create_frame (this, this->ctx->pool);
        if (!frame)
                goto out;

that indicates the three of them (iobuf, iobref, frame) might be null and then
jumps to label `out`.

but there might be null pointer dereference after label out:
out:
        iobref_unref (iobref);
        iobuf_unref (iobuf);
        STACK_DESTROY (frame->root);

the error handling code might not work as expected.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Worker Ant on 2017-10-17 09:10:47 EDT ---

REVIEW: https://review.gluster.org/18538 (glusterd:Dereferencing the null
pointer) posted (#1) for review on master by Sanju Rakonde
(srakonde at redhat.com)

--- Additional comment from Worker Ant on 2017-10-17 09:16:50 EDT ---

REVIEW: https://review.gluster.org/18538 (glusterd:Dereferencing the null
pointer) posted (#2) for review on master by Sanju Rakonde
(srakonde at redhat.com)

--- Additional comment from Worker Ant on 2017-10-17 09:29:43 EDT ---

REVIEW: https://review.gluster.org/18539 (glusterd:Dereferencing the null
pointer) posted (#1) for review on release-3.10 by Sanju Rakonde
(srakonde at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1502928
[Bug 1502928] Mishandling null check at send_brick_req of
glusterfsd/src/gf_attach.c
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list