fedora 23
crypto weakness #542

4

Weakness Breakdown


Definition:

This weakness involves creating non-standard or non-tested algorithms, using weak algorithms or applying cryptographic algorithms incorrectly. Algorithms that were once considered safe are commonly later found to be unsafe, as the algorithms were broken.

Warning code(s):

The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment.

File Name:

aqbanking-5.5.1/src/plugins/backends/aqhbci/plugin/joblayer/jobqueue.c

Context:

The highlighted line of code below is the trigger point of this particular Fedora 23 crypto weakness.

   cj=AH_Job_List_First(jq->jobs);
  while(cj) {
    jobCount++;
    GWEN_StringList_AppendString(jobTypes, AH_Job_GetName(cj), 0, 1);
    if (strcasecmp(AH_Job_GetName(cj), AH_Job_GetName(j))==0)
      thisJobTypeCount++;
    hasSingle|=((AH_Job_GetFlags(cj) & AH_JOB_FLAGS_SINGLE) ||
                (AH_Job_GetFlags(cj) & AH_JOB_FLAGS_DLGJOB));
    crypt|=(AH_Job_GetFlags(cj) & AH_JOB_FLAGS_CRYPT);
    needTAN|=(AH_Job_GetFlags(cj) & AH_JOB_FLAGS_NEEDTAN);
    noSysId|=(AH_Job_GetFlags(cj) & AH_JOB_FLAGS_NOSYSID);
    noItan|=(AH_Job_GetFlags(cj) & AH_JOB_FLAGS_NOITAN);
    cj=AH_Job_List_Next(cj);
  } /* while */
  /* Account for new job when checking limits for thisJobTypeCount and
   * jobTypeCount */
  thisJobTypeCount++;
  GWEN_StringList_AppendString(jobTypes, AH_Job_GetName(j), 0, 1);
  jobTypeCount=GWEN_StringList_Count(jobTypes);
  GWEN_StringList_free(jobTypes);

  if (strcasecmp(AH_Job_GetName(j), "JobTan")!=0) {
    if (jobCount &&
        (
         (crypt!=(AH_Job_GetFlags(j) & AH_JOB_FLAGS_CRYPT)) ||
         (needTAN!=(AH_Job_GetFlags(j) & AH_JOB_FLAGS_NEEDTAN)) ||
         (noSysId!=(AH_Job_GetFlags(j) & AH_JOB_FLAGS_NOSYSID)) ||
         (noItan!=(AH_Job_GetFlags(j) & AH_JOB_FLAGS_NOITAN))
        )
       ) {

      DBG_INFO(AQHBCI_LOGDOMAIN,
               "Encryption/TAN/SysId flags for queue and this job differ");
      return AH_JobQueueAddResultJobLimit;
    }

    /* check for single jobs */
    if (hasSingle) {
      DBG_INFO(AQHBCI_LOGDOMAIN,
               "Queue already contains a job which wants to be left alone");
      return AH_JobQueueAddResultQueueFull;
    }

    /* check if this job is single and there already are jobs in the queue */
    if (((AH_Job_GetFlags(j) & AH_JOB_FLAGS_SINGLE) ||
         (AH_Job_GetFlags(j) & AH_JOB_FLAGS_DLGJOB)) && jobCount) {
      DBG_INFO(AQHBCI_LOGDOMAIN,
               "Queue already contains jobs and this one has the SINGLE flag");
      return AH_JobQueueAddResultJobLimit;
    } 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.