fedora 23
format weakness #32

4

Weakness Breakdown


Definition:

A format string exploit occurs when the data of an input string is evaluated as a command by the program. This class of attacks is very similar to buffer overflows since an attacker could execute code, read the stack or cause new behaviors that compromise security. Learn more about format string attacks on OWASP attack index.

Warning code(s):

If format strings can be influenced by an attacker, they can be exploited.

File Name:

E/CLAUSES/ccl_inferencedoc.c

Context:

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

 	 fprintf(out, "# Output format not implemented.\n");
	 break;
   }   
}

/*-----------------------------------------------------------------------
//
// Function: print_context_simplify_reflect()
//
//   Print a clause modification by contextual simplify-reflect.
//
// Global Variables: -
//
// Side Effects    : Output
//
/----------------------------------------------------------------------*/

static void print_context_simplify_reflect(FILE* out, Clause_p clause, long
				   old_id, Clause_p partner, char* comment)
{
   switch(DocOutputFormat)
   {
   case pcl_format:
	 pcl_print_start(out, clause, PCLShellLevel<1);
	 fprintf(out, PCL_CSR"(%ld,%ld)", old_id,
		 partner->ident);
	 pcl_print_end(out, comment, clause);
	 break;
 case tstp_format:
	 ClauseTSTPPrint(out, clause, PCLFullTerms, false);
	 fprintf(out, 
		 ",inference("PCL_CSR
                 ",[status(thm)],[c_0_%ld,c_0_%ld])",
		 old_id,
		 partner->ident);
	 tstp_print_end(out, comment, clause);
	 break;
   default:
	 fprintf(out, "# Output format not implemented.\n");
	 break;
   }   
}


/*-----------------------------------------------------------------------
//
// Function: print_ac_res()
//
//   Print a clause modification by AC-resolution.
// 

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.