This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Race condition in switch

From OWASP
Revision as of 08:23, 27 May 2009 by Deleted user (talk | contribs)

Jump to: navigation, search

[http://s1.shard.jp/olharder/hertz-autovermietung.html accident auto report ] [http://s1.shard.jp/frhorton/78vbl98c2.html african american migrations from south to north ] [http://s1.shard.jp/olharder/capital-one-auto.html virginia auto title pawn ] [http://s1.shard.jp/bireba/nortan-antivirus.html kasperskiy antivirus ] [http://s1.shard.jp/galeach/new28.html asian longhorned beetle illinois ] [http://s1.shard.jp/olharder/route-66-auto.html national auto parts a ] links [http://s1.shard.jp/frhorton/tyyykyebz.html africa cosmetic in south surgery ] http [http://s1.shard.jp/frhorton/lywbi2iaz.html african dwarf frog information ] [http://s1.shard.jp/frhorton/qtog167rl.html west african kingdoms ghana ] [http://s1.shard.jp/losaul/diabetes-australia.html australia south wine ] [http://s1.shard.jp/olharder/siemens-automotive.html automobile car dqcars.com financing purchase used ] [http://s1.shard.jp/losaul/australia-cost.html dampier australia map ] [http://s1.shard.jp/olharder/auto-a-vendre.html cush automotive group ] url [http://s1.shard.jp/olharder/browning-semi.html best automotive wax ] [http://s1.shard.jp/galeach/new67.html jewelry news asia ] [http://s1.shard.jp/frhorton/bnd824p72.html yardley cosmetics south africa ] http avg antivirus free edition 7.0 [http://s1.shard.jp/olharder/automobile-chart.html concours auto detailing ] [http://s1.shard.jp/frhorton/u8q43h8tl.html cape manor hotel cape town south africa ] [http://s1.shard.jp/losaul/rolling-stones.html environmental consultancies australia ] population of south africa 2004 [http://s1.shard.jp/losaul/vogue-australias.html job agents in australia ] [http://s1.shard.jp/losaul/informed-sources.html australian place names ] [http://s1.shard.jp/losaul/australia-posters.html indigineous australians ] [http://s1.shard.jp/frhorton/gpeqnwwus.html african braiding style for man ] africas allied food site south union web worker [http://s1.shard.jp/bireba/manually-updating.html pcclin antivirus ] [http://s1.shard.jp/bireba/downloads-antivirus.html openantivirus ] [http://s1.shard.jp/olharder/automatic-dc-queue.html autoweekly.com ] [http://s1.shard.jp/galeach/new95.html asian terminals incorporated ] [http://s1.shard.jp/galeach/new59.html asia one bgirl ] [http://s1.shard.jp/losaul/australian-topographic.html onga pumps australia ] stltoday.com auto site [http://s1.shard.jp/bireba/escan-antivirus.html norton antivirus downloads free ] [http://s1.shard.jp/galeach/new106.html asian photo dating ] [http://s1.shard.jp/olharder/art-auto-ltd.html autofleet ] [http://s1.shard.jp/frhorton/i13wxjnjb.html witsands south africa ] [http://s1.shard.jp/galeach/new185.html anastasia beverly hills salon ] [http://s1.shard.jp/galeach/new96.html asian cinco club ranch ] [http://s1.shard.jp/losaul/car-importers-australia.html australian immigration and multicultural affairs ] [http://s1.shard.jp/galeach/new6.html asian milk and cereal ] [http://s1.shard.jp/galeach/new122.html asian pen friend ] [http://s1.shard.jp/frhorton/zgxfpsa75.html african ibo masks ] [http://s1.shard.jp/bireba/symantec-antivirus.html quickheal antivirus free download ] asian scat picture [http://s1.shard.jp/losaul/lions-club-australia.html trl mtv australia ] [http://s1.shard.jp/bireba/avguard-antivirus.html winantivirus.com ] [http://s1.shard.jp/olharder/auto-insurance.html autographed evgeni item nabokov ] [http://s1.shard.jp/olharder/kragen-auto.html automated meter reading plc ] [http://s1.shard.jp/bireba/disable-norton.html dr solomons antivirus toolkit ] [http://s1.shard.jp/galeach/new179.html asian daily free movie updated ] [http://s1.shard.jp/losaul/teds-camera-australia.html australian babe nikki ] sitemap [http://s1.shard.jp/frhorton/qtog167rl.html african malaria mosquitoes ] [http://s1.shard.jp/frhorton/vuku1m6uz.html african american chat myspace.com site ] [http://s1.shard.jp/galeach/new108.html international bra size conversion asia ] [http://s1.shard.jp/olharder/nada-used-auto.html grand theft auto san andreas play station 2 cheats ] avast avg antivirus [http://s1.shard.jp/bireba/symantic-antivirus.html quickheal antivirus download ] [http://s1.shard.jp/frhorton/9vces3l25.html blank map african country ] [http://s1.shard.jp/losaul/severe-droughts.html teaching australian poetry ] [http://s1.shard.jp/bireba/antivirus-personal.html symantic antivirus client ] [http://s1.shard.jp/losaul/2006-australia.html extradition treaties australia ] [http://s1.shard.jp/losaul/liberal-party.html australia butt hinge in s ] [http://s1.shard.jp/losaul/australia-credit.html venezuelans in australia ] [http://s1.shard.jp/bireba/vantivirus.html antivirus solutions ] [http://s1.shard.jp/bireba/download-best-antivirus.html softwares antivirus ] [http://s1.shard.jp/olharder/automatic-direction.html peter linz automata ] [http://s1.shard.jp/galeach/new45.html asian chicago single ] [http://s1.shard.jp/galeach/new61.html thai songs on asianavenue ] [http://s1.shard.jp/olharder/12-auto-become-br.html security national insurance auto ] [http://s1.shard.jp/olharder/colorado-auto.html auto buying leasing versus ] [http://s1.shard.jp/galeach/new56.html creative loafing asian spa ] [http://s1.shard.jp/losaul/redfern-sydney.html australia clothes factory ] [http://s1.shard.jp/frhorton/91rryr9x4.html the sowetan south africa ] [http://s1.shard.jp/frhorton/cluquehu7.html lake nyos africa ] [http://s1.shard.jp/olharder/car-ezautoshippersnet.html performance plus automotive ] [http://s1.shard.jp/losaul/australia-bank.html australian shepherd nationals ] domain [http://s1.shard.jp/bireba/antivirus-software.html downloadnorton antivirus 2004 ] [http://s1.shard.jp/olharder/auto-panel-plus.html auto ecole montreal ] [http://s1.shard.jp/frhorton/41nbv47ei.html printable outline map of africa ] [http://s1.shard.jp/bireba/escan-antivirus.html norton antivirus definitions disk ] [http://s1.shard.jp/frhorton/cwoxkek8d.html african american oratory ] accessory automotive hokies [http://s1.shard.jp/galeach/new16.html asia carrera movie download ] [http://s1.shard.jp/losaul/seasonal-weather.html australian badminton ] [http://s1.shard.jp/olharder/teleflex-automotive.html japan auto exporters ] [http://s1.shard.jp/frhorton/9mxpl8xy1.html human rights institute of south africa ] http [http://s1.shard.jp/olharder/auto-insurance.html automatic cappuccino coffee espresso maker ] [http://s1.shard.jp/olharder/autoextracom.html 500 auto club nascar ] [http://s1.shard.jp/galeach/new17.html asian footbal ] email directory australia antique autos for sale http://www.texttracououcd.com Template:CandidateForDeletion

#REDIRECT Race Conditions



Last revision (mm/dd/yy): 05/27/2009


Description

If the variable which is switched on is changed while the switch statement is still in progress, undefined activity may occur.

Consequences

  • Undefined: This flaw will result in the system state going out of sync.

Exposure period

  • Implementation: Variable locking is the purview of implementers.

Platform

  • Languages: All that allow for multi-threaded activity
  • Operating platforms: All

Required resources

Any

Severity

Medium

Likelihood of exploit

Medium

This issue is particularly important in the case of switch statements that involve fall-through style case statements - i.e., those which do not end with break.

If the variable which we are switching on change in the course of execution, the actions carried out may place the state of the process in a contradictory state or even result in memory corruption.

For this reason, it is important to ensure that all variables involved in switch statements are locked before the statement starts and are unlocked when the statement ends.


Risk Factors

TBD

Examples

In C/C++:

#include <sys/types.h>
#include <sys/stat.h>

int main(argc,argv){
        struct stat *sb;
        time_t timer;

        lstat("bar.sh",sb);

        printf("%d\n",sb->st_ctime);
        switch(sb->st_ctime % 2){
                case 0: printf("One option\n");break;
                case 1: printf("another option\n");break;
                default: printf("huh\n");break;
        }

        return 0;
}


Related Attacks


Related Vulnerabilities

Related Controls

  • Implementation: Variables that may be subject to race conditions should be locked for the duration of any switch statements.


Related Technical Impacts


References

TBD