The software specifies permissions for a security-critical resource in a way that allows the resource to be read or modified by unintended actors.
bind-9.9.4/bin/tests/pkcs11/benchmarks/genrsa.c
The highlighted line of code below is the trigger point of this particular Centos 7 misc weakness.
*/
/* $ Id$ */
/* genrsa [-m module] [-s $ slot] [-p pin] [-t] [-b bits] [-n count] */
/*! \file */
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <isc/commandline.h>
#include <isc/result.h>
#include <isc/types.h>
#include <pk11/pk11.h>
#include <pk11/result.h>
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
#define getpassphrase(x) getpass(x)
#endif
#ifndef HAVE_CLOCK_GETTIME
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#endif
int
clock_gettime(int32_t id, struct timespec *tp)
{
struct timeval tv;
int result;
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
return (result);
}
#endif
static CK_BBOOL truevalue = TRUE;
static CK_BBOOL falsevalue = FALSE;