|
|
9ae3f9 |
From ffd428d07036531b7ed98c7393b87490aaa223ec Mon Sep 17 00:00:00 2001
|
|
|
9ae3f9 |
From: Niels de Vos <ndevos@redhat.com>
|
|
|
9ae3f9 |
Date: Fri, 3 May 2019 09:18:31 +0200
|
|
|
9ae3f9 |
Subject: [PATCH 437/449] glusterd: prevent use-after-free in
|
|
|
9ae3f9 |
glusterd_op_ac_send_brick_op()
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
Coverity reported that GF_FREE(req_ctx) could be called 2x on req_ctx.
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
> upstream patch link: https://review.gluster.org/#/c/glusterfs/+/22656/
|
|
|
9ae3f9 |
> Change-Id: I9120686e5920de8c27688e10de0db6aa26292064
|
|
|
9ae3f9 |
> CID: 1401115
|
|
|
9ae3f9 |
> Updates: bz#789278
|
|
|
9ae3f9 |
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
BUG: 1787310
|
|
|
9ae3f9 |
Change-Id: I9120686e5920de8c27688e10de0db6aa26292064
|
|
|
9ae3f9 |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
9ae3f9 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/202619
|
|
|
9ae3f9 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
9ae3f9 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
9ae3f9 |
---
|
|
|
9ae3f9 |
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 3 +--
|
|
|
9ae3f9 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
9ae3f9 |
index 46fc607..1e84f5f 100644
|
|
|
9ae3f9 |
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
9ae3f9 |
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
9ae3f9 |
@@ -7575,7 +7575,6 @@ glusterd_op_ac_send_brick_op(glusterd_op_sm_event_t *event, void *ctx)
|
|
|
9ae3f9 |
if (op_errstr == NULL)
|
|
|
9ae3f9 |
gf_asprintf(&op_errstr, OPERRSTR_BUILD_PAYLOAD);
|
|
|
9ae3f9 |
opinfo.op_errstr = op_errstr;
|
|
|
9ae3f9 |
- GF_FREE(req_ctx);
|
|
|
9ae3f9 |
goto out;
|
|
|
9ae3f9 |
}
|
|
|
9ae3f9 |
}
|
|
|
9ae3f9 |
@@ -7594,7 +7593,7 @@ glusterd_op_ac_send_brick_op(glusterd_op_sm_event_t *event, void *ctx)
|
|
|
9ae3f9 |
}
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
out:
|
|
|
9ae3f9 |
- if (ret && req_ctx && free_req_ctx)
|
|
|
9ae3f9 |
+ if (ret && free_req_ctx)
|
|
|
9ae3f9 |
GF_FREE(req_ctx);
|
|
|
9ae3f9 |
gf_msg_debug(this->name, 0, "Returning with %d", ret);
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
--
|
|
|
9ae3f9 |
1.8.3.1
|
|
|
9ae3f9 |
|