News for hackers. Stuff that matters.
Re:The Linux Backdoor Attempt of 2003 by keithpeter on Wednesday October 09, 2013 @01:40PM (#6522644)
A piece of telco software had been written in C language, a standard language of the telco field. Within the C software was a long "do... while" construct. The "do... while" construct contained a "switch" statement. The "switch" statement contained an "if" clause. The "if" clause contained a "break." The "break" was supposed to "break" the "if clause." Instead, the "break" broke the "switch" statement.

Ctrl-F the above phrase in

http://www.mit.edu/hacker/part1.html

Security concerns always seem to involve low level code in device drivers or firmware. Indeed, one character in the wrong place and we have problems

Re:The Linux Backdoor Attempt of 2003 by groby_b on Wednesday October 09, 2013 @10:07PM (#6525266)
Also, that statement is guaranteed to be wrong. You don't "break" if clauses. But hey, it's about hackers and on mit.edu, it must be correct :)
Re:The Linux Backdoor Attempt of 2003 by keithpeter on Thursday October 10, 2013 @03:02AM (#6526110)
Yes, I thought that the 'break' keyword wasn't used in if clauses. I took it to mean a problem with line ending resulting in the premature closure of the switch block. Anyone any ideas as to possible syntax?
Re:The Linux Backdoor Attempt of 2003 by epsylon on Thursday October 10, 2013 @05:21AM (#6526493)
It would make sense if the author had meant do clause instead of if clause.

Something like that:

  do {
    switch (bleh) {
      case MEH:
        if (derp) {
          break; /* supposed exit the do..while loop early...
                    except it only exits the switch statement */
        }
        [...]
        break; /* usually there's a break at the end of each
                  case statement, but the programmer might
                  not have seen it if it's far away */
    [...]
    }
    fun_stuff(); /* not supposed to be called when
                    bleh == MEH and derp is non-null */
  } while (quux);