diff options
| author | Santosh Kumar Pradhan <spradhan@redhat.com> | 2014-07-03 17:11:44 +0530 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2014-07-08 03:36:18 -0700 | 
| commit | 3d7b19cd1ecd53f0808b07df7c4ac801fd48f3c3 (patch) | |
| tree | 78efa080b5791a2e625e274309d9b2545b2be3a9 /glusterfsd/src | |
| parent | 828fe8068de0f1357e5c26097e45d752b3f7f6c4 (diff) | |
rpcsvc: Validate RPC procedure number before fetch
While accessing the procedures of given RPC program in,
rpcsvc_get_program_vector_sizer(), It was not checking boundary
conditions which would cause buffer overflow and subsequently SEGV.
Make sure rpcsvc_actor_t arrays have numactors number of actors.
FIX:
Validate the RPC procedure number before fetching the actor.
Upstream main review: http://review.gluster.org/7726
BUG: 1096020
Change-Id: Iaf207ee976cb56fa9a554ec82c9eab36d3b289ed
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/8228
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'glusterfsd/src')
| -rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 0484779ce55..b75a8027e07 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -1136,7 +1136,7 @@ glusterfs_handle_rpc_msg (rpcsvc_request_t *req)          return ret;  } -rpcclnt_cb_actor_t mgmt_cbk_actors[] = { +rpcclnt_cb_actor_t mgmt_cbk_actors[GF_CBK_MAXVALUE] = {          [GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, mgmt_cbk_spec },          [GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_CBK_EVENT_NOTIFY,                                   mgmt_cbk_event}, @@ -1183,7 +1183,7 @@ rpc_clnt_prog_t clnt_handshake_prog = {          .procnames = clnt_handshake_procs,  }; -rpcsvc_actor_t glusterfs_actors[] = { +rpcsvc_actor_t glusterfs_actors[GLUSTERD_BRICK_MAXVALUE] = {          [GLUSTERD_BRICK_NULL]          = {"NULL",              GLUSTERD_BRICK_NULL,          glusterfs_handle_rpc_msg,             NULL, 0, DRC_NA},          [GLUSTERD_BRICK_TERMINATE]     = {"TERMINATE",         GLUSTERD_BRICK_TERMINATE,     glusterfs_handle_terminate,           NULL, 0, DRC_NA},          [GLUSTERD_BRICK_XLATOR_INFO]   = {"TRANSLATOR INFO",   GLUSTERD_BRICK_XLATOR_INFO,   glusterfs_handle_translator_info_get, NULL, 0, DRC_NA},  | 
