Fixed a missing check for errors on OpenCL device leading to invalid removal of restore file

pull/1623/head^2
jsteube 6 years ago
parent 1b30a1d6c7
commit 82457d2904

@ -23,6 +23,7 @@
- Fixed a missing kernel in -m 5600 in combination with -a 3 and -O if mask is >= 16 characters
- Fixed a miscalculation in --progress-only mode output for extreme slow kernels like -m 14800
- Fixed missing code section in -m 2500 and -m 2501 to crack corrupted handshakes with a LE endian bitness base
- Fixed a missing check for errors on OpenCL device leading to invalid removal of restore file
* changes v4.0.1 -> v4.1.0

@ -177,6 +177,7 @@ typedef enum status_rc
STATUS_BYPASS = 9,
STATUS_ABORTED_CHECKPOINT = 10,
STATUS_ABORTED_RUNTIME = 11,
STATUS_ERROR = 13,
} status_rc_t;

@ -304,7 +304,14 @@ void *thread_calc_stdin (void *p)
if (device_param->skipped) return NULL;
calc_stdin (hashcat_ctx, device_param); // we should check the RC here
const int rc_calc = calc_stdin (hashcat_ctx, device_param);
if (rc_calc == -1)
{
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
status_ctx->devices_status = STATUS_ERROR;
}
return NULL;
}
@ -716,7 +723,14 @@ void *thread_calc (void *p)
if (device_param->skipped) return NULL;
calc (hashcat_ctx, device_param); // we should check the RC here
const int rc_calc = calc (hashcat_ctx, device_param);
if (rc_calc == -1)
{
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
status_ctx->devices_status = STATUS_ERROR;
}
return NULL;
}

@ -265,6 +265,7 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
}
if ((status_ctx->devices_status != STATUS_CRACKED)
&& (status_ctx->devices_status != STATUS_ERROR)
&& (status_ctx->devices_status != STATUS_ABORTED)
&& (status_ctx->devices_status != STATUS_ABORTED_CHECKPOINT)
&& (status_ctx->devices_status != STATUS_ABORTED_RUNTIME)
@ -1239,6 +1240,7 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->devices_status == STATUS_QUIT) rc_final = 2;
if (status_ctx->devices_status == STATUS_EXHAUSTED) rc_final = 1;
if (status_ctx->devices_status == STATUS_CRACKED) rc_final = 0;
if (status_ctx->devices_status == STATUS_ERROR) rc_final = -1;
}
// done

@ -33,6 +33,7 @@ static const char *ST_0009 = "Bypass";
static const char *ST_0010 = "Aborted (Checkpoint)";
static const char *ST_0011 = "Aborted (Runtime)";
static const char *ST_0012 = "Running (Checkpoint Quit requested)";
static const char *ST_0013 = "Error";
static const char *ST_9999 = "Unknown! Bug!";
static const char UNITS[7] = { ' ', 'k', 'M', 'G', 'T', 'P', 'E' };
@ -227,6 +228,7 @@ const char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx)
case STATUS_BYPASS: return ST_0009;
case STATUS_ABORTED_CHECKPOINT: return ST_0010;
case STATUS_ABORTED_RUNTIME: return ST_0011;
case STATUS_ERROR: return ST_0013;
}
return ST_9999;

Loading…
Cancel
Save