Slashdot Mirror


Software Bug Adds 5K Votes To Election

eldavojohn writes "You may be able to argue that a five-thousand-vote error is a small price to pay for a national election, but these errors are certainly inadmissible on a much smaller scale. According to the Rapid City Journal, a software glitch added 4,875 phantom ballots in a South Dakota election for a seat on the city council. It's not a hardware security problem this time; it's a software glitch. Although not unheard of in electronic voting, this bug was about to cause a runoff vote since the incumbent did not hold a high enough percentage of the vote. That is no longer the case after the numbers were corrected. Wired notes it's probably a complex bug as it is not just multiplying the vote count by two. Here's to hoping that AutoMark follows suit and releases the source code for others to scrutinize."

18 of 239 comments (clear)

  1. How hard is it for a computer to do addition? by pieterh · · Score: 5, Interesting

    Why is a voting system doing any kind of math at all? I voted yesterday in Belgium on a computer that puts my vote onto a card, which is then tallied separately. This same system has been working since at least 1995 with zero reports of fraud or failure (except normal "computer is broken" style failures).

    How can a computer "add phantom ballots"? Software does not just "glitch", it breaks in ways that depend entirely on how it was built.

    1. Re:How hard is it for a computer to do addition? by rvw · · Score: 5, Insightful

      Why is a voting system doing any kind of math at all? I voted yesterday in Belgium on a computer that puts my vote onto a card, which is then tallied separately. This same system has been working since at least 1995 with zero reports of fraud or failure (except normal "computer is broken" style failures).

      How can a computer "add phantom ballots"? Software does not just "glitch", it breaks in ways that depend entirely on how it was built.

      How do you know this system is fraud free? Reading your comment doesn't convince me one bit. I voted too, in the Netherlands, and for the first time in years I had to use a pencil again. No guarantee that there are no counting errors, but they won't be systematic on a large scale.

    2. Re:How hard is it for a computer to do addition? by tangent3 · · Score: 4, Funny

      Additions just aren't so simple anymore in concurrent computing. The obvious way to do addition in gcc c would be:

      totalVotes[candidate]++;

      but this will totally screw up the vote count, whereas

      __sync_add_and_fetch(&totalVotes[candidate], 1);

      gets it right.

    3. Re:How hard is it for a computer to do addition? by tangent3 · · Score: 5, Funny



      void vote(int candidate)
      {
         switch (candidate)
         {
            case GEORGE_BUSH:
               totalVotes[GEORGE_BUSH] ++;

            case AL_GORE:
               totalVotes[AL_GORE] ++;
               break;
         }
      }

    4. Re:How hard is it for a computer to do addition? by pieterh · · Score: 4, Interesting

      Belgian politics are not always polite. There is endless infighting. There is no monopoly of power, every government is a coalition and always fragile.

      This makes election fraud very hard to organise and probably impossible to keep a secret. One would need to buy too many people, for too long.

      So not because I trust the Belgian political establishment, but because I trust their incompetence and greed, I'm pretty satisfied that every vote is counted, and accurately.

    5. Re:How hard is it for a computer to do addition? by Anonymous Coward · · Score: 5, Interesting

      Yes, it's a threading issue. If you have multiple threads trying to update the value, some of them won't count. You'd either need to use a lock (and probably mark the variables as volatile) or use some kind of atomic update (like a read-modify-write operation).

      Still, you'd have to be an idiot to even try to count votes as they're coming in. A much better approach would be to use a database. Database servers are already really good at handling concurrency and scaling. When a vote is cast, simply add a record to the database. Once the election's over, do something like "SELECT COUNT(*), candidate_id FROM votes GROUP BY candidate_id", and the results will be calculated based on the records in the database.

      Really, you could only screw this up if you insisted on developing the entire system from scratch, rather than going with existing, well-tested code.

    6. Re:How hard is it for a computer to do addition? by Cixelsiduous · · Score: 5, Funny

      eh...your first case statement is missing a break. As it currently stands, a vote for GEORGE_BUSH also adds a vote for AL_GORE. I dunno maybe you left it out on purpose to make a point? I guess the bigger question is: why do I care? The answer of course is because I have no friends.

    7. Re:How hard is it for a computer to do addition? by Enigma0498 · · Score: 5, Informative

      How do you know this system is fraud free? Reading your comment doesn't convince me one bit. I voted too, in the Netherlands, and for the first time in years I had to use a pencil again. No guarantee that there are no counting errors, but they won't be systematic on a large scale.

      The Belgian government publishes the source code of the voting software the moment the bureaus close. The software of yesterday's election can be found here: http://www.ibz.rrn.fgov.be/index.php?id=1152&L=1

  2. How hard can it be? by Nursie · · Score: 4, Insightful

    I mean really, I'm pretty sure I could write a program with a couple of buttons and a counter for each.

    What's going on here?

    1. Re:How hard can it be? by Nursie · · Score: 4, Funny

      Ah, "Shaky" Jim was off his meds again.

  3. Blckboxvoting.org by Red+Flayer · · Score: 5, Insightful

    "You may be able to argue that a five thousand vote error is a small price to pay for a national election but these errors are certainly inadmissible on a much smaller scale.

    A software error resulting in +/- 5000 votes cast is unacceptable on any level, even if it gets drowned out on the national level in the US.

    There is absolutely no reason or excuse for software to miscount votes. It isn't rocket science.

    I know I'm preaching to the choir here, but this shit just pisses me off. It's a matter of national and local integrity that our voting systems are transparent. Please support blackboxvoting.org if you don't have the time to get involved in a deeper fashion (calling/writing your legislators, etc).

    Note: I'm not affiliated with blackboxvoting.org. I just appreciate their work.

    --
    "Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
    1. Re:Blckboxvoting.org by nedlohs · · Score: 4, Funny

      Yes, but it's hilarious when there were only 5600 actual votes cast. +/-100% error bars, is good enough for government work apparently.

  4. This is why we have validation. by BlueKitties · · Score: 4, Interesting

    I'm pretty sure, somewhere in that code, was a server thread handle which states "if {vote=="thisGuy"){thisGuy++;}else{otherGuy++;}" - because validating your requests might require extra code.

    --
    "Sorrow is better than laughter, for by sadness of face the heart is made glad." [Ecclesiastes 7:3]
  5. tampering? by Ltap · · Score: 5, Interesting

    TFA only tells me the numbers and the guy's plans, nothing about the actual bug. What was it? It seems awfully hard to screw up adding two numbers together to get a third number, which is basically what that software was doing. Has it occurred to anyone that it might have been tampering? It seems to me that, with the fairly large (tens of thousands) number of votes, adding or removing just enough to make it a runoff would be the perfect vote tampering scheme - too little to draw much attention, but enough to actually make a difference.

    --
    Yet Another Tech Blog
    (but so much more, including game and movie reviews)
    http://yanteb.peasantoid.org
  6. Re:!bug by skelterjohn · · Score: 4, Insightful

    yeah, cause the difference in saying something like "x+y/2" or "(x+y)/2" is obvious fraud, as it is a bug that wouldn't crash the system.

  7. Re:How..... by Shakrai · · Score: 4, Interesting

    It still amazes me how "hard" it is to write a simple program. First have something to scan the ID, check that its unique then move to the voting. Have a few radio buttons that you click, then hit submit, each radio button corresponds to a candidate or a choice, they are added up and give you the results. How the crap do you screw that up?

    Well, in the case of New York State, our fearless leaders in Albany changed the requirements no less than 15 times after signing a contract with the vendor for new voting machines. Then after they finally agreed on a set of requirements they decided that they needed voting machines for 62 counties right now so they'd have them in time for the election. Then after the machines arrived they changed the requirements again and needed the new software for them right now.

    Doing business with the Government is not an easy undertaking. The only good thing that came out of it is our fearless leaders weren't stupid enough to go with a DRE (direct electronic recording) system. We still have paper ballots that can be counted by any human being if the computer system fails. All the computer does is tabulate them and provide an interface for those voters (the blind/handicapped) whom can't fill out paper ballots themselves.

    --
    I want peace on earth and goodwill toward man.
    We are the United States Government! We don't do that sort of thing.
  8. Re:!bug by link-error · · Score: 5, Insightful

    It's probably more like they aren't rolling back some transaction on a network error or something. Network timeouts, etc, are probably doubling up the votes from that machine. It's probably an unusual error so it doesn't get caught in testing. Like busy networks on election night? It's not that hard to imagine.

    --
    -Unresolved symbol? Byte me!
  9. It's simple by Mad-Bassist · · Score: 5, Funny

    Someone forgot to clear the chad bit!

    --
    "The only legitimate use of a computer is to play games." - Eugene Jarvis