浏览代码

Bug 630097 - (cov#15462) NULL dereference in mep_modrdn_post_op()

If we fail to fetch the postop entry for a modrdn operation in the
Managed Entry Plug-in, we end up passing a NULL pointer to
slapi_entry_attr_get_charptr(). This function dereferences the
entry without checking if it is NULL first. The mep_modrdn_post_op()
function should just return if we are unable to fetch the postop
entry.

I believe that this issue could trigger a crash when chain-on-update
is configured and a modrdn operation is chained. There is no postop
entry in this case.
Nathan Kinder 15 年之前
父节点
当前提交
94b265fb50
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      ldap/servers/plugins/mep/mep.c

+ 1 - 0
ldap/servers/plugins/mep/mep.c

@@ -2021,6 +2021,7 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
         slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
         slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
                         "mep_modrdn_post_op: Error "
                         "mep_modrdn_post_op: Error "
                         "retrieving post-op entry\n");
                         "retrieving post-op entry\n");
+        return 0;
     }
     }
 
 
     if ((old_dn = mep_get_dn(pb))) {
     if ((old_dn = mep_get_dn(pb))) {