Difference between revisions of "State synchronization error"

Jump to: navigation, search
Line 2: Line 2:
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
[[ASDR Table of Contents]]
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
[[ASDR Table of Contents]]
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]

Revision as of 18:29, 5 November 2008

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.

ASDR Table of Contents

Last revision (mm/dd/yy): 11/5/2008


State synchronization refers to a set of flaws involving contradictory states of execution in a process which result in undefined behavior.


  • Undefined: Depending on the nature of the state of corruption, any of the listed consequences may result.

Exposure period

  • Design: Design flaws may be to blame for out-of-sync states, but this is the rarest method.
  • Implementation: Most likely, state-synchronization errors occur due to logical flaws and race conditions introduced at implementation time.
  • Run time: Hardware, operating system, or interaction with other programs may lead to this error.


  • Languages: All
  • Operating platforms: All

Required resources




Likelihood of exploit

Medium to High

The class of synchronization errors is large and varied, but all rely on the same essential flaw. The state of the system is not what the process expects it to be at a given time.

Obviously, the range of possible symptoms is enormous, as is the range of possible solutions. The flaws presented in this section are some of the most difficult to diagnose and fix. It is more important to know how to characterize specific flaws than to gain information about them.

Risk Factors



In C/C++:

static void print(char * string) {
  char * word;
  int counter;
  for(word = string; counter = *word++; ) putc(counter, stdout);

int main(void) {
   pid_t pid;
   if( (pid = fork()) < 0) exit(-2);
   else if( pid == 0) print("child");
   else print("parent\n");

In Java:

class read{
  private int lcount;
  private int rcount;
  private int wcount;

  public void getRead(){
    while ((lcount == -1) || (wcount !=0));

  public void getWrite(){
    while ((lcount == -0);

  public void killLocks(){
    if (lcount==0) return;
    else if (lcount == -1) lcount++;
    else lcount--;

Related Attacks

Related Vulnerabilities

Related Controls

  • Implementation: Pay attention to asynchronous actions in processes; and make copious use of sanity checks in systems that may be subject to synchronization errors.

Related Technical Impacts