14e44be7b0
Resolves: bz#1234220 bz#1286171 bz#1487177 bz#1524457 bz#1640573 Resolves: bz#1663557 bz#1667954 bz#1683602 bz#1686897 bz#1721355 Resolves: bz#1748865 bz#1750211 bz#1754391 bz#1759875 bz#1761531 Resolves: bz#1761932 bz#1763124 bz#1763129 bz#1764091 bz#1775637 Resolves: bz#1776901 bz#1781550 bz#1781649 bz#1781710 bz#1783232 Resolves: bz#1784211 bz#1784415 bz#1786516 bz#1786681 bz#1787294 Resolves: bz#1787310 bz#1787331 bz#1787994 bz#1790336 bz#1792873 Resolves: bz#1794663 bz#1796814 bz#1804164 bz#1810924 bz#1815434 Resolves: bz#1836099 bz#1837467 bz#1837926 bz#1838479 bz#1839137 Resolves: bz#1844359 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From ffd428d07036531b7ed98c7393b87490aaa223ec Mon Sep 17 00:00:00 2001
|
|
From: Niels de Vos <ndevos@redhat.com>
|
|
Date: Fri, 3 May 2019 09:18:31 +0200
|
|
Subject: [PATCH 437/449] glusterd: prevent use-after-free in
|
|
glusterd_op_ac_send_brick_op()
|
|
|
|
Coverity reported that GF_FREE(req_ctx) could be called 2x on req_ctx.
|
|
|
|
> upstream patch link: https://review.gluster.org/#/c/glusterfs/+/22656/
|
|
> Change-Id: I9120686e5920de8c27688e10de0db6aa26292064
|
|
> CID: 1401115
|
|
> Updates: bz#789278
|
|
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
|
BUG: 1787310
|
|
Change-Id: I9120686e5920de8c27688e10de0db6aa26292064
|
|
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/202619
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
---
|
|
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
index 46fc607..1e84f5f 100644
|
|
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
@@ -7575,7 +7575,6 @@ glusterd_op_ac_send_brick_op(glusterd_op_sm_event_t *event, void *ctx)
|
|
if (op_errstr == NULL)
|
|
gf_asprintf(&op_errstr, OPERRSTR_BUILD_PAYLOAD);
|
|
opinfo.op_errstr = op_errstr;
|
|
- GF_FREE(req_ctx);
|
|
goto out;
|
|
}
|
|
}
|
|
@@ -7594,7 +7593,7 @@ glusterd_op_ac_send_brick_op(glusterd_op_sm_event_t *event, void *ctx)
|
|
}
|
|
|
|
out:
|
|
- if (ret && req_ctx && free_req_ctx)
|
|
+ if (ret && free_req_ctx)
|
|
GF_FREE(req_ctx);
|
|
gf_msg_debug(this->name, 0, "Returning with %d", ret);
|
|
|
|
--
|
|
1.8.3.1
|
|
|