Slashdot Mirror


Homeland Security Uncovers Critical Flaw in X11

Amy's Robot writes "An open-source security audit program funded by the U.S. Department of Homeland Security has flagged a critical vulnerability in the X Window System (X11) which is used in Unix and Linux systems. A missing parentheses in a bit of code is to blame. The error can grant a user root access, and was discovered using an automated code-scanning tool." While serious, the flaw has already been corrected.

517 comments

  1. OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 4, Informative

    Check the CVS server. OpenBSD 0wns again!

    1. Re:OpenBSD fixed on Jan. 21, 2000 by WilliamSChips · · Score: 0, Troll

      Well, since with OpenBSD you can only use software from 2000, thats eems accurate.

      --
      Please, for the good of Humanity, vote Obama.
    2. Re:OpenBSD fixed on Jan. 21, 2000 by belg4mit · · Score: 1

      If that's true, it's nice they saw fit to kick back a patch.

      --
      Were that I say, pancakes?
    3. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0
    4. Re:OpenBSD fixed on Jan. 21, 2000 by LurkerXXX · · Score: 5, Informative

      OpenBSD fixes 'security holes' all the time, without even knowing it. If code looks 'dirty' (hard to read), they will often rewrite it so that it's easier to audit for bugs in the future. Most of the time when they fix a 'hole', they never actually spotted the hole. They were just cleaning up messy looking code. A few years later (like in this case) it will often turn out that there was a security hole hidden in the mess.

      FYI, they do often send the cleaned version back to the codes maintainers, but they can't force them to use the re-arranged code, or port it to other systems. Sorry.

    5. Re:OpenBSD fixed on Jan. 21, 2000 by dietrollemdefender · · Score: 5, Funny
      If code looks 'dirty' (hard to read), they will often rewrite it so that it's easier to audit for bugs in the future.

      That is one brilliant policy! Kudos to whomever implemented that!

      It reminds of an incedent about 12 years ago. A bunch of us entry level programmers were sitting around and this one guy pipes up and says "Look! I wrote an entire function (it was C) in one line!" He did, too. It was one of those 'for' loops with a 'while' and a bunch of things in one line. It was impossible to read. I just shook my head and said, "If there's a bug in that code, and I get assigned to it, I'm coming for you!"

    6. Re:OpenBSD fixed on Jan. 21, 2000 by strabo · · Score: 5, Funny
      March 10 would be more correct

      More specifically, March 10th of 2006. Seven weeks ago.

      Best part was the CVS log:

      Fri Mar 10 17:29:51 2006 UTC (7 weeks, 4 days ago) by deraadt:
      proper geteuid calls because suse hires people who mistype things
    7. Re:OpenBSD fixed on Jan. 21, 2000 by Nutria · · Score: 5, Interesting
      "Look! I wrote an entire function (it was C) in one line!" He did, too. It was one of those 'for' loops with a 'while' and a bunch of things in one line. It was impossible to read.

      That reminds me of the Kernighan quote, which I heartily agree with:
      "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."


      --
      "I don't know, therefore Aliens" Wafflebox1
    8. Re:OpenBSD fixed on Jan. 21, 2000 by drfloyd5 · · Score: 0

      Well there is a good argument for clear consice coding as a part of proper software design.

      Imagine that, fixing security holes "by magic" as a side effect to making easy to understand code.

      I bet that M$ code is a fine mess.

      --
      This too, shall pass.
    9. Re:OpenBSD fixed on Jan. 21, 2000 by sgt_doom · · Score: 1
      Does this mean no more 9/11/01s????

      Or does this mean plenty more????

      IN A DEMOCRACY...THE PEOPLE ARE THE DECIDERS!

    10. Re:OpenBSD fixed on Jan. 21, 2000 by 93+Escort+Wagon · · Score: 1, Insightful

      Fri Mar 10 17:29:51 2006 UTC (7 weeks, 4 days ago) by deraadt:
      proper geteuid calls because suse hires people who mistype things



      Incidentally, this also confirms most non-BSDers' opinion of Theo.
      --
      #DeleteChrome
    11. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0
      What's that? That he's got a sense of humor?

    12. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      Ironic, isnt it, that the most ignorant on any given topic tend to hold the strongest opinion on that same topic? On the other hand, to informed folks the opinion of people who know nothing of which they speak tends to be relegated to garbage status.

      Much like your entire post.

    13. Re:OpenBSD fixed on Jan. 21, 2000 by Brandybuck · · Score: 1

      I bet that M$ code is a fine mess.

      Most proprietary code bases with more than a few version notches in their belts are a mess. It's the nature of the thing. The same problem exists in Open Source, just not to the same degree.

      --
      Don't blame me, I didn't vote for either of them!
    14. Re:OpenBSD fixed on Jan. 21, 2000 by zukakog · · Score: 2, Funny

      Then if I want to do my own debugging, I should only put half my effort into coding!

    15. Re:OpenBSD fixed on Jan. 21, 2000 by Matt+Perry · · Score: 1
      If that's true, it's nice they saw fit to kick back a patch.
      Are you being sarcastic? I'm sure the OpenBSD people did submit the patch. However, the XFree86 people were notorious for ignoring patches and doing their own thing. It was that, combined with the license change, that made many X developers fork the last free version and make it the X.Org server. I'm sure there were many other good patches lost because of the XFree86 developer's attitudes.
      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    16. Re:OpenBSD fixed on Jan. 21, 2000 by miyako · · Score: 1

      I'd never heard that quote before, but I must say that it's one of those that I think should be posted on the front of all CS related course syllabi.
      I'm sure that I'm not alone, I know that I've written code that at the time I thought was quite clever- and then later when I had to debug that area of the code I ended up having to re-write it because I have difficultly understanding exactly what the heck I was doing.
      Luckily, I try to shy away from neat but strange code when I'm doing code that other people will use or look at, so it's easier to deal with code that I actually support.

      --
      Famous Last Words: "hmm...wikipedia says it's edible"
    17. Re:OpenBSD fixed on Jan. 21, 2000 by Kingrames · · Score: 1

      Reminds me about a contest way back where the objective was to write a program with a deliberate security vulnerability in it that was hard to detect.

      The winner had a seemingly innocuous simple program with a triple-equals (===) where a double-equals (==) was needed. A non-standard font may have even further complicated it.

      I have no clue what the result of that was, but I believe it resulted in a user gaining access where they shouldn't have.

      Just goes to show you how easy it is to gloss over these kinds of things.

      --
      If you can read this, I forgot to post anonymously.
    18. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      Uh, yeah, that is the RIGHT way to fix security holes. Proactively, with good design and construction. It's a damned sight better than retroactive patching (aka "turd polishing").

    19. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      But it is true! Only people who never make mistakes are qualified to write secure C code. Those SUSE people clearly weren't good enough, and should be fired at once.

    20. Re:OpenBSD fixed on Jan. 21, 2000 by Ubernurd · · Score: 1

      what language was this?

      "===" won't compile in any language I know.

      Did you maybe mean the person used a SINGLE '=' where you would expect a double?

      if (x = 10) { /* always goes here */
      }

      or I could see it the other way around, too.

      void foo()
      {
              int x = 10; /* some stuff happens */
              x == 0; /* that returns false, is completely legal but has no effect. */ /* x is still 10 */

              if (x != 0) { /* goes in here but you might not expect it to */
              }
      }

      --
      Stack overflow: pid 352258, proc httpd, addr 0x11f7ffff0, pc 0x12000195c Segmentation fault (core dumped)
    21. Re:OpenBSD fixed on Jan. 21, 2000 by Alioth · · Score: 2, Insightful

      The truth sometimes hurts. Theo de Raadt just doesn't dress it up. I wouldn't hire Theo as a diplomat (well, not unless I wanted to actually start a war), but I would hire him as someone who can write secure code. I don't care if he has no social skills; I'm after secure code. That's why we use OpenBSD for security critical things.

    22. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      4 degrees of separation from Vladimir Putin!

      5 degrees of separation from Vladimir Putin!! (Via this guy who hangs on a forum I like called Slashdot.)

      I have the right to say that, right?

    23. Re:OpenBSD fixed on Jan. 21, 2000 by Nutria · · Score: 5, Insightful

      Then if I want to do my own debugging, I should only put half my effort into coding!

      Funny, and almost right.

      Put all your brains, but half of your cleverness into coding.

      IOW, use all your intellect to simplify the code, and only be "clever" (that's a mild pejorative if you haven't figured it out by now) when there's no other way to accomplish the task.

      I have to admit, though, that I was young once, and foolish, and thought it was the height of brilliance to write code (especially C, but even Pascal) in as few lines as possible.

      --
      "I don't know, therefore Aliens" Wafflebox1
    24. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      Huh?

      Since the bug in question was introduced to the X.org source
      tree only on Jan 28 2005, how could this be fixed in 2000?

    25. Re:OpenBSD fixed on Jan. 21, 2000 by clydemaxwell · · Score: 1

      A lot of scripting languages allow a === for strict equality (including type)

      = is assignment, == is equality, and === is often referred to as 'strict equality'. I don't know, however, of any compiled languages that use it.

      --
      Browsing with classic discussion, noscript, at -1 and nested
      no hidden comments and I only mod UP
    26. Re:OpenBSD fixed on Jan. 21, 2000 by plague3106 · · Score: 1

      I know C# will detect all those problems.. I don't even think that the x == 0 will compile.

      Hopefully C / C++ compilers will at least warn of these things as well.

      I try to never have any warnings in the code, just so that things like this are easier to catch.

    27. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      Why didn't he report this flaw to the maintainers?

    28. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      the commit
      it looks suspisiously very much like a planted backdoor rather than a fix. Egbert Eich works for SuSE.

    29. Re:OpenBSD fixed on Jan. 21, 2000 by Kjella · · Score: 2, Insightful

      IOW, use all your intellect to simplify the code, and only be "clever" (that's a mild pejorative if you haven't figured it out by now) when there's no other way to accomplish the task.

      And the collorary to that: If you are (trying to be) clever, leave comments about what you're doing. Whoever might have to review/fix your code will greatly appriciate it. Remember, that person might be YOU. While I still try to be clever a little too often, it makes it incredibly much easier to fix.

      --
      Live today, because you never know what tomorrow brings
    30. Re:OpenBSD fixed on Jan. 21, 2000 by Ender_Stonebender · · Score: 1

      C and C++ let you define (and overload existing) operators. Hide that code by obfuscating it in a header or a #define, and === will work just fine and dandy.

      --
      Loose things are easy to lose. You're getting your hair cut. They're going there to see their aunt.
    31. Re:OpenBSD fixed on Jan. 21, 2000 by gfxguy · · Score: 1

      Yes, I've always found it annoying when people are trying to optimize their code instead of leaving it simple. If you leave it simple you're less likely to end up with bugs. Then you profile and see where you can improve speed. I've found that when most people try to optimize right off the bat, it's the worst code to debug.

      --
      Stupid sexy Flanders.
    32. Re:OpenBSD fixed on Jan. 21, 2000 by belg4mit · · Score: 1

      No, I was being skeptical.

      Even if they are pricks, it's hard to believe that they would have simply ignored such a simple
      path; a parenthesis. Now, if they included their entire rewrite in the patch then—while still
      uncool—it's a little more understandable how it could have fallen through the cracks.

      If I have a fancy new project of Apache with embedded MySQL and discover a bug in Apache,
      I should not send a diff of my chimera code against the official Apache branch and expect them to apply it.

      --
      Were that I say, pancakes?
    33. Re:OpenBSD fixed on Jan. 21, 2000 by stoborrobots · · Score: 2, Informative

      It sounds like you're thinking of the Underhanded C Contest... The 2005 results look something like what you're describing... :-)

      HTH. Cheers.

    34. Re:OpenBSD fixed on Jan. 21, 2000 by Anonymous Coward · · Score: 0

      Ahhh!!...Now I understand. So THIS is why we have Homeland Security...to do code reviews.

    35. Re:OpenBSD fixed on Jan. 21, 2000 by ultranova · · Score: 1

      I have to admit, though, that I was young once, and foolish, and thought it was the height of brilliance to write code (especially C, but even Pascal) in as few lines as possible.

      It is. But the correct way to do it is to make sure that anything that gets done more than once is made either a macro or a function. That way code is both maintainable and more secure, since you don't have to hunt down every place that checks some condition, if it turns out that the check has a bug in it.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    36. Re:OpenBSD fixed on Jan. 21, 2000 by Kingrames · · Score: 1

      Indeed, it was exactly that. Thank you for the link.

      --
      If you can read this, I forgot to post anonymously.
    37. Re:OpenBSD fixed on Jan. 21, 2000 by Nutria · · Score: 1
      height of brilliance to write code (especially C, but even Pascal) in as few lines as possible.

      It is.


      Only if your definition of brilliance includes
      hey, look at how little I care about the next schmuck who's got to maintain this code!!
      --
      "I don't know, therefore Aliens" Wafflebox1
    38. Re:OpenBSD fixed on Jan. 21, 2000 by ultranova · · Score: 1

      Only if your definition of brilliance includes

      hey, look at how little I care about the next schmuck who's got to maintain this code!!

      I believe that I made perfectly clear that the correct way to reduce code size is removing redundancy, not removing line breaks. Reducing redundancy makes the code easier to maintain, not harder. As a concrete example, imagine if someone decided to save compile time by copy-pasting the same data structure definition into each C file instead of putting it into a header file and including that from each file. Which code base would you want to maintain, the header-using size-optimized version or compile-time-optimized ?-)

      Another good example are the scheduling macros in the Linux kernel. The more instances there are of "SCHED_RT(policy)" instead of "(policy == SCHED_FIFO || policy == SCHED_RR)" the less likely it is that someone accidentally leaves out one equals mark...

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    39. Re:OpenBSD fixed on Jan. 21, 2000 by Nutria · · Score: 1

      I believe that I made perfectly clear that the correct way to reduce code size is removing redundancy, not removing line breaks. Reducing redundancy makes the code easier to maintain, not harder.

      That goes without saying, though. Modularity and data-hiding were the very first things we were taught in CompSci 210 (COBOL I, it was a long time ago).

      For young C coders, though, "brilliance" is writing routines in as few physical SLOCs as possible, using every obscure technique possible.

      Well, it was 15 years ago, when 32MB was a lot, and DOS was king and VAX/VMS still popular.

      --
      "I don't know, therefore Aliens" Wafflebox1
  2. Related news by LiquidCoooled · · Score: 5, Funny

    In related news, the Department of Homeland security has notifed 3497 people where their missing TV remote control is to be found, where your wife was until 3am last Thursday and have completed a record number of soduku puzzles in newspapers around the country.

    Government officials were unwilling to cite their sources for this information instead choosing to simply say "we are watching you".

    --
    liqbase :: faster than paper
    1. Re:Related news by rbochan · · Score: 5, Funny

      "This message brought to you by AT&T"

      --
      ...Rob
      The American Dream isn't an SUV and a house in the suburbs; it's Don't Tread On Me.
    2. Re:Related news by PlusFiveTroll · · Score: 4, Interesting

      Should this be modded funny or sad?

    3. Re:Related news by Bush+Pig · · Score: 3, Insightful

      What I'd really like to know is how come the code even compiled if it was missing a closing parenthesis somewhere. None of mine ever does in that circumstance.

      --
      What a long, strange trip it's been.
    4. Re:Related news by x2A · · Score: 4, Funny

      oh yeah, it was also missing the opening one, but it sounds like a bigger danger if they only point out the closing one was missing (OMG, it was left open!) ;-)

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    5. Re:Related news by dimator · · Score: 2, Funny

      Can they get on the missing socks situation now, or what?

      --
      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
    6. Re:Related news by mattwarden · · Score: 5, Informative

      You're misinterpreting what the problem was. It was a change from this:

      if (getuid() == 0 || geteuid != 0)

      to this:

      if (getuid() == 0 || geteuid() != 0)

    7. Re:Related news by LiquidCoooled · · Score: 1

      I gather its a missing pair of brackets otherwise it would not be compilable.
      Isn't it something to do with reference and value?
      ie passing a value without brackets indicates the parameter by reference and passing inside an expression passes the result in? (that might be VB type code only though)

      It could even be something in the pointer math, the difference between (1+a*10) and (1+a)*10 leaving the program to run over uninitialised memory?

      --
      liqbase :: faster than paper
    8. Re:Related news by Anonymous Coward · · Score: 0

      Wins what?

    9. Re:Related news by fbjon · · Score: 2, Insightful

      It's not always matching because getuid != geteuid.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    10. Re:Related news by nuzak · · Score: 2, Insightful
      --
      Done with slashdot, done with nerds, getting a life.
    11. Re:Related news by online-shopper · · Score: 2, Informative

      Doh! I missed the euid. please mod the above post to oblivion

    12. Re:Related news by mab · · Score: 1

      Well he was correct check out

      the diff and the notice

    13. Re:Related news by Anyar · · Score: 1

      At having just as elitist and idiotic fanboys as all the other OSes? (BTW, I use OSX, so I'm not flaming mac users, just everyone who raves about their OS and how it pwns everything else)

    14. Re:Related news by Columcille · · Score: 2, Informative

      Check again, getuid() and geteuid() are not the same, so:

      if (getuid() == 0 || geteuid() != 0)

      means something like if the real user id executing the process is 0 (root), or if the effective user id of the process is not 0 (root), then execute the following code.

      See here and here.

      I'm not quite sure what the difference is between the real and the effective user id, perhaps someone can enlighten us.

      --
      I love my sig.
    15. Re:Related news by prockcore · · Score: 4, Insightful


      You're misinterpreting what the problem was. It was a change from this:

      if (getuid() == 0 || geteuid != 0)

      to this:

      if (getuid() == 0 || geteuid() != 0)


      This is why stuff should compile *without warnings*. It drives me nuts to compile something and see hundreds of warnings spit out.

      (And yes, gcc will throw a warning if you compare a function pointer with 0 instead of NULL)

    16. Re:Related news by Lally+Singh · · Score: 1

      Not a single paren (closing or opening), but likely a missing pair of parenthesis around a subexpression, with resulting undesirable operator precedence.

      --
      Care about electronic freedom? Consider donating to the EFF!
    17. Re:Related news by _Sprocket_ · · Score: 2, Funny

      Just because the NSA is listening to you, doesn't mean they're gonna make your decisions for you.

      (that's the job of Congress and industry trade groups)

    18. Re:Related news by mrchaotica · · Score: 0, Redundant

      Here's an idea: fix your code and then it'll compile without warnings!

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    19. Re:Related news by Anonymous Coward · · Score: 0

      This is exactly why I hate function pointers...

    20. Re:Related news by drawfour · · Score: 1, Informative
      GP said:
      This is why stuff should compile *without warnings*. It drives me nuts to compile something and see hundreds of warnings spit out. (And yes, gcc will throw a warning if you compare a function pointer with 0 instead of NULL)

      You said:
      Here's an idea: fix your code and then it'll compile without warnings!

      That's exactly what he said! He said he's sick of code spitting out hundreds of warnings when you compile. In other words, FIX THE CODE so that it doesn't spit out warnings. The point here is that not only did the developers of this code allow it to compile with warnings, but they didn't even check what those warnings were to verify that they were benign! And let's face it, if you take the time to check on a warning, it doesn't take too much extra time to make it so there is no longer a warning.
    21. Re:Related news by pyite · · Score: 1

      It's hard to tell, but perhaps he meant that it's not enough to have the code compile without errors. It needs to compile without warnings.

      --

      "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

    22. Re:Related news by Anonymous Coward · · Score: 0

      Now would that 0 be an int? an unsigned int? a float? oh damn, which kind of several floats where zero isn't necessairly zero if converted from lower precision to higher...

      oh shit! F'n IEEE and F'n Microsoft BASIC and FORTRAN

      damn damn damn

      It's been 8 minutes since you last successfully posted a comment

      It's been 10 minutes since you last successfully posted a comment

    23. Re:Related news by Anpheus · · Score: 3, Insightful

      They can only make your decisions for you when you use an unencrypted method of communication.

    24. Re:Related news by Anonymous Coward · · Score: 1, Informative

      > (And yes, gcc will throw a warning if you compare a function pointer with 0 instead of NULL)

      What version of gcc are you running? Did you actually try it or did you just assume that it would be true?

      If you compare a pointer against an integer constant you'll get a warning. However, "0" is special in ANSI C since it's a synonym for NULL. It's perfectly valid to compare a pointer of any type against zero. Some static-analsis tools like Linus's "sparse" are more picky but I don't believe any versions of gcc would ever emit a warning about that. Try it:

      extern int foo(const char *a);
      int xxx(void) { return foo == 0; }

    25. Re:Related news by EvanED · · Score: 1

      Um, the literal 0 is an int.

      Also, the code compiles without warning with 'gcc -W -Wall' (3.4.3), Sun cc (no options; 5.8), and MSVC (level 4 warnings, 8.0).

    26. Re:Related news by Reverend528 · · Score: 5, Funny
      This is why stuff should compile *without warnings*. It drives me nuts to compile something and see hundreds of warnings spit out.

      It drives me nuts too. That's why i use the -fsyntax-only option whenever I compile anything. It gets rid of the warnings so you know your code is safe!

    27. Re:Related news by Feyr · · Score: 1


      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
      </quote>

      give me my perl any day!

    28. Re:Related news by nickmue · · Score: 1

      Correct me if I am wrong, but wouldn't you enter this if statement no matter what?

    29. Re:Related news by x2A · · Score: 1

      Whoever modded that informative, it was actually a joke... although thinking about it, it could be true, but if anyone could check before modding it further :-p

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    30. Re:Related news by SleepyHappyDoc · · Score: 3, Funny

      In related news, the Department of Homeland security has notifed 3497 people where their missing TV remote control is to be found

      No, no, that's a flaw in X10, not X11. That missing remote behaviour is an undocumented feature.

      --
      Stasis is death. Embrace change.
    31. Re:Related news by sholden · · Score: 1

      (And yes, gcc will throw a warning if you compare a function pointer with 0 instead of NULL)

      That better not be true... Since ANSI C says that NULL is 0.

      And in fact I know it isn't, since the C library my installation of gcc is using has the following in stdlib.h and all my programs that compare function pointers with NULL compile without warnings:

      #define NULL 0

      You couldn't take 10 seconds to actually test your idiotic claim?

    32. Re:Related news by HeroreV · · Score: 1, Insightful

      So one function returns 0 when successful, while the other returns 0 when unsuccessful? What the hell is going on here?

      Not even considering the bug, that's some pretty horrific coding. Is all of X written this poorly?

    33. Re:Related news by Anonymous Coward · · Score: 1, Informative

      Yes ANSI C requires NULL to be 0, but isn't it usually typed as a void pointer? If I remember right, void pointers normally aren't compatible with function pointers (unless gcc has "fixed" that deficiency).

      Here are the relevant lines from /usr/include/linux/stddef.h on my Ubuntu box:

      #undef NULL
      #if defined(__cplusplus)
      #define NULL 0
      #else
      #define NULL ((void *)0)
      #endif

    34. Re:Related news by jspraul · · Score: 1

      Perhaps he misinterpreted the problem because it was stated in the summary as "A missing parentheses" which leaves room for several interpretations, primarily involving the difficulty caused by the fact that "A missing" (singular) + "parentheses" (plural) requires a bit of parsing. (As many have mentioned, a better phrasing may be "A missing pair of parentheses"...) Were a single parenthesis missing, it would not have compiled.

    35. Re:Related news by w9ofa · · Score: 2, Informative

      You missed the point. The value of NULL is 0, but what is a NULL reference?

      Conventional C programmers (not C++) define NULL as (void *) 0x0.

    36. Re:Related news by ameline · · Score: 1

      No, the parenthesis (missing, in this case) tell the compiler to call the function. The naked function name -- without the parenthesis -- is the address of the function, and it will be non 0.

      --
      Ian Ameline
    37. Re:Related news by NuclearDog · · Score: 1
      Wanna take a look at the code for a second? Maybe think about it?

      Here, lemme guide you:

      getuid()==0


      `get uid`, as in `get user id`. What makes you think 0 has anything to do with an error condition? 0 simply means the user's user-id is 0, which, on most *nix systems, happens to be root.

      if (getuid() == 0 || geteuid() != 0)


      If the user is logged in as root, but their effective uid is not root (they're running this via sudo, su, something), then run this block of code...

      ND
      --
      This statement is forty-five characters long.
    38. Re:Related news by AtrN · · Score: 1

      Mod's insightful? More like troll. Those aren't X11 functions and the result type being compared is not a success code. They're user id.'s and zero just happens to be the super-user.

    39. Re:Related news by Anonymous Coward · · Score: 0

      It does not take long to fix the warnings. I have found in writing code that GCC is warning me that there are possible problems with the code. If I take the time to clean up the code when I write it, fixing the warnings is easy. Now Xilinx tools I find generate some many crappy warnings on VHDL that this is a different story (example, I explicitly connect an unused output to open and the tools warn me that I have connected the signal to open).

    40. Re:Related news by Isotopian · · Score: 2, Funny

      I didn't even know there was a 'sad' mod! Can we apply it to all the posters who make Yakov Smirnov Jokes?

      --

      It's poetry with a beat behind it! And guns! They're like beatniks with automatic weapons.

    41. Re:Related news by cgenman · · Score: 2, Funny

      You can have my decision-making encryption power when you pull it from my cold... dead... Hey! What are you doing? It was just a metaphor! A metaphor! Wait! Noooo!

      $#$#%... [signal lost]

    42. Re:Related news by Schraegstrichpunkt · · Score: 1

      With some cleverness, they can still make your decisions for you, even if your communication is encrypted, if it's not also authenticated.

    43. Re:Related news by Schraegstrichpunkt · · Score: 2, Informative
      That better not be true... Since ANSI C says that NULL is 0.

      I don't know about ANSI, but ISO/IEC 9899:1999(E) (a.k.a. "C99"), under section 7.17 "Common definitions <stddef.h>" states:

      1 The following types and macros are defined in the standard header <stddef.h> . Some are also defined in other headers, as noted in their respective subclauses.

      ...

      3 The macros are

      NULL
      which expands to an implementation-defined null pointer constant;
      Under section 6.3.2.3 "Pointers", the "null pointer constant" is defined as follows:
      3 An integer constant expression with the value 0, or such an expression cast to type void * , is called a null pointer constant. If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to and object or function.
    44. Re:Related news by Schraegstrichpunkt · · Score: 1
      and object or function.

      Bah. That should read, "any object or function."

    45. Re:Related news by Anonymous Coward · · Score: 0

      Nerdiest. Thread. Ever.

    46. Re:Related news by aybiss · · Score: 0

      if (getuid() == 0 || geteuid() != 0) I think if you compile this a modern compiler will warn you the statemnt can never be false.

      --
      It's OK Bender, there's no such thing as 2.
    47. Re:Related news by jeremyp · · Score: 1
      jeremyp@pamela:jeremyp$ gcc --version
      powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5250)
      Copyright (C) 2005 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

      jeremyp@pamela:jeremyp$ cat warning.c
      #include <stdio.h>

      int foo ()
      {
      return 1 ;
      }

      int main ()
      {
      if (foo == 0)
      {
      printf ("Ba\n") ;
      }
      return 0 ;
      }
      jeremyp@pamela:jeremyp$ gcc -Wall warning.c
      jeremyp@pamela:jeremyp$
      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    48. Re:Related news by shutdown+-p+now · · Score: 1

      No, I'm afraid that it was rather you who missed the point. The comparison did not trigger an error or a warning because literal 0, depending on the context, can be of any pointer type, not just an integer. So foo==0 is an absolutely valid C expression even if foo is a pointer to function, and is indeed a proper way to test for a null pointer value in C, according to ANSI C.

    49. Re:Related news by cortana · · Score: 1

      For more indepth information that any human should really posess about the topic, see Setuid Demystified.

    50. Re:Related news by sholden · · Score: 1

      Notice the word or. NULL can be 0 or NULL can be (void*)0.

      Since 0 is a perfectly valid definition of NULL according to the standard then if (p==0) is also perfectly valid when p is a pointer to a function.

    51. Re:Related news by sholden · · Score: 1

      It can be. The standard allows both. There are arguments for both ways, so of course the standard said "either way is fine".

      C++ tightened it up and requires 0 (ie. the argument was won by one side in the C++ committee).

    52. Re:Related news by Andrewkov · · Score: 1

      Why not? getuid() and geteuid() are different functions.

    53. Re:Related news by Flammon · · Score: 1

      See, I knew they should have written this thing in Ruby.

    54. Re:Related news by radtea · · Score: 1


              NULL

      which expands to an implementation-defined null pointer constant;


      This is why Stroustrup recommends using 0 rather than NULL in C++ code. 0 will always be cast to the right type, NULL may or may not be, resulting in spurious warnings.

      --
      Blasphemy is a human right. Blasphemophobia kills.
    55. Re:Related news by Schraegstrichpunkt · · Score: 1

      Why is it that when you see a reply to a message on Slashdot, you assume the person disagrees?

    56. Re:Related news by Schraegstrichpunkt · · Score: 1

      Never mind. It looks like I just did the same thing. :-/

    57. Re:Related news by Marlow+the+Irelander · · Score: 1

      if (getuid() == 0 || geteuid() != 0)


      If the user is logged in as root, but their effective uid is not root (they're running this via sudo, su, something), then run this block of code...


      I don't program in C (yet, planning to learn it over the summer), but isn't || "or"? Also, my copy of Advanced Programming in the UNIX Environment informs me that geteuid is related to the suid bit on a file (i.e. gives the uid of the file's owner in that circumstance, gives the uid of the user running the process otherwise), not su or sudo.

      Therefore, in English, this code actually reads "if root is running this program, or if this file is not suid-bitted and run by a non-root user, or it is suid-bitted and owned by a non-root user"

      In simpler terms, if the file is setuid root but not actually run by root, skip the bit in the if.

      At least, that's my understanding, IANACP.

    58. Re:Related news by aybiss · · Score: 0

      :-D Crap! And I thought I reread that SOOO many times. My bad.

      Is this another way a security hole could happen? :-p

      --
      It's OK Bender, there's no such thing as 2.
    59. Re:Related news by NuclearDog · · Score: 1

      So, why did you not look it up in the first place rather than talking out of your ass and having me talk out of my ass? ;P

      ND

      --
      This statement is forty-five characters long.
    60. Re:Related news by Marlow+the+Irelander · · Score: 1

      I'm sorry? "In the first place"? I'm not the grandparent poster, you know, that was my first comment. I just made a correction to your explanation.

    61. Re:Related news by aminorex · · Score: 1

      Some things that are PERMITTED are also STUPID.

      --
      -I like my women like I like my tea: green-
  3. Only one? by Anonymous Coward · · Score: 3, Interesting

    They uncovered only one flaw? Sheesh.

    1. Re:Only one? by Frosty+Piss · · Score: 4, Funny
      They uncovered only one flaw? Sheesh.

      Only one that they are telling us about...

      --
      If you want news from today, you have to come back tomorrow.
    2. Re:Only one? by samsonov · · Score: 0

      They uncovered only one flaw? Sheesh.

      Yes, but what they didn't tell you is it took them a year to do so, it cost $40 billion of taxpayer's money and 5 highly paid individuals to find it. But who's counting...

      --
      "You killed my yogurt!" --Fred Fredburger
    3. Re:Only one? by Midnight+Thunder · · Score: 1

      They uncovered only one flaw? Sheesh.

      Look on the bright side, since unlike SCO they actually told people where it was.

      --
      Jumpstart the tartan drive.
  4. Way to go, boys! by Junior+J.+Junior+III · · Score: 5, Funny

    Kudos to the heroes who painstakingly reinserted the missing parenthesis!

    --
    You see? You see? Your stupid minds! Stupid! Stupid!
    1. Re:Way to go, boys! by dimator · · Score: 1

      This was like the 3rd time since I've been reading /. that I've laughed out loud. Nice work.

      --
      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
    2. Re:Way to go, boys! by Anonymous Coward · · Score: 0

      And according to the original article, all the work was complete within a week! Woot!

    3. Re:Way to go, boys! by Andrewkov · · Score: 1

      I for one welcome our new parenthesis adding overlords.

  5. Any word on the fix? by FirstTimeCaller · · Score: 5, Funny

    A missing parentheses in a bit of code is to blame...the flaw has already been corrected.

    Any word on exactly what the fix was?

    --
    Wanted: witty unique signature. Must be willing to relocate.
    1. Re:Any word on the fix? by metroplex · · Score: 2

      Reinserting the parenthesis, duh

      --
      "Words of wisdom: drop that zero and get with the hero" -- Vanilla Ice
    2. Re:Any word on the fix? by Anonymous Coward · · Score: 0

      I think you been trolled

    3. Re:Any word on the fix? by RLiegh · · Score: 3, Funny

      Would half a parenthesis be considered a word?

    4. Re:Any word on the fix? by RemovableBait · · Score: 5, Funny
      * <-- Joke
      * <-- Your Head
    5. Re:Any word on the fix? by poot_rootbeer · · Score: 1

      Reinserting the parenthesis, duh

      How do you know they didn't just remove the match-less parenthesis instead?

    6. Re:Any word on the fix? by mattwarden · · Score: 0

      maybe because there was no unmatched parenthesis

    7. Re:Any word on the fix? by Anonymous Coward · · Score: 0

      Agh! C, you bastard.... That is truly a very funny security issue...

      And now I understand how an automated tool found it so easily...

    8. Re:Any word on the fix? by Bios_Hakr · · Score: 1

      That's the funniest thing I've seen all day. It's like 1PM here and my morning was a real shitfest. And, after I clean my monitor and keyboard, I'm sure my afternoon will be better. Thanks.

      --
      I'd rather you do it wrong, than for me to have to do it at all.
    9. Re:Any word on the fix? by fryguybob · · Score: 1

      yeah an automated tool like "treat warnings as errors".

    10. Re:Any word on the fix? by Mathiasdm · · Score: 1

      Try to make a coherent sentence with the following words:
      -you
      -point
      -woosh!

      --
      Join the anonymous, help develop the network: http://www.i2p2.de
    11. Re:Any word on the fix? by dp_wiz · · Score: 1

      copypusting is evil

    12. Re:Any word on the fix? by Kristoffer+Lunden · · Score: 1

      Would half a parenthesis be considered a word?

      Depends on how you split it, but both "parent" and "thesis" are words.

  6. Re:Here is the actual flaw: by eln · · Score: 2, Funny

    Shouldn't that be:

    (X11 sucks monkey cock

  7. Related news-Kill the messenger. by Anonymous Coward · · Score: 0

    Would you have felt better if they hadn't found the flaw?

    1. Re:Related news-Kill the messenger. by LiquidCoooled · · Score: 1

      No, I actually think the audit process they initiated is a really good thing for any company to do, and should even be manditory for all Government departments.

      The company (Coverity) which did the audit are the ones who should be thanked not the DHS. This flaw would have been discovered by this company anyway, its their business to find faults.
      The bonus that they actually found a bug is nice, however lets not get happy happy joy joy yet, its a local exploit not a wide open remote hole.

      The DHS should be busy protecting the Americans and not trying to grab the headlines.

      --
      liqbase :: faster than paper
    2. Re:Related news-Kill the messenger. by FuzzyDaddy · · Score: 1
      The company (Coverity) which did the audit are the ones who should be thanked not the DHS.

      DHS paid for the company to do this. It was a government initiative. Hence, some props to DHS are in order. And to Coverity, of course, for doing a good job.

      --
      It's not wasting time, I'm educating myself.
    3. Re:Related news-Kill the messenger. by Plunky · · Score: 1
      DHS paid for the company to do this. It was a government initiative. Hence, some props to DHS are in order.

      Lets not forget who caused the DHS to be set up, props to Bush and props to Osama

      Ra! Ra! Ra! The US taxpayers!

      and props to St Brendan, Lief Ericsson and John Cabot! Yaay!

    4. Re:Related news-Kill the messenger. by Anonymous Coward · · Score: 0

      and props to St Brendan, Lief Ericsson and John Cabot! Yaay!

      Blimey. I thought it was only people who lived in Bristol and Newfoundland who had ever heard of John Cabot. Unless of course you live in Newfoundland.

    5. Re:Related news-Kill the messenger. by Ender_Stonebender · · Score: 1

      You forget the Continental Congress, the United States Army (or whatever it was called during the Revolutionary War), the Congress that allowed DHS to be set up and funded, and of course the American agencies that trained Osama and crew during the Cold War.

      Credit where credit is due, after all.

      --Ender

      --
      Loose things are easy to lose. You're getting your hair cut. They're going there to see their aunt.
    6. Re:Related news-Kill the messenger. by Phillup · · Score: 1

      the United States Army (or whatever it was called during the Revolutionary War),

      Depends on who you asked.

      To the British they were traitors and terrorist.

      To the natives they were immigrants.

      Today, they are mostly called hypocrites...

      --

      --Phillip

      Can you say BIRTH TAX
  8. legacy by spud603 · · Score: 1

    how long has this hole been in X11, i wonder?

    1. Re:legacy by mattmatt · · Score: 1

      From the article: "The flaw, which affects X11R6.9.0 and X11R7.0.0, ..."

  9. Already Corrected? by mythosaz · · Score: 1, Insightful

    Already corrected on what?

    Is LinuxUpdate.linux.com going to send this out on Tuesday automatically and reboot my machine?

    Oh sure, I'm trolling - but the point is this ISN'T updated on machines around the world. It's updated on a few machines that HAVE some sort of auto-update service (of which many required a fee with your "enterprise service license") and it may or may not be updated when you install a new machine.

    I know *MY* servers aren't updated...yet.

    1. Re:Already Corrected? by Anonymous Coward · · Score: 0

      I know *MY* servers aren't updated...yet.

      Why are your servers running X?

    2. Re:Already Corrected? by Vyvyan+Basterd · · Score: 5, Insightful

      Why are you running X11 on your servers?

    3. Re:Already Corrected? by Jason+Earl · · Score: 1

      Your servers are running X? What for?

    4. Re:Already Corrected? by KiloByte · · Score: 1

      blah blah DSA-1234 blah blah
      *triggered*! Doing: ssh foo;su -;apt-get update;apt-get dist-upgrade; ssh bar...

      What auto-update services were you talking about, again?

      As restarting most daemons is likely to cause disruption, you can't do this without thinking; thus, fully automatic updates are a bad idea unless the users are mindless. As servers are not operated by monkeys but by people who are *supposed* to have a clue, notification is a must, but actually applying the update shouldn't be done as a cronjob. (Of course, apt-get update && apt-get -d -y dist-upgrade (cron-apt) is a worthy thing).

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    5. Re:Already Corrected? by Neil+Watson · · Score: 1

      Certain applications, e.g. Oracle and DB2, highly recommend or even force an X based installation procedure.

    6. Re:Already Corrected? by MadMidnightBomber · · Score: 1
      I know *MY* servers aren't updated...yet.

      I think I speak for all of us here when I say: FOR THE LOVE OF BOB, MAN! WHY ARE YOU RUNNING X ON YOUR SERVERS?

      --
      "It doesn't cost enough, and it makes too much sense."
    7. Re:Already Corrected? by Arandir · · Score: 1

      Mod parent up. Servers should NOT be running X servers. In fact, you should not run an X server on any system with untrusted accounts.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    8. Re:Already Corrected? by Anonymous Coward · · Score: 5, Funny

      Maybe it's an X11 server.

    9. Re:Already Corrected? by icydog · · Score: 1

      You're basically saying that machines that don't have an auto-update function somehow won't be magically updated. Brilliant. Of course, if you don't enable automatic updates on other operating systems, they will still magically discover flaws in their code and magically fix themselves as advisories are released.

    10. Re:Already Corrected? by wobblie · · Score: 3, Insightful

      uh, you display it somewhere else.

    11. Re:Already Corrected? by walmartshopper67 · · Score: 1

      Who cares about his servers, why is the Department of Homeland Security running x on THEIR servers.

    12. Re:Already Corrected? by Neil+Watson · · Score: 1

      Please explain that comment.

    13. Re:Already Corrected? by Anonymous Coward · · Score: 0

      I would do something along the lines of ssh root@foo apt-get update \&\& apt-get dist-upgrade or even throw a for loop there rather than what you suggest.

    14. Re:Already Corrected? by Afrosheen · · Score: 1

      Still no argument. You install X11, install whatever program absolutely requires it, then uninstall it after you're finished. For the lazier, you just take it out of the startup sequence and leave it installed but never running..just in case you need it again sometime. From a security standpoint the former is better than the latter but sometimes convenience gets first priority.

    15. Re:Already Corrected? by a_n_d_e_r_s · · Score: 1

      No it won't reboot your servers - because one don't have to reboot a Linux system to upgrade the X Window System.

      Its Linux we're talking about.

      It might upgrade X11 though - but thats a good thing.

      --
      Just saying it like it are.
    16. Re:Already Corrected? by Karma+Farmer · · Score: 1

      Certain applications, e.g. Oracle and DB2, highly recommend or even force an X based installation procedure.

      Oracle installation runs as an X11 client, and requires that only the client libraries be installed. The X11 server runs on the administrator's desktop.

      Of course, TFA doesn't bother to explain if the hole is in the server or the client libraries. I'm assuming they mean the server, but who the hell knows?

    17. Re:Already Corrected? by Anonymous Coward · · Score: 0

      X11 can run across a network. That's what it what designed to do. You can run the install program on the server while running the X server on another machine.

    18. Re:Already Corrected? by x2A · · Score: 1

      You can have the libs etc there without having X running... or, as i prefer, run an X11 vnc only server, which can run as a lower privelidged user, and you can connect in and out of it when you need.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    19. Re:Already Corrected? by Aerion · · Score: 1

      We need 16 GB of RAM on 16 EV67's to run Firefox.

      Damn memory leaks.

    20. Re:Already Corrected? by nagora · · Score: 2, Insightful
      Servers should NOT be running X servers.

      That's gonna ruin someone's LTS system.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    21. Re:Already Corrected? by Elwood+P+Dowd · · Score: 1

      If the installer or other tools require X11, that's fine. It doesn't require you to run X11 on the actual server that's going to run Oracle. At least I can't imagine it does. Wherever you're doing the install, you can send those X11 windows off to your desktop via the X11 network transport.

      Your oracle server wouldn't need to have an X11 server installed.

      --

      There are no trails. There are no trees out here.
    22. Re:Already Corrected? by Karma+Farmer · · Score: 1

      You install X11...

      Is this a joke? Why would you need to install an X server to run X client applications? Do you even understand what X is?

    23. Re:Already Corrected? by ModernGeek · · Score: 1

      I have a friend that I cannot convince that running X11 and KDE on a server is a security risk. You guys should tell him different, his website is at www.securenix.org What can I tell him to change his mind? He says his expertise is in UNIX-based operating system security.

      --
      Sig: I stole this sig.
    24. Re:Already Corrected? by Zackbass · · Score: 1
      We need 16 GB of RAM on 16 EV67's to run Firefox.

      Damn memory leaks.


      You probably think he's joking but I know the server he's talking about. For those concerned, yes, it's used for more than Firefox. They also use the GIMP and XScreenSaver.
      --
      You gotta find first gear in your giant robot car
    25. Re:Already Corrected? by linvir · · Score: 1

      I don't think they are.

    26. Re:Already Corrected? by dorkygeek · · Score: 1
      They aren't. But I guess they were snooping on someones servers who does...

      --
      Windows is like decaf - it tastes like the real thing, but it won't get you through the day.
    27. Re:Already Corrected? by tokabola · · Score: 1

      If you don't have an X server, what, pray tell, are the clients going to connect to? There HAS to be an X server running, although it could be on another box. Do you even understand how X windows works?

      --
      Open Source for Open Minds
    28. Re:Already Corrected? by MrCreosote · · Score: 1

      You can have X installed without it running all the time ie init 3 vs init 5. Even with init 3, you may still want to have X installed and run a vncserver.

      --
      MrCreosote Meow!Thump!Meow!Thump!Meow!Thump! "You're right! There isn't enough room to swing a cat in here!"
    29. Re:Already Corrected? by walt-sjc · · Score: 1

      Case in point: everytime X is updated on Debian, I have to re-install the nvidia driver. PITA.

    30. Re:Already Corrected? by Anonymous Coward · · Score: 0
      > I know *MY* servers aren't updated...yet.

      I know *MY* server are not running X :)

    31. Re:Already Corrected? by zuluechopapa · · Score: 1

      at the risk of torlling a troll... so he can point and click? :)

      --
      even the magic 8 ball has an opinion on email clients: Outlook not so good.
    32. Re:Already Corrected? by dotgain · · Score: 1
      In that case, isn't it a client to a number of servers, or a server of clients, or...

      (Head explodes).

    33. Re:Already Corrected? by Directrix1 · · Score: 1

      Or just install Xauth only on the server and forward to your desktop X11 connection with 'ssh -X'.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    34. Re:Already Corrected? by cortana · · Score: 2, Insightful

      In which case it won't be running the X server, which is the program in which this flaw resides. :)

    35. Re:Already Corrected? by quanticle · · Score: 1

      That's pretty much what he means. Don't install an X server on the box you're installing on, have the X Server on your client and use X Forwarding to get the graphical interface.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    36. Re:Already Corrected? by Anonymous Coward · · Score: 0

      I know when I read the initial article, I ran apt-get update;apt-get upgrade on my Debian box (and 117 Megabytes of download automatically checked themselves with md5 and friends for security before installing (automatically) on my machine. My effort involved typing the command, pressing return, and being patient till it was all done (about 5 minutes). Umm, sorry, I didn't have to pay one sorry nickel for the software. I suspect several billion other Debian users would have passed on their undying gratitude (and you could too, if you weren't so anal retentive about it). But go ahead camper, keep ranting about having to get up instead of peeing the bed at night, having to put on your own clothes in the morning, oh, and this too. Oh bother!

    37. Re:Already Corrected? by Just+Some+Guy · · Score: 3, Funny
      Is LinuxUpdate.linux.com going to send this out on Tuesday automatically and reboot my machine?

      $ dig -t cname LinuxUpdate.linux.com
      LinuxUpdate.linux.com. 86400 IN CNAME ftp.us.debian.org.
      LinuxUpdate.linux.com. 86400 IN CNAME portsnap.freebsd.org.
      LinuxUpdate.linux.com. 86400 IN CNAME ftp.ubuntu.com.

      $ dig -t txt LinuxUpdate.linux.com
      LinuxUpdate.linux.com. 86400 IN TXT "Tonight, she comes."

      Yes.

      --
      Dewey, what part of this looks like authorities should be involved?
    38. Re:Already Corrected? by Feyr · · Score: 1

      it doesn't, i installed oracle a few months ago and exported the display to my worksation

      for the original poster, if you're on a local network:
      first allow the host to connect (yes i know im allowing every hosts here, but it's a local network, and likely temporary). that is done in a console on your workstation
      > xhost +
      then init the DISPLAY env variable on the "server" you're installing oracle on (through ssh, or the console)
      > export DISPLAY=myworkstationip:0
      then run the oracle install on the server (sorry, forgot the name of the installer)
      > ./installoracle.sh

      replace where appropriate and voila, the installer window will pop up on your workstation

    39. Re:Already Corrected? by Anonymous Coward · · Score: 0

      To continue along those lines (trolling), I just installed gentoo on my new PC a day ago and funny enough? It seems every fresh install of gentoo includes the latest updates for pretty much all of the popular apps.

      Of course I'm not worying about this on my servers, cause I don't have an X server on them - but if I did have apps with security vulnerabilities on my servers? I think updating them in most cases would be 3 commands on my sourced based distribution:

      emerge sync
      emerge install (application) /etc/init.d/(application) restart

      Nifty huh?

      Turns out though, for good up-to-date support you don't even need to use a complicated distribution. Ubuntu will make your desktop happy, CentOS if you're a poser and don't know anything outside of your redhat training, debian if you want to be behind a version in everything but have all of the security patches, gentoo if you got time on your hands and want bleeding edge everything and a million ways to solve any one problem. And? There's a ton more. Take your pick. Most of them ... get this ... don't need support contract $$$ to be up-to-date.

      And to address your comparison of windows update to linux? Ok lets do this.

      1) Microsoft probbably isn't turning over all of their source code for HS to audit (though I admit I am uneducated about their relationship, indeed they could very well be letting HS Audit their code, and letting the NSA add code to windows. Who knows - do you?).
      2) If they were giving code to audit and a bug was found? They'd sit on it for six months, and then complain when the gov beurocracy is able to produce a report on it faster than they can add () to the codebase.
      3) They'd also check your CD key, cause it's more than a service contract with them - it's a pretty shitty license too. And if you're not in compliance to get this update, guess what? You gotta pay them.

      So to summarize, you make a poor point because as I have pointed out the vast majority of installations have good up-to-date no-charge package management systems. I would be surprised if Fedora didn't have a decent package management system, and if you want a good up-to-date redhat install centos. Do a little research, and a little less bitching. Yes, for the vast majority of this bug was fixed in sufficient time (though, as it appears, not nearly as fast as the openbsd guys fixed it, but how does one compete with jesus' majesty anyways?).

      Oh, and you sir, are a troll.

      Signed,
      Anonymous Troll (takes on to know one)

    40. Re:Already Corrected? by NetRAVEN5000 · · Score: 1
      "Oh sure, I'm trolling - but the point is this ISN'T updated on machines around the world. It's updated on a few machines that HAVE some sort of auto-update service (of which many required a fee with your "enterprise service license") and it may or may not be updated when you install a new machine."

      All this time I was thinking you actually used Linux!

      Red Hat and Fedora both have their own auto-updater. As does SuSE. And Ubuntu. And Mandriva. And Gentoo. And Linspire. And Xandros. And I'm sure many others do, too.

      Red Hat/Fedora's is free. SuSE's is free. Mandriva's is free. Linspire's is free. Or at least they were back when I tried them. Not sure about the others - never tried them.

      Even Slackware has SWareT, which isn't automatic but it will update your software - you could create a cron job or something.

    41. Re:Already Corrected? by Bob+Wehadababyitsabo · · Score: 1

      I think you mean client. ;)

      --
      fsck -u
    42. Re:Already Corrected? by Alioth · · Score: 1

      A few machines? All of the most popular distros (Ubuntu, Fedora Core, Debian, CentOS) have free update services using yum or apt, and have had these mechanisms for years.

    43. Re:Already Corrected? by petermgreen · · Score: 1

      the client libs only run as the app that calls them anyway so they aren't security critical code.

      the X server otoh is security critical because it runs as root and serves other users.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    44. Re:Already Corrected? by glesga_kiss · · Score: 1
      What can I tell him to change his mind?

      Simple. This article shows that X11 has vunerabilities. If you aren't running it, you are immune to them. Standard server operating principles dictate that you only run what you are using.

      Also, if he really really needs X11, I don't think you need to run the server part on the remote box. Just use the DISPLAY variable to sent the X11 stuff back to a client (running e.g. Cygwin X11 server) whenever he needs a GUI.

    45. Re:Already Corrected? by glesga_kiss · · Score: 1

      The only "non-free" one I can think of was RedHat 7, where you had to fill out a questionaire every now and then to get update access. That was the reason I ditched that distribution.

    46. Re:Already Corrected? by Karma+Farmer · · Score: 1

      I'm pretty sure there have been proof-of-concept exploits that have involved X clients connecting to compromised X servers.

      Of course, these exploits couldn't provide privilege escalation by themselves. And, the trust relationship involved is often not useful to an attacker. But, the exploits are still possible.

    47. Re:Already Corrected? by ??? · · Score: 1

      FWIW, please don't do this. Do this instead

      ssh -x some_server ./installoracle.sh

      Will tunnel the X info over an encrypted connection to your workstation, rather than in plaintext (as modding DISPLAY) will do...

    48. Re:Already Corrected? by petermgreen · · Score: 1

      yeah a comprimised X server attacking the app would be possible but

      1: in many cases there would be little point actually attacking the app when you could just use its UI to do what you wan'ted anyway.

      2: the X server is generally running as root so this is only usefull if people are using remote apps.

      an app trusts an X server in the same way an app trusts its controlling terminal. in both cases comprimising the interface with the user will likely give you a high level of control over the app.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    49. Re:Already Corrected? by SirTalon42 · · Score: 1

      That "-x" should be "-X"

      From the ssh man pages:
        -x Disables X11 forwarding.

    50. Re:Already Corrected? by joe+155 · · Score: 1

      when people are saying auto-updater I wonder what you they are talking about... when he said it I had in mind something like windows where it does it without telling you and you have no idea what's doing what... in fedora you have yum; which will update all your packages but you do actually have to go into su - in the terminal (or there might be a GUI... I've never bothered to look what "software updater" is...) so it's not really truely "automatic". My question is when will this update make it into yum (thunderbird has taken ages and still not got in)

      --
      *''I can't believe it's not a hyperlink.''
    51. Re:Already Corrected? by Feyr · · Score: 1

      that's correct, but unnecessary for a LAN. you ARE installing that in a lab aren't you?. X is slow enough as it is, i don't need nor want the extra overhead of ssh encryption.

      if you were doing it over a public connection, then it'd be foolish to mod the DISPLAY env

    52. Re:Already Corrected? by Arandir · · Score: 1

      Nonsense. Perhaps it's the terminology that confuses you. X servers run on the client, while X clients run on the server. There is no need to run an X server on a server.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    53. Re:Already Corrected? by nagora · · Score: 1
      Perhaps it's the terminology that confuses you.

      It was; I was thinking of when I run my laptop as a terminal to my main machine's xdm process. As I understand it, the server is running on the main machine (the server) and my laptop is simply displaying the...er.... Actually, what the hell is going on? Is the laptop a client or is it a server talking to another server or what? X can drive you nuts sometimes.

      On the other hand, it works.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    54. Re:Already Corrected? by NetRAVEN5000 · · Score: 1
      Actually in Fedora (IIRC) you have that little red dot in the corner that tells you when there's updates to be installed. I don't know what Windows you're using, but that's what XP does - it tells me "Your updates have been downloaded! Click Here to install them!" or something like that. The only difference is in Fedora you might have to give it the admin password.

      So it might not be fully automatic, but neither is Windows Update. Unless you set it to automatically install your updates without asking you, which you can do for both IIRC.

    55. Re:Already Corrected? by Arandir · · Score: 1

      The problem is that "client/server" computing messed up the concept in many people's minds. A lot of people tend to assume that the server is the remote machine, while the client is local machine. This is not always the case. Servers are systems that provide services to clients, and clients are always in charge, regardless of whether they are remote or local.

      The X server provides display services to the client, and thus runs on the system with the display, usually local to the user. If you are running the application remotely, then the X client will be remote.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  10. So does this mean? by drpimp · · Score: 1, Interesting

    That the compilers have a flaw as well? You would think that the semantic rules would catch this and throw a compiler error for a missing parenthesis but maybe I am missing something.

    --
    -- Brought to you by Carl's JR
    1. Re:So does this mean? by bunratty · · Score: 1

      Or maybe even syntax rules would catch it!

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    2. Re:So does this mean? by Methlin · · Score: 1

      They probably actually mean a missing pair of parenthesis, to force the evaluation order of some statement to be a certain way.

    3. Re:So does this mean? by CableModemSniper · · Score: 1

      I didn't RTFA but I imagine it was an issue of missing a pair of parentheses (probably to indicate precedence).

      --
      Why not fork?
    4. Re:So does this mean? by Anonymous Coward · · Score: 0

      That the compilers have a flaw as well? You would think that the semantic rules would catch this and throw a compiler error for a missing parenthesis but maybe I am missing something.

      Most likely it's a missing pair of parentheses, and the bug is due to someone messing up the order of operations. Especially common with pointer math... *foo + 1 is different from *(foo+1). Misuse of ! is common too.

    5. Re:So does this mean? by AtomicX · · Score: 5, Insightful

      In most cases the compiler will catch errors caused by typos and omissions, but it is perfectly possible to write code containing typos or missing characters which are still valid.

      I had a quick look on Coverity's website and this appears to be the relevant line of code:

      - if (getuid() == 0 || geteuid != 0)
      + if (getuid() == 0 || geteuid() != 0)

      In the case of the first line, "geteuid != 0" is valid C code but checks whether or not the address of the geteuid function is 0.

      The second line is what the programmer intended to write, which calls the geteuid function and checks the value returned by that function.

      The problem (if there is one) lies with the language, not the compiler, since both of the above lines are legal C code.
      Solutions to this kind of problem probably involve both a movement towards higher level languages (which are typically more verbose and don't allow low-level memory manipulation), and more extensive static code analysis. In the case of Xorg and the kernel, moving to a higher level language isn't really an option (not yet, at least).

    6. Re:So does this mean? by teslar · · Score: 2, Funny

      Well, from TFA: "This was caused by something as seemingly harmless as a missing closing parenthesis"

      So no, it is indeed just a closing paranthesis that is missing. Why exactly that bloke considered this 'seemingly harmless', I don't know though... that is rather like saying "The car crash was caused by something as seemingly harmless as a severed brakeline."

    7. Re:So does this mean? by drpimp · · Score: 1

      I see your point, but from TFA:"This was caused by something as seemingly harmless as a missing closing parenthesis". I am a C++ guy, and just finished writing a compiler last semester in my studies, so I know compilers can very well complete even with errors. Maybe the article is just used fouled verbage?

      I know that rules like

      E -> ( E ) | epsilon

      Are valid , but I personally know of no instance where

      E -> ( E | epsilon

      in a C language and would not be error trapped, but I could be wrong.

      --
      -- Brought to you by Carl's JR
    8. Re:So does this mean? by MobileTatsu-NJG · · Score: 1

      "The problem (if there is one) lies with the language, not the compiler, since both of the above lines are legal C code."

      Ignorant question: Is this why PHP uses '$' in front of variables?

      Note: I'm not a programmer. Rather I've done some scripting here and there and some use it, some don't.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    9. Re:So does this mean? by NittanyTuring · · Score: 1

      I would expect that something like this would through a warning, but it doesn't. I just tried this in GCC, and no warning occurred, not even with -Wall.

      I would change the C standard to throw a warning on dubious use of function addresses. Practically, they are only used as part of an rval of an assignment operation, with the left hand side being a function pointer variable. If they are used in any other way, it's probably a typo.

      Name me another way function addresses are commonly used.

    10. Re:So does this mean? by General+Fault · · Score: 1

      You said it yourself. First, you assign some variable to the address of the function, then if the variable != 0, you use the variable to call the function. This is sometimes used to trigger events. An object "foo" (I'm more of a C++ guy so were in oo land now, but I suppose that this can be used in C) may subscribe to an event from another object "bar" by setting bar.OnSomethingHappened function pointer. When SomethingHappend in bar, bar would call the function pointed to by OnSomethingHappened if it has been set (does not equal 0).

      --
      No man is an island... But I wouldn't mind having a bigger moat.
    11. Re:So does this mean? by Anthony+Liguori · · Score: 2, Interesting

      The problem (if there is one) lies with the language, not the compiler, since both of the above lines are legal C code.
      Solutions to this kind of problem probably involve both a movement towards higher level languages (which are typically more verbose and don't allow low-level memory manipulation)


      I think we can both agree Python is a higher level language. And guess what:

      import os

      if os.getuid() != 0 or os.geteuid = 0:

      is completely valid. It's not high level vs low level languages here that's at issue. It's static verses dynamic typing and more specifically, strict verses weak static typing. If 0 wasn't treated so specially in C (it's the only numeric literal that's directly comparable to a pointer) this wouldn't be an issue.

      Unfortunately, C++ made it even worse since the standard mandates that NULL is defined as:

      #define NULL 0

      Instead of at least:

      #define NULL (void *)0

    12. Re:So does this mean? by Anonymous Coward · · Score: 0

      Compare to function pointer (== or !=).
      Saw one case of if (function1 == function2)
      Oh yes, on my arch (x86), they were.

    13. Re:So does this mean? by Azarael · · Score: 1

      Code like that is always going to slip through occasionally. At least C has strong type checking, after all in higher level languages like Python the variable geteuid wouldn't have even had to exist for the 1st expression to be valid.


      C is a low level language and it's application to system programming is very well understood. High level languages aren't really suited for systems programming since they obscure so much of the underlying processes, even though they may lend themselves to more elegant solutions. Eventually a language like D: http://www.digitalmars.com/d/overview.html/ that tries to take the best of both worlds may take over for C, but that isn't happening any time soon.

      In the end, only careful devs, with the help of thorough test coverage and code audits, will consistently produce the most bug-free code

    14. Re:So does this mean? by Anonymous Coward · · Score: 0

      I may be too tired and I'm not that familiar with C but doesn't this mean:

      if (user is root or user is __not__ effectively root) {
              do stuff
      }

      What is the use in this?

    15. Re:So does this mean? by clem.dickey · · Score: 1
      checks whether or not the address of the geteuid function is 0

      The definition of getuid in Linux's /usr/include/unistd.h says that it is a function (and not a function pointer). No function can have an address of 0. So I would think that a pass through lint would have caught that.

      Unless running the code through lint produces so much noise as to effectively hide errors. I saw one piece of code which which initialized an array of 50 items with 52 initial values. I reported the bug but did not identify the exact location. It took the responsible parties one year to insert the lint function in their build process and locate the error.

    16. Re:So does this mean? by NittanyTuring · · Score: 1
      No, you have not provided a valid counterexample.

      If I assign a value to a variable... great! I will do anything I want with the variable! Usage of a function pointer variable should not generate warnings. I'm talking about dubious usage of the function. If my code said ...
      (geteuid != 0)
      ... a warning should be generated. If my code said ...
      geteuid_var = geteuid;
      (geteuid_var != 0)
      ... then a warning should definitely not be generated. The compiler can differentiate between function and function pointer variable by looking at their respective declarations.

      Try a little bit harder next time.
    17. Re:So does this mean? by NittanyTuring · · Score: 1

      Ok, I agree. This is valid. Maybe then, there should be restrictions on implicit typecasting in expressions that contain function names.

    18. Re:So does this mean? by dotgain · · Score: 2, Informative
      That's why TFA said parentheses , which is the plural of parenthesis.

      Incidentally, that's the word you should have used too.

    19. Re:So does this mean? by ChrisMaple · · Score: 1
      ..higher level languages (which are typically more verbose...

      One of the major selling points of a HLL is that it is less verbose. I want to put a concept on a line, not a page. This makes it easier to write, easier to maintain.

      Or is APL not a HLL?

      --
      Contribute to civilization: ari.aynrand.org/donate
    20. Re:So does this mean? by roman_mir · · Score: 1

      Python is not something that should be used to write future OS code either.

      I think in this case something like Java syntax makes more sense.

      if (getUserID()==0 || getEffectiveCallingUserID()==0) {...}

      Sure, it's more verbose, but a call like this one: if (getUserID==0) is a compile time error.

      And I am not saying use JVM to run an OS written in Java, I am saying that Java syntax is just less error prone in principle, and so are the rules, such as no multiple inheritance, automatic array boundary checking, ability to set method and object security levels (as in EJBs for example,) memory handling via garbage collection etc.

    21. Re:So does this mean? by m6ack · · Score: 1
      NO...

      C is a high enough level language for the X server, TYVM. If the original programmer had actually paid attention to the warning his compiler gave him and bothered to take heed, his mistake would have been immediately apparent to him.

      It is silly to just blame the language when C is "just fine" for large applications. For X, ISO C is ABSOLUTELY NECESSARY, because it has to port to so many platforms. I can't think of a platform that doesn't have C compiler and most have a modern standards complient ISO C compiler -- you can't say that for most HLL's.

    22. Re:So does this mean? by Dachannien · · Score: 1

      I thought maybe this could be used to check whether a function ended up being a pure virtual member function or not through an accessor function defined in the base class, but it turns out you can't just ask for (f != 0) when f is a member function of a class.

      Also, interestingly, with gcc 3.3.3, you can do, say, (k != 0) with no warnings, but if you do cout << k << endl;, you get the warning, the address of `void k()', will always be `true', which you would have thought it would figure out for the comparison operator as well.

      There's probably a reason why a warning isn't generated, but I can't think of it at the moment :)

    23. Re:So does this mean? by sgt_doom · · Score: 1

      I believe this flaw was by design....

    24. Re:So does this mean? by CableModemSniper · · Score: 1

      This makes no sense. You can't miss a closing parentheses and have it compile. The semantics of the code if it did compile wouldn't even make sense.

      --
      Why not fork?
    25. Re:So does this mean? by CableModemSniper · · Score: 1

      At least C has strong type checking, after all in higher level languages like Python the variable geteuid wouldn't have even had to exist for the 1st expression to be valid.

      Untrue: n% python Python 2.4.1 (#1, Feb 20 2006, 18:17:43) [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> if geteuid == 0: ... print "Hello\n" ... Traceback (most recent call last): File "", line 1, in ? NameError: name 'geteuid' is not defined If geteuid had been a function, the result would be the same as C. In every dynamic language I know (python, perl, ruby), the result is effectively the same as the code above. (With perl you have to make sure use strict; and or use warnings; is turned on. No worse than gcc -Wall).

      --
      Why not fork?
    26. Re:So does this mean? by CableModemSniper · · Score: 1

      At least C has strong type checking, after all in higher level languages like Python the variable geteuid wouldn't have even had to exist for the 1st expression to be valid.

      Untrue:

      n% python
      Python 2.4.1 (#1, Feb 20 2006, 18:17:43)
      [GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> if geteuid == 0:
      ... print "Hello\n"
      ...
      Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      NameError: name 'geteuid' is not defined
      If geteuid had been a function, the result would be the same as C. In every dynamic language I know (python, perl, ruby), the result is effectively the same as the code above. (With perl you have to make sure use strict; and or use warnings; is turned on. No worse than gcc -Wall). Sorry about the last post, I should have learned to use the preview button.
      --
      Why not fork?
    27. Re:So does this mean? by spitzak · · Score: 1

      The article would be more accurate if it said "This was caused by something as seemingly harmless as a missing closing parenthesis, plus the unfortunate loss of an open parenthesis that caused this mistake to not be detected by the compiler"

    28. Re:So does this mean? by Azarael · · Score: 1

      You're right. I was thinking of php I think. php 5 will run the code with a warning and I don't see any strict flags that you can pass to the interpreter. I have a feeling that php 4 will just create the variable and go on it's marry way, at least that is what it does with undefined class variables. I will have to double check tomorrow.

    29. Re:So does this mean? by syzler · · Score: 1

      Except that the line of code in question was/is not using a variable, but a function call. The way the code was written it was comparing a pointer to the function not the return value of the function.
       
      Although most of the time function pointers are not used, there are still legit purposes for them such as when using qsort(). In the case of qsort(), the function pointer points to a function that will compare two data blocks to determine which comes first in a sorted list.

    30. Re:So does this mean? by MobileTatsu-NJG · · Score: 1

      "Except that the line of code in question was/is not using a variable, but a function call. The way the code was written it was comparing a pointer to the function not the return value of the function."

      I apologize for my ignroance, but could you go into a little more detail here? If you're not getting the value the function returns, what are you asking it for? Is this a way of getting to a function faster than simply calling it?

      (On a side note, I think this is the sort of thing that helps prove the difference between a programmer and a scripter.)

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    31. Re:So does this mean? by Anonymous Coward · · Score: 0

      This is why languages like PERL REQUIRE $'s in front of variables, where subroutines are without and with () at the end. Although, you can put &'s in front if you wish.

      The point is, it prevents common mistakes like that. Although, so does features like "use strict;"

    32. Re:So does this mean? by Anonymous Coward · · Score: 0

      C is a high enough level language for the X server, TYVM. If the original programmer had actually paid attention to the warning his compiler gave him and bothered to take heed, his mistake would have been immediately apparent to him.

      What warning? The code was perfectly valid and would result in no warning when compiled by most any C compiler you'd care to name. I like C. I bet that I could program circles around you in C. But I also know that using "0" to represent NULL is a glaring, fundamental flaw in the language. It was a very poor design decision. Of course, hind sight is 20/20.

      What's funny is that for all this discussion of security, I haven't seen anybody point out how pitiful it is that the underlying Unix security model of "root is all powerful, everybody else is an unprivileged plebeian" continues to cause problems in 2006. What a complete joke.

    33. Re:So does this mean? by ipfwadm · · Score: 1

      [In Java] a call like this one: if (getUserID==0) is a compile time error.

      Yeah, because Java doesn't have function pointers. Talk about throwing the baby out with the bath water.

      Java is on to the intelligent fix, though: not treating NULL and the integer 0 as one and the same. 0 is an integer. NULL is a pointer. Comparing a pointer with 0 should at the least generate a warning. Easy enough, but that's not the way it works in C unfortunately (and it's even worse in C++, as another poster mentioned).

    34. Re:So does this mean? by roman_mir · · Score: 0, Troll

      Yeah, because Java doesn't have function pointers. - thank you, Dr. Obvious.

    35. Re:So does this mean? by Anthony+Liguori · · Score: 1

      Python is not something that should be used to write future OS code either.

      I think in this case something like Java syntax makes more sense.


      I find it interesting that you refer to Java as a high level language. Okay, let's run with it though. You cannot have this problem in Java exactly because functions are not first class types. Java is a very restricted language in this respect. Of course, it's not entirely type safe. Consider:

      class A { public int foo() { return 0; } }
      class B extends A { }
      class C extends A { }

      public class test {
              public static void main(String args[]) {
              A a[] = new B[20];
              a[0] = new C();
              System.out.println(a[0].foo());
              }
      }

      This gem will compile with no compile time error (even though it clearly breaks the type system). Java arrays are quite silly semantically. A good example of a really strictly typed language is either ML or Haskell.

    36. Re:So does this mean? by roman_mir · · Score: 1

      I didn't say Java was type safe :)  ClassCastException is one of the most common exceptions after the NullPointerException.  You can do quite strange things in Java, like modify the supposedely immutable String objects.
      <ecode>
      public class StrangerThingsHappen {
          public static void main(String[] args) {
              System.out.println("First line prints");
              System.out.println(StrangerThingsHappen.BIZARRE_TE XT);
              System.out.println("Last line prints");
          }
          private static final String BIZARRE_TEXT = "THIS WILL NOT PRINT!";
          private static final Magic magic = new Magic();
      }

      import java.lang.reflect.*;
      public class Magic {
          private static Field stringValue;
          private static Field stringLength;
          static {
              try {
                  stringValue = String.class.getDeclaredField("value");
                  stringLength = String.class.getDeclaredField("count");
              } catch(NoSuchFieldException ex) {
                  // safety net in case we are running on a VM with a
                  // different name for the char array.
                  Field[] all = String.class.getDeclaredFields();
                  for (int i=0; stringValue == null && i<all.length; i++) {
                      if (all[i].getType().equals(char[].class)) {
                          stringValue = all[i];
                      }
                  }
              }
              if (stringValue != null)
                  stringValue.setAccessible(true);
              if (stringLength != null)
                  stringLength.setAccessible(true);
          }
          public Magic() {
              try {
                  stringValue.set("THIS WILL NOT PRINT!", "THIS WILL PRINT!".toCharArray());
                  stringLength.setInt("THIS WILL NOT PRINT!", 16);
              } catch(IllegalAccessException ex) {}
          }
      }
      </ecode>
      Try that one.

      But I still prefer Java to ML, which was an interesting functional language, that I had to use long time ago at the Uni, but I think the language used also should be understood by more people than the ones who speak ML fluently.  Haskel I didn't try, so I don't have an opinion on that language.

      ----

      However, anything that throws something like NullPointer or ClassCast can be considered a program error, even though it is only found in run time, and after all I didn't say I want it to be exactly like Java, I just think Java like language would be a good start, but maybe with more compile-time type safety.

    37. Re:So does this mean? by ipfwadm · · Score: 1

      Yeah, thanks. My point, since it seemed to completely escape you, is that your example is pointless. Java doesn't have function pointers, so no shit the snippet you posted doesn't compile. What could it possibly mean?

    38. Re:So does this mean? by roman_mir · · Score: 1

      Yeah, thanks. My point, since it seemed to completely escape you, is that your example is pointless. Java doesn't have function pointers, so no shit the snippet you posted doesn't compile. What could it possibly mean? - I think my point escape you, the fact that Java doesn't have function pointers was my point, and this is exactly what a higher language should avoid - function and direct memory pointers.

    39. Re:So does this mean? by ipfwadm · · Score: 1

      No, your point doesn't escape me. I just disagree with it. Remember that line back in my original post, "talk about throwing the baby out with the bath water"? While it isn't incredibly often, I do come across things that are much more difficult to do (or do efficiently) in Java due to lack of pointers.

    40. Re:So does this mean? by djmurdoch · · Score: 1

      There's probably a reason why a warning isn't generated, but I can't think of it at the moment :)

      Probably they tried it out on the X11 code, and discovered that it would generate spurious warnings on known good code.

    41. Re:So does this mean? by init100 · · Score: 1

      I apologize for my ignroance, but could you go into a little more detail here? If you're not getting the value the function returns, what are you asking it for? Is this a way of getting to a function faster than simply calling it?

      No, function pointers have a different purpose. They allow you to send functions (or rather function pointers) as arguments to other functions. An example of this is the C function qsort(), which (among others) takes a pointer to a comparison function, which allows you to use qsort() to sort any type of array, not just e.g. integers.

      Another use for function pointers is when dynamically loading libraries at runtime. In this case you need to ask the dynamic linker to provide pointers to the library functions to be able to call its functions.

      So the code in question compares the value of the function pointer geteuid to 0, instead of calling geteuid() and comparing the return value to 0. And you don't want that, since statically declared functions are always non-zero (AFAIK) and the comparison would be moot.

    42. Re:So does this mean? by init100 · · Score: 1

      The definition of getuid in Linux's /usr/include/unistd.h says that it is a function (and not a function pointer).

      All functions are function pointers, it's just that they are implicitly declared as constants. Refering to a function name without appending parentheses gives the function address, appending the parentheses calls the function (at the address contained in the function name).

    43. Re:So does this mean? by MobileTatsu-NJG · · Score: 1

      I think that's starting to make sense.

      Thank you for taking the time to write that. Learn something new every day. :)

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    44. Re:So does this mean? by Azarael · · Score: 1

      I double checked it and the following code will run without error in php 4: It is going far afield for an example though and at least php 5 does a better job with stuff like this.

    45. Re:So does this mean? by Anonymous Coward · · Score: 0
      Yeah, because Java doesn't have function pointers.
      Wrong.

      Granted, using Method for anything but reflection is pretty bad programming practice. But if you absolutely must have function pointers, they're there.

    46. Re:So does this mean? by ipfwadm · · Score: 1

      Not only bad programming practice, but incredibly ugly.

    47. Re:So does this mean? by roman_mir · · Score: 1

      I do come across things that are much more difficult to do (or do efficiently) in Java due to lack of pointers. - then you either have problems with your design or you just don't understand the language. Before you start with me, I am working with Java and C/C++.

    48. Re:So does this mean? by ??? · · Score: 1
      test.c:
      #include <sys/types.h>
      #include <unistd.h>
       
      int main() {
        if (geteuid==0) {
          return 1;
        }
        return 0;
      }
      Does not cause lint to whine (at least not the lint that comes with Solaris Forte Developer)
      $ lint test.c
      $
    49. Re:So does this mean? by ipfwadm · · Score: 1

      Oh, you convinced me now. You're absolutely right, there is NEVER EVER a time when a function pointer could EVER be better than what Java provides. Give me a friggin break.

      Let's take one simple, incredibly pervasive example of where function pointers would benefit Java: their listener paradigm. So I need to create a new class to get notified of button clicks, or mouse movement. And then I need to create a new instance of that class. So I now have a java.lang.Class object, as well as the object for the listener itself. To do what passing a function pointer just as easily would have accomplished. Yes, I know I could make a class that implements all these interfaces so I would only need to make one class - it's still more overhead. Or I could make the class that creates the buttons implement the interfaces - but that's ugly because now your "outer" class's API is cluttered with listener functions. I find Qt's paradigm much much cleaner.

      Function pointers have their place, and to tell me I don't understand the language because sometimes I find they would be beneficial is just sticking your head in the sand.

    50. Re:So does this mean? by fdisk3hs · · Score: 1

      At first I read this code as:

      if (geteuid() == 0 || geteuid() != 0)

      Now that would have been pointless...

      if (true || false)
                \\waste time doing a comparison that will always be true

      Dee-tuh-dee...

    51. Re:So does this mean? by roman_mir · · Score: 1

      Oh, you convinced me now. You're absolutely right, there is NEVER EVER a time when a function pointer could EVER be better than what Java provides. Give me a friggin break. - with all the sarcasm you are missing the simple point is that JVM provides managed memory, which is much easier to use for complex projects, and which allows to avoid many simple C/C++ errors like buffer overruns.

      Let's take one simple, incredibly pervasive example of where function pointers would benefit Java: their listener paradigm. So I need to create a new class to get notified of button clicks, or mouse movement. And then I need to create a new instance of that class. So I now have a java.lang.Class object, as well as the object for the listener itself. To do what passing a function pointer just as easily would have accomplished. - I would argue that in this case again, Java paradigm enforces stricter design rules, which is better for maintenance and manageability of large projects. You want full control of every aspect of the hardware and I am arguing that a stricter language with controlled boundaries allows cleaner and more secure implementations.

      Function pointers have their place, and to tell me I don't understand the language because sometimes I find they would be beneficial is just sticking your head in the sand. - sometimes a 'goto' statement can be beneficial, but it doesn't mean that it is a good way to program.

    52. Re:So does this mean? by fdisk3hs · · Score: 1

      os.geteuid = 0

      Will it let you do an assignment like that? You wanted

      os.geteuid == 0

    53. Re:So does this mean? by ipfwadm · · Score: 1

      with all the sarcasm you are missing the simple point is that JVM provides managed memory, which is much easier to use for complex projects, and which allows to avoid many simple C/C++ errors like buffer overruns.

      How am I missing that? I understand that. I've been working as a Java developer for the last 5 years, and dealt with it a lot in college for a couple years before that. I understand its strengths. And from that experience I recognize its weaknesses too. You seem too blinded by its strengths to recognize that it does have weaknesses. Function pointers don't have to be able to point to arbitrary memory addresses. As another poster said, the Method class is basically a function pointer. It's just ugly.

      sometimes a 'goto' statement can be beneficial, but it doesn't mean that it is a good way to program.

      Ah, so you're one of those "goto is evil, you should never ever use it!" fanatics. I'm not surprised.

      The right tool for the job is all I'm advocating here.

    54. Re:So does this mean? by roman_mir · · Score: 1

      How am I missing that? I understand that. I've been working as a Java developer for the last 5 years, and dealt with it a lot in college for a couple years before that. I understand its strengths. And from that experience I recognize its weaknesses too. You seem too blinded by its strengths to recognize that it does have weaknesses. Function pointers don't have to be able to point to arbitrary memory addresses. As another poster said, the Method class is basically a function pointer. It's just ugly. - why is it ugly? C++ can also have meta data and new binaries at some point will have meta data within them. So reflection makes use of the metadata in the bytecode and it is good, it would be better if metadata was incorporated into all binaries long time ago, then there would be no need to have long and tedious disassembling sessions. The API doc would be right there, for anyone to see.

      Ah, so you're one of those "goto is evil, you should never ever use it!" fanatics. I'm not surprised.

      The right tool for the job is all I'm advocating here.
      - a direct memory jump in any program just means trouble for maintenance and for backwards compatibility, and that is what GOTO is. If you design your program, instead of typing it up right away, you will never need gotos. Higher level languages allow you to use try/catch statements, which are basically your 'gotos' but managed and controlled, rather than random.

    55. Re:So does this mean? by ipfwadm · · Score: 1

      why is it ugly?

      Because you can't just call it as if it were a function. You have to call invoke() on it. And prior to 1.5 you had to create an Object array with all the parameters (rather than just passing them in a comma-separated list as if it were a real function call), and wrap all the primitives. Not exactly ideal for general use, and about as fun as writing JNI that interfaces back into Java. And I never said having the metadata in there was a bad idea, so don't put words in my mouth. Reflection just isn't an ideal replacement for real function pointers.

      As for goto, *snore* I've heard all the arguments before. Of course you never NEED gotos. You could write C code without ever using a for loop too. The problem with gotos is that people didn't know when to use them and just threw them in everywhere. There are (a very limited number of) times when a goto makes sense. But you're right, in C++/Java and other exception-supporting languages, there is no longer a need.

  11. Success by mytmouse · · Score: 3, Funny

    Finally Homeland security has done something noteworthy. I'm glad this benefits the X11 community.

    --
    the answers you get depend on the questions you ask.
    1. Re:Success by cyfer2000 · · Score: 1

      Hope the work was not out sourced to India.

      --
      There is a spark in every single flame bait point.
    2. Re:Success by hackstraw · · Score: 1

      Finally Homeland security has done something noteworthy. I'm glad this benefits the X11 community.

      A) This was _funded_ via the Homeland Security.

      B) Still, a good percentage of the spam caught by my spam filter comes via owned Homeland Security Windows boxes.

      C) How did they miss the () all this time? Especially on a function as critical as geteuid?

  12. I wonder by kevin_conaway · · Score: 2, Funny

    I wonder if Miles Papazian discovered the flaw by reading the binary or by utilizing a machine-coded matrix?

    1. Re:I wonder by tcopeland · · Score: 3, Funny

      > I wonder if Miles Papazian discovered the flaw
      > by reading the binary or by utilizing a machine-coded matrix?

      I don't know, but I bet Chloe O'Brian is lurking nearby. And she's probably scowling.

    2. Re:I wonder by pxuongl · · Score: 1

      neither! he just popped open the preferences panel and turned on color coding...

    3. Re:I wonder by fakeamerican · · Score: 1

      Haha! Whoever left that parens out deserves to be tasered. Maybe next season Chloe will use this vulnerability -- instead of the machine-coded matrix -- to do something impossible.

  13. Re:Homoland Security - The Linux Pary by WilliamSChips · · Score: 0, Flamebait

    I hope stupidity isn't contagious or else I might become like you. Go back to digg where you belong.

    --
    Please, for the good of Humanity, vote Obama.
  14. How did it get through? by CCFreak2K · · Score: 0, Redundant

    I'm not much in the ways of code, but shouldn't the compiler have caught the problem? Doesn't it hit an error if not all of your parenthesees (phonetic) are closed?

    --
    "Beware of he who would deny you access to information, for in his heart he dreams himself your master."
    1. Re:How did it get through? by Anonymous Coward · · Score: 0

      I'm not much in the ways of code, but shouldn't the compiler have caught the problem? Doesn't it hit an error if not all of your parenthesees (phonetic) are closed?

      parenthesis is one or both.
      parentheses is plural.

      As far as "A missing parentheses", I think it should be "a missing parenthesis" or "missing parentheses" as both work much better.

    2. Re:How did it get through? by fitten · · Score: 1

      No... not if the parenthesis were needed to enforce a particular evaluation order (as opposed to the operator precedence order) of a comparison, for example, or a mathmatical function. It wouldn't be a syntax error then... it'd be a logical error.

    3. Re:How did it get through? by moro_666 · · Score: 1

      i don't think that the flaw is really a missing ')' , it's a misplaced ')'

      as in example if(somefunc(foo > 0)) {bar}

      it compiles alright and even works, but it really isnt somefunc(foo) > 0 that is getting tested. the mistake is an easy one to make, and most modern languages consider it valid (even java if the func accepts a boolean argument).

      i never really understood WHY is the X run as root, write a god damn device wrapper that keeps the device handlers separately in root permissions and keep the X itself along with it's flaws in the user's privileges. securing a few ways to access devices is *a lot* easier than to secure the whole X as shown by the current article.

      can modular X achieve this ?

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
    4. Re:How did it get through? by sl4shd0rk · · Score: 1

      well ..

      if (((people((wouldstop() == TRUE)(((&& (using_shitty_shortcuts() == FALSE))))))))
      { ...
      }

      It's possible that something like this may be easier to spot.
      And while we're at it, start using your curly braces correctly as well.

      --
      Join the Slashcott! Feb 10 thru Feb 17!
    5. Re:How did it get through? by Ravatar · · Score: 1

      I would, but it's easier to identify a missing bracket the way you wrote it out.

    6. Re:How did it get through? by Anonymous Coward · · Score: 0

      Actually Java (and C#) won't consider that valid, unless somefunc also _returns_ boolean, in which case you couldn't compare it to zero anyway.

    7. Re:How did it get through? by moro_666 · · Score: 1

      agreed partially :)

      these definitions make it possible though:

      int dummy(int arg){...}
      boolean dummy(boolean arg){...}

      should compile like a dream in both #C and Java due to polymorphism.

      and the missing paretenthesis can always ofcourse be as
      if(2*5-1=8) vs if(2*(5-1)=8)

      compiled couldn't have a clue.

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
  15. only one missing parenthesis? by pxuongl · · Score: 0

    excuse my lack of programming 1337-ness, but what kind of code would compile with a missing parenthesis?

    1. Re:only one missing parenthesis? by mattwarden · · Score: 1

      I guess we have to excuse your lack of RTFA-ness, too. there was not an unmatched parenthesis. there was a missing set of parentheses.

    2. Re:only one missing parenthesis? by pembo13 · · Score: 1

      It was perfectly legal code.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    3. Re:only one missing parenthesis? by dotgain · · Score: 1

      The X Window System. And you're excused.

    4. Re:only one missing parenthesis? by Anonymous Coward · · Score: 0

      are you a fucking moron? Learn some fucking c before you open your trap.

    5. Re:only one missing parenthesis? by NetRAVEN5000 · · Score: 1
      It depends if you're missing a set of parenthesis () or just one parenthesis.

      If you use a set of parenthesis it will think you're calling a function. If you only have one parenthesis it'll spit out an error. If you have no parenthesis at all it will think you're calling a variable.

      So you can have both a variable geteuid and a function geteuid(). I'm assuming this is what happened in this case, and calling the variable instead of the function was an ugly mistake but went unnoticed because the compiler didn't know it was wrong, and it looks right since they're so close.

    6. Re:only one missing parenthesis? by init100 · · Score: 1

      So you can have both a variable geteuid and a function geteuid().

      Actually, geteuid is a variable containing the address of the function geteuid. Appending () to geteuid simply calls the function at that address. The way you wrote it could be interpreted as geteuid and geteuid() being two separate entities.

      calling the variable instead of the function

      You don't really call variables, you refer to variables. :)

    7. Re:only one missing parenthesis? by NetRAVEN5000 · · Score: 1
      "Actually, geteuid is a variable containing the address of the function geteuid. Appending () to geteuid simply calls the function at that address. The way you wrote it could be interpreted as geteuid and geteuid() being two separate entities."

      Sorry, I don't know that much about X11's development stuff. I thought maybe they were two separate things.

      "You don't really call variables, you refer to variables. :)"

      Whatever, you get my drift.

    8. Re:only one missing parenthesis? by init100 · · Score: 1

      Sorry, I don't know that much about X11's development stuff.

      The problem isn't related to X11 at all, except for the fact that the bug ocurred in the X Window System. Such a bug could have ocurred in any C program.

    9. Re:only one missing parenthesis? by NetRAVEN5000 · · Score: 1
      "The problem isn't related to X11 at all"

      Yes it is, according to GP:

      "Actually, geteuid is a variable containing the address of the function geteuid."

      Now I know it could've happened in other programs with other variables. I just didn't know what the geteuid variable was - maybe it was an int, maybe a boolean, maybe a String. . . to know that I'd have to know about X11's development stuff - read their source or something.

      I haven't run into this yet, but I'm assuming the same thing could happen with ANY programming language (I know Java, for anyone who hasn't checked my site out).

    10. Re:only one missing parenthesis? by init100 · · Score: 1

      Yes it is, according to GP

      The bug ocurred in X11, yes, but the problem itself is only related to the C/C++ programming languages.

      I just didn't know what the geteuid variable was - maybe it was an int, maybe a boolean, maybe a String. . . to know that I'd have to know about X11's development stuff - read their source or something.

      Actually you wouldn't have to. You would only need to know that geteuid() is a common system call on Unix and compatible systems. Knowing this, and the intricacies of the C programming language, is all that is required to understand the bug. geteuid is not an ordinary variable, it's a function. In the C programming language this means that the name of the function is a variable containing the address of the start of the function code.

      I haven't run into this yet, but I'm assuming the same thing could happen with ANY programming language (I know Java, for anyone who hasn't checked my site out).

      This could not happen in any programming language, only languages with function call semantics similar to C/C++. This bug can not happen in e.g. Java, since the compiler would report it as an error.

    11. Re:only one missing parenthesis? by NetRAVEN5000 · · Score: 1
      "Actually you wouldn't have to. You would only need to know that geteuid() is a common system call on Unix and compatible systems. Knowing this, and the intricacies of the C programming language, is all that is required to understand the bug. geteuid is not an ordinary variable, it's a function. In the C programming language this means that the name of the function is a variable containing the address of the start of the function code."

      Well I didn't know it was a common Unix system call. I don't really know anything about Unix-specific programming (most of my programming experience has been in Java).

      I do know a thing or two about C++ programming. I just didn't know what geteuid was.

      "This could not happen in any programming language, only languages with function call semantics similar to C/C++. This bug can not happen in e.g. Java, since the compiler would report it as an error."

      The Java programming language was based off of C/C++ so it would be familiar for programmers and easier for them to switch from C/C++ to Java. So it's very possible that it would treat this bit of code the same way. Maybe, maybe not - I haven't tried it.

    12. Re:only one missing parenthesis? by init100 · · Score: 1

      The Java programming language was based off of C/C++ so it would be familiar for programmers and easier for them to switch from C/C++ to Java. So it's very possible that it would treat this bit of code the same way. Maybe, maybe not - I haven't tried it.

      I'm quite sure that such a bug is impossible. Remember that Java replaces the whole concept of pointers with references, and I don't think that Java allows references to functions. I assume that using the name of a function as a variable would produce a compile error.

  16. watch out for their patches, though by Anonymous Coward · · Score: 5, Funny
    #define ) ); Install_Patriot_PhoneHome();
    1. Re:watch out for their patches, though by HermanAB · · Score: 1

      As a non-American, I think you have a good sense of humour. However, I fear that all Anonymous Cowards are now targeted by Echelon...

      --
      Oh well, what the hell...
  17. Little known fact... by Junta · · Score: 4, Funny

    X11 is actually written entirely in LISP, and therefore there are too many parentheses for a mere mortal to ever get straight.

    --
    XML is like violence. If it doesn't solve the problem, use more.
    1. Re:Little known fact... by Tablizer · · Score: 1

      X11 is actually written entirely in LISP, and therefore there are too many parentheses for a mere mortal to ever get straight.

      That's okay, the Bush Iraq Planning Committee is going to fix that by rewriting it all in Brainfuck.

    2. Re:Little known fact... by �berhund · · Score: 1

      That's right folks, LISP stands for "Lost In Stupid Parentheses". (And other variations.)

      --
      -Uberhund
  18. OS X? by nursegirl · · Score: 3, Interesting

    Any word on whether this vulnerability is a risk for those using x11 within osx? TFA mentioned that the X windowing system shipped with OS X without stating what level of risk exists.

    1. Re:OS X? by Carnildo · · Score: 4, Informative

      OSX ships XFree86 4.3.0, which is not vulnerable.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    2. Re:OS X? by Anonymous Coward · · Score: 0

      The poorly-written article is all over the place, talking a little about the X11 protocol, hyping this Coverity company, without linking to the actual security advisory. The problem is in newer versions of X.org X11 (6.9.0 and 7.0.0). Apple's X11.app should be unaffected. The mention of Apple was a complete red herring thrown in by the author of the article, who clearly didn't understand what he was typing.

      The relevant security advisory is here:

      http://lists.freedesktop.org/archives/xorg/2006-Ma rch/013992.html

      A new problem, announced today, (which actually affects versions of X.org X11 that most Slashdot users might actually be running) is here:

      http://lists.freedesktop.org/archives/xorg/2006-Ma y/015136.html

      Hope that helps! That steaming pile claiming to be an article sure as hell didn't!

    3. Re:OS X? by nursegirl · · Score: 1

      Thanks!

  19. Easy by mobby_6kl · · Score: 2, Funny

    If the compiler doesn't have a problem with unmatched parentheses, to prevent any such problems in the future, simply insert) closing) parentheses) instead) of) spaces).

    1. Re:Easy by GooglePlexity · · Score: 1

      Did)you)mean)closing)parentheses)in)addition)to)sp aces?

  20. Sometimes gentoo is a pain. by Odocoileus · · Score: 1
    I did not RTFA, is this exploit something that is easy to do? In other words should I recompile my X11 now or can I wait a few weeks until I have more time?

    p.s. If it is an easy exploit, please do NOT show me a demonstration.

    --
    ...
    1. Re:Sometimes gentoo is a pain. by Anonymous Coward · · Score: 5, Insightful

      The impression I get is that it shouldn't be easily exploitable. By default, Gentoo (and any sensible distro) configures X11 to disable remote connections. Also, you should have some sort of firewall blocking the relevant ports anyway. If it is really exploitable, the attacker would probably need access to the machine anyway (at which point, you're largely already screwed).

      Not reading the article doesn't seem to be much of a problem. It's really not very clear. For example, is this a problem with X.org X11 specifically? Is Apple's X11.app affected? The article just says the problem is with "The X Window System", without mentioning any particular implementations.

      It took some digging to find the actual advisory:

      http://lists.freedesktop.org/archives/xorg/2006-Ma y/015136.html

    2. Re:Sometimes gentoo is a pain. by Carnildo · · Score: 2, Informative

      If you're running Gentoo stable, then you're safe: you've got Xorg 6.8.2, which is not vulnerable.

      If you're running ~x86, then you've got the vulnerable version. It's a local exploit, one that is trivially simple for an experienced programmer to use.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    3. Re:Sometimes gentoo is a pain. by Anonymous Coward · · Score: 0

      Replying to myself here. It looks like the problem mentioned in the article was found six weeks ago:

      http://lists.freedesktop.org/archives/xorg/2006-Ma rch/013992.html

      It seems the advisory I linked to in the parent was actual news, as opposed to the press-release for Coverity linked from the Slashdot front page.

    4. Re:Sometimes gentoo is a pain. by iabervon · · Score: 2, Informative

      All of the affected versions are masked for testing under Gentoo, so chances are that you're not using an affected version anyway. In any case, it's evidently trivial for a local user starting an xserver to cause it to execute arbitrary code, but there's no way to attack a running server locally or remotely.

    5. Re:Sometimes gentoo is a pain. by caluml · · Score: 1
      If you're running Gentoo stable, then you're safe: you've got Xorg 6.8.2, which is not vulnerable.

      No. If you're running Gentoo stable, and you ritually update your system every night, you've got 6.8.2.
      Some of us only update packages when security alerts are discovered, or when we need new functionality in a package.

    6. Re:Sometimes gentoo is a pain. by labratuk · · Score: 1

      As almost all systems I have come into contact with by default start X with -nolisten tcp, this shouldn't be remotely exploitable per se. However, if someone malicious were to run a specially crafted X app on your desktop, they could get superuser priviliges.

      So it's something to worry about if you admin a bunch of unix desktop machines where the users mustn't get root. Or if you regularly download and execute random untrusted X apps from the internet. That could root you.

      --
      Malike Bamiyi wanted my assistance.
    7. Re:Sometimes gentoo is a pain. by labratuk · · Score: 1

      Oops. I'm referring to another recent X vulnerability which was improper memory usage in XRENDER.

      --
      Malike Bamiyi wanted my assistance.
  21. Advisory by Anonymous Coward · · Score: 2, Insightful

    If you're wondering, here is the relevant SUSE security advisory from 21.3 - http://www.novell.com/linux/security/advisories/20 06_16_xorgx11server.html

  22. Crap. by RLiegh · · Score: 1

    I'm using debian 3.1. Is this something I'm going to have to run dist-update for? (the 'crap' is because I'd have to update over dialup).

    1. Re:Crap. by RLiegh · · Score: 1

      ,s/update/upgrade/g

    2. Re:Crap. by walmartshopper67 · · Score: 1

      It only affects X11R6.9.0 and X11R7.0.0, you might be fine.

    3. Re:Crap. by Anonymous Coward · · Score: 0

      I think you're fine.. I found the patch finally, and what the code was supposed to do (and what it does now) is prevents the -modulepath flag to X from doing anything unless you're root. The vulnerability of that not working is any user can load a module into X, which runs as root.. X must run as root because it directly accesses hardware, plus if your card uses direct rendering, dri kernel modules enforce root-only access too. But if you don't have people logging into your box then it's no BFD.

  23. Only 6.9 and 7.0 by blirp · · Score: 1
    but the point is this ISN'T updated on machines around the world. It's updated on a few machines that HAVE some sort of auto-update service


    As this only affects 6.9 and 7.0 (RTFM), you'd need some form of auto-update to actually be exposed. Most distroes are still at 6.8.

    M.

    1. Re:Only 6.9 and 7.0 by blirp · · Score: 1
      (RTFM)

      ... or Article, whatever suits you...

      I sure whish I could edit my own posts sometimes.

      M.

  24. Conspiracy theory time! by Iltamies · · Score: 1

    The US government is only publicizing this because Microsoft has enough money to bribe it, and it needs some heat taken off it's own flaws!

    Just kidding...

    --
    --- "Remember, there's a difference between bowing down and bending over." -Frank Zappa
    1. Re:Conspiracy theory time! by QRDeNameland · · Score: 1
      Hate to be the sig nitpicker, but the quote is...

      "Remember, there's a big difference between kneeling down and bending over."

      From a true Zappaphile...

      --
      Momentarily, the need for the construction of new light will no longer exist.
  25. Re:Should have written it in Lisp! by WindBourne · · Score: 1
    Had X11 been written in Lisp, any decent compiler would have spotted the missing parenthesis right away!

    That is used as test each semester for MIT students. So, if it were available on the web, then it would remove an afternoons work.

    --
    I prefer the "u" in honour as it seems to be missing these days.
  26. Government Agenda 2006: by ral8158 · · Score: 0

    1) Insert a missing parentheses.
    2) Get a new coffee machine. The old one made the coffee horrible.
    3) Break
    4) Hire more TSA agents. Sure, there are already about 15 extra ones at every airport...
    5) Another break.
    6) Profit?

    (And yes, it drives me crazy to see TONS of TSA Agents everywhere, doing nothing.)

  27. The compiler just does what you ask. by EmbeddedJanitor · · Score: 4, Informative

    if you said a + b * c but you really wanted (a + b) * c the compiler won't bleat.

    --
    Engineering is the art of compromise.
    1. Re:The compiler just does what you ask. by Anonymous Coward · · Score: 0

      Those are equivalent, so, it wouldn't matter anyway...

    2. Re:The compiler just does what you ask. by Anonymous Coward · · Score: 0

      Maybe in BASIC but not in any language that people actually use.

    3. Re:The compiler just does what you ask. by Matt+Perry · · Score: 1
      Those are equivalent
      No, they are not equivalent.
      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    4. Re:The compiler just does what you ask. by HaydnH · · Score: 1

      Warning!
      Intruder alert!
      Intruder alert!
      /. perimeter crossed by non-geek!
      Warning!
      Intruder alert!

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    5. Re:The compiler just does what you ask. by xenocide2 · · Score: 1

      However, the compiler does bleat when you compare a constant to a function pointer. Because everyone uses -Wall, right?

      --
      I Browse at +4 Flamebait

      Open Source Sysadmin

  28. Missing Parenthesis?? by md81544 · · Score: 0

    Hang on... a missing parenthesis would cause a compilation error ... am I missing something?

    1. Re:Missing Parenthesis?? by mattwarden · · Score: 1, Redundant

      Yes. There was not an unmatched parenthesis. There was a missing set of parentheses.

    2. Re:Missing Parenthesis?? by XXIstCenturyBoy · · Score: 1

      Yeah. Some programming language let you reference a procedure/function rather than call it. So the following pseudo code will be valid "if (somefunction is null) {do something}" but will not do the same as "if (somefunction() is null) {do something}". The first will check if "somefunction" as been declared, the second will check the output of "somefunction".

    3. Re:Missing Parenthesis?? by donkstuff · · Score: 1

      This has been said before, but the issue was actually comparing to see if the function's address was not 0, rather than checking if the function didn't return 0.

      --
      :(){ :|:& };:
      Paluminum.net
    4. Re:Missing Parenthesis?? by GreatBunzinni · · Score: 1

      Yes. Basic knowledge of C or C++.

      The thing is, in the C programming language world a function() is the invocation of that function while function returns the address of that function. So in effect, what happened was that the coder meant to get the value from that function, i.e. meant to write it with parenthesis, but instead he got the address of that function, i.e. didn't put in the parenthesis.

      Aren't C/C++ pointers fun?

      --
      Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
    5. Re:Missing Parenthesis?? by Senzei · · Score: 1

      If it is any consolation in many higher level languages "function()" performs a call and "function" returns ... a reference to the function. So, on a conceptual level it is pretty similar. In fact with Python it would have been more interesting as anything other than zero or an empty list is true, so that if statement would always execute. Just goes to show that no matter how powerful the language, it won't stop stupid/ignorant/careless, actually I think it is worse with interpreted languages as it is easier to write crap that still manages to run.

      --
      Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
  29. Not Quite by mattwarden · · Score: 5, Funny

    Actually, it was not a missing parenthesis, but a missing parenthetical.

    double r;
    r = ( (double)rand() / ((double)(RAND_MAX)+(double)(1)) );
    if ( r < 0.5 ) gotroot(true);

    And the patched code:

    double r;
    r = ( (double)rand() / ((double)(RAND_MAX)+(double)(1)) );
    if ( r < 0.5 ) gotroot(true); (just kidding!)
    1. Re:Not Quite by Anonymous Coward · · Score: 0

      Ah, yep. No wonder they missed that!

    2. Re:Not Quite by Anonymous Coward · · Score: 0

      (lame!)

  30. Missing *pair* of parentheses by Chirs · · Score: 4, Informative

    The fix was posted before, but the problem was that someone used "geteuid" rather than "geteuid()".

    This results in making use of the function address rather than the return value of the function, which could cause difficulties.

    1. Re:Missing *pair* of parentheses by Edmund+Blackadder · · Score: 1, Troll

      This helps illustrate the biggest problem I have with C (and most other modern languages). And that is that is that you can close your eyes, start banging on the keyboard and type in some random sequence of characters and it is very likely that it will get parsed and compiled and result in some kind of random program.

      In other words, because there are so much abbreviations in C, any mistake usually results in syntaticaly valid but otherwise erroneous code.

      Brevity is not the end all. A more verbose language (like Pascal) can be much more helpful by catching your typos before compiling.

    2. Re:Missing *pair* of parentheses by mr_tenor · · Score: 1

      What you want is a good type system, not longer names...

    3. Re:Missing *pair* of parentheses by httpoet · · Score: 1
      ...the biggest problem I have with C...is that you can close your eyes, start banging on the keyboard and type in some random sequence of characters and it is very likely that it will get parsed and compiled and result in some kind of random program.

      Let's try out this theory...

      ewgtarwgimnaershg
      ]'ehtghjo9bhlkmdfghb
      'oethr
      ]bho9jetbhkmrbht;'lijetbh

      Nope, you're wrong! It was fun to try though, thanks. Maybe if I just try...a few...more...times...

      q9t48hpuisnv p98y4t-8arwufghpajrhgf awp9gtwa;gkeaerg 9-84etf pawgh ;earj gnaer ghlkjhgr warpt84ty4aa 4
    4. Re:Missing *pair* of parentheses by cortana · · Score: 1

      GCC would have warned about a comparison between an int and a pointer. This is why you should always work with -Werror! :)

    5. Re:Missing *pair* of parentheses by acoopersmith · · Score: 2, Informative
      Actually, gcc never issued a peep about this code. Try it yourself - compile this with gcc -Wall:
      #include <stdlib.h>
      #include <unistd.h>

      int main()
      {
      if (getuid() == 0 || geteuid != 0) {
      return 1;
      } else {
      return 0;
      }
      }
      gcc 3.4.3 says all is fine. You can make it complain if you change geteuid != 0 to !geteuid - then it points out "warning: the address of `geteuid', will always evaluate as `true'"
    6. Re:Missing *pair* of parentheses by Per+Abrahamsen · · Score: 1

      Thanks, I wondered how compilers could fail to pick up *one* missing parentheses. Even in K&R C, that would be a syntax error.

    7. Re:Missing *pair* of parentheses by cortana · · Score: 1

      Yeah, change the 0 to another number and it wails, but I guess 0 is a valid comparison since 0 = NULL... damn.

  31. Another X vulnerability, with code for hack by audi100quattro · · Score: 1

    So, how is this different from this? I haven't read enough of either, they could be related...

  32. This is not a remote root vunerability by Technician · · Score: 4, Insightful

    Please note that this exploit is for the local user only. If you are the only user on your Apple or Nix box, then this is a non-news item. However if the BSA, RIAA, MPAA, or Dept of Homeland Security has taken your box and wants root, then you might have a problem. ;-)

    --
    The truth shall set you free!
  33. Re:Homoland Security - The Linux Pary by Anonymous Coward · · Score: 0

    brilliant sir i applaud you

  34. Wow, actual information by Anonymous Coward · · Score: 1, Informative

    What a novel concept

    actual code patch:

    --- programs/Xserver/hw/xfree86/common/xf86Init.c.orig 2006-03-17 23:30:10.0000
    00000 +0200
    +++ programs/Xserver/hw/xfree86/common/xf86Init.c 2006-03-17 23:29:35.0000
    00000 +0200
    @@ -1376,7 +1376,7 @@
              } /* First the options that are only allowed for root */
    - if (getuid() == 0 || geteuid != 0)
    + if (getuid() == 0 || geteuid() != 0)
          {
              if (!strcmp(argv[i], "-modulepath"))
              {
    @@ -1679,7 +1679,7 @@
          }
          if (!strcmp(argv[i], "-configure"))
          {
    - if (getuid() != 0 && geteuid == 0) {
    + if (getuid() != 0 && geteuid() == 0) {
                    ErrorF("The '-configure' option can only be used by root.\n");
                    exit(1);
              }

    Bug:

    https://bugs.freedesktop.org/show_bug.cgi?id=6213

    1. Re:Wow, actual information by sim82 · · Score: 1

      They actually managed to introduce this bug in two different locations? The programmer even changed the '!=' to a '==' after he copied the code without noticing the missing parentheses. Another reason not to use cut/paste for security relevant code...

  35. It's not soduku, dammit (was:Related news) by Lead+Butthead · · Score: 1, Offtopic
    ... and have completed a record number of soduku puzzles in newspapers around the country.
    It's SU-DOKU http://en.wikipedia.org/wiki/Sudoku, DAMMIT!
    --
    ELOI, ELOI, LAMA SABACHTHANI!?
    1. Re:It's not soduku, dammit (was:Related news) by Anonymous Coward · · Score: 0
  36. Typical by houghi · · Score: 1

    Just as with the WMD's, why are they looking for things that are not there? Oh wait, this is actually a good thing. :-)

    Why is this newsworthy? I asume bugs and vulnerabilities are solved all the wile, right? If nothing else it at least shows that Open Source is working. The more eyes you have, the more errors are solved.

    To the code: big brother is watching you.

    --
    Don't fight for your country, if your country does not fight for you.
  37. False Alarm by dfn5 · · Score: 1, Troll
    After Homeland Security discovered "xhost -" they issued this press release "Sorry, my bad".

    --
    -- Thou hast strayed far from the path of the Avatar.
  38. Missing the point..... by TheDukePatio · · Score: 5, Interesting
    I see a ton of comments mod'd Funny, but what I'm surprised folks haven't focused on yet is the fact that it was found in OSS. The reason they're able to find, report, and get it fixed in a week is the fact that it's OSS. It's understandable that the DoHS is going to want to do a security audit on things like this.

    I wonder how many potential security holes Coverity's uncovered by scanning Windows source....oh wait....they can't. Well I'm sure if they signed an NDA they could tell M$ and get it fixed in a....um...err...sorry, you'll have to wait for the next patch cycle.

    --
    To Alcohol! The cause of, and solution to, all of life's problems.
    1. Re:Missing the point..... by haapi · · Score: 1

      Using the same tech as virus writers use to "binary diff" Microsoft patches to see what was fixed, and therefore, what is still vulnerable in the field, Coverity and related companies can still find many possible vulnerabilities. They also find a lot of false positives.

      --
      Well, apparently, you only have to fool the majority of people for a little while.
    2. Re:Missing the point..... by sentientbrendan · · Score: 1

      >The reason they're able to find, report, and get it fixed in a week is the fact that it's OSS.
      On the other hand, because its OSS now all of the machines that remain unpatched have an exploit that is not only known, but but publicized by the developer, with diffs showing *exactly* what line of code the error is on.

      Here's a trick if you want to break into someone's computer. Find out what version of apache (or whatever service) they are running, go to apache.org, check the known vulnerabilities for that version, get the diff from their CVS repository marked as fixing that bug. The bug will of course still exist on your target.

      Of course, you *should* patch your software regularly, similar information (without diffs) is often available for some commercial software, etc. However, we live in a world such that we must take mistakes into account in all of our decisions, and hedge all our bets.

      The point isn't that open source is more insecure than other software, which to my knowledge it isn't, but that it does make some kind of attacks more convenient, and open source developers should be taking special measures to defend themselves. Maybe not everyone should get anonymous cvs access to every iteration of the code? Maybe only major releases should be available and patch comments hidden from people not on the dev team. Other rules determining how security information is disseminated to people not on the primary dev team could be put into place. Of course, none of them come without inconvenience for the dev team. Certainly, no one wants to watch their mouth on their developer's list.

    3. Re:Missing the point..... by mizhi · · Score: 1

      They're also missing the fact that this was done by the Department of Homeland Security... well, at least funded by them.

      And everyone thought they only made pretty-colored signs. :)

      --
      Humorless sig goes here.
    4. Re:Missing the point..... by ipfwadm · · Score: 4, Interesting

      On the other hand, because its OSS now all of the machines that remain unpatched have an exploit that is not only known, but but publicized by the developer, with diffs showing *exactly* what line of code the error is on.

      While I hate to sound like all the other OSS apologists that have posted so far ("yeah there's an exploit, but think of how many we could find if we could run it on the Windows source!" and other such tripe that ignores the fact that a serious bug was found in OSS software), your argument is a bunch of crap. You're basically saying that exploits in closed-source software are unknown and unpublicized, which is ridiculous.

      As for your Apache example, it would be just as simple to see what version of IIS a machine is running and look through MS KB to find the known exploits against it. Or look at bugtraq. Or anywhere else on the Internet. Just because the source is a secret doesn't mean the details of the available exploits are too.

      Oh and knowing the line of source code on which that the error exists is entirely irrelevant to the discussion -- having that knowledge doesn't make using an exploit any easier or more difficult. It may assist in developing new exploits, but when attempting to use one that has been found, that knowledge is superfluous.

  39. Old news. by Homestar+Breadmaker · · Score: 2, Interesting

    This is from march, why is everyone freaking out now?

  40. Excuse Me, But... by Nom+du+Keyboard · · Score: 1
    While serious, the flaw has already been corrected.

    The flaw may have been corrected in the source tree, but that says nothing for the tens of millions of X11 systems out in the field yet.

    --
    "It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
    1. Re:Excuse Me, But... by pembo13 · · Score: 0, Flamebait

      Would you rather the go to each persons home and hand them a disk with the fresh source code?

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    2. Re:Excuse Me, But... by acoopersmith · · Score: 1
      The flaw may have been corrected in the source tree, but that says nothing for the tens of millions of X11 systems out in the field yet.

      It's unlikely there are tens of millions of systems affected by this - the bug was introduced during 6.9 development - only Solaris 10 and Fedora 5 had shipped 6.9 or 7.0 in a stable release by the time it was found. Everyone else still had it only in their testing branches.

  41. Another score for open source! by MoxFulder · · Score: 2, Insightful

    The advantage of open source shines through once again! This couldn't have happened with MS Windows, that's for sure... without access to the source code, this bug couldn't have been discovered, let alone fixed so quickly.

    (And yes, I know that some gov't agencies have a deal to view the Windows source code, but there are WAAAY fewer eyeballs looking at it, and from what I've heard the code is a big badly documented mess.)

    1. Re:Another score for open source! by Anonymous Coward · · Score: 0
      The advantage of open source shines through once again! This couldn't have happened with MS Windows, that's for sure... without access to the source code, this bug couldn't have been discovered, let alone fixed so quickly.

      Without access to the source code a bug like this would've never been found by hackers in the first place. Now they've exposed a critical flaw in a key piece of the average Linux desktop. At least 50% of Linux desktops will remain vulnerable to this for years to come if the OpenSSH vulnerability was any benchmark.

    2. Re:Another score for open source! by toadlife · · Score: 1

      Microsoft runs these bug-checker-programs on their code all the time.

      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    3. Re:Another score for open source! by Nutria · · Score: 1
      Now they've exposed a critical flaw in a key piece of the average Linux desktop.

      could be exploited to allow local users to execute code with root privileges
      Using a decent firewall, a "single-user" workstation is secure enough.

      But... since I upgrade regularly (yea Debian!), I'm sure I got the fix this afternoon.
      --
      "I don't know, therefore Aliens" Wafflebox1
    4. Re:Another score for open source! by LegendLength · · Score: 2, Funny

      Microsoft runs these bug-checker-programs on their code all the time.

      Excluding Outlook Express I guess.

    5. Re:Another score for open source! by toadlife · · Score: 2, Funny

      "Excluding Outlook Express I guess."

      Perhaps it's part of their market effort to get people to uprade to Outlook.

      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    6. Re:Another score for open source! by Anonymous Coward · · Score: 0

      Microsoft runs these bug-checker-programs on their code all the time.

      Glad to hear it. What do they do with the results?

    7. Re:Another score for open source! by sorak · · Score: 2, Funny
      The advantage of open source shines through once again! This couldn't have happened with MS Windows, that's for sure... without access to the source code, this bug couldn't have been discovered, let alone fixed so quickly.

      (And yes, I know that some gov't agencies have a deal to view the Windows source code, but there are WAAAY fewer eyeballs looking at it, and from what I've heard the code is a big badly documented mess.)


      Yeah, but Windows is still safer, because the useful bugs are hidden in with all these other bugs. In fact, it's sometimes hard for a hacker to get to the exploit, because, first he runs into what I like to call "the blue screen OF FREEDOM!"
    8. Re:Another score for open source! by afaik_ianal · · Score: 1

      This couldn't have happened with MS Windows, that's for sure...

      Sure it could. If the bug has no behavioural symptoms, or no method of reproduction, then it would hardly be a critical issue.

      This bug could have been found by running the relevant X11 feature with appropriate uid/euid. The code would not have behaved correctly.

    9. Re:Another score for open source! by Plunky · · Score: 1
      Microsoft runs these bug-checker-programs on their code all the time.

      Maybe not so successfully though..

      In fact, as far as I am aware, Coverity are intending to make a profit. They are providing free access to their tools to the Open Source community now because it gets them publicity and give their tools a good workout (there is lots of fine tuning going on). Later, they will be selling their services privately and you wont hear about the bugs they find.

    10. Re:Another score for open source! by toadlife · · Score: 1
      "...there is lots of fine tuning going on..."

      And apparently fine tuning is in order. In a recent postfix update notification (4/6/2006), the author of postfix wrote this:


      "Beware: Coverity's claim of "17 original defects" in Postfix includes
      14 false positives; that is, 14 are bugs in Coverity, not in Postfix.
      Inflated claims like this may make their own product look good, but
      they are hamful for the reputation of open source projects."
      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
  42. Will debian servers survive this time? by matushorvath · · Score: 1

    At least we will see how was the Debian update infrastructure improved since last time, when it brought the server down on its knees.

  43. I just saw a story.. by ModernGeek · · Score: 2, Funny

    ..I just saw a story on digg (washes mouth out with pee to get bad taste out of my mouth), and noticed that the FAA just announced they will be running linux to track flights. Maybe there is a tie in-between this find and that announcement?

    --
    Sig: I stole this sig.
  44. Wow. Homeland Security.... by tomq123 · · Score: 5, Funny

    is getting close to being able to do what they portray on 24.

    Jack: I'm running out of time. I need that salelite image.
    Chloe: I opened a socket into a NASA server and retasking the satelite.
    Jack: Great, download the image to my PDA.
    Chloe: I need your IP address.
    Jack: 1.2.123.129
    Chloe: I'm having some trouble. I'm hacking into a secure server at CTU, and sending the image to your PDA.
    Jack: I've got it. Thanks Chloe.
    Chloe: Whatever...

  45. Re:This is not a remote root vunerability by tokabola · · Score: 2, Insightful

    AFAIK this exploit can be used over the net, but only if you've enabled remote logins in your Xconf. I'm not aware of any distro that does that by default, and the Xconf "sample" that comes with XFree86 or Xorg both have remote logins disabled.

    I realize that it's too much too assume that anyone geek enough to enable remote X sessions is also geek enough to protect his system adequately, but most of the time that will be the case.

    --
    Open Source for Open Minds
  46. Re:This is not a remote root vunerability by Technician · · Score: 1

    AFAIK this exploit can be used over the net, but only if you've enabled remote logins in your Xconf.

    The article specified local. Whether this would work over the net could be a subject of debate. You might be right and the article did not touch on remote X sessions.

    --
    The truth shall set you free!
  47. It all depends... by mistergin.net · · Score: 3, Funny

    Depends,

    Have you paid your Moses Fee?

    (let my packets go....) [as sung to 'let my people go']

    --
    Less Talk. More Stab.
  48. Re:Missing *pair* of parentheses - PASCAL? by Anonymous Coward · · Score: 1, Funny

    "Whereas Europeans generally pronounce my name the right way ('Ni-klows Wirt'), Americans invariably mangle it into 'Nick-les Worth'. This is to say that Europeans call me by name, but Americans call me by value."

    http://en.wikipedia.org/wiki/Niklaus_Wirth

    So was the X11 bug in European or American code?

  49. Unlikely bug by Anonymous Coward · · Score: 0

    The buggy code looks like what some guy would insert into the source code to create a root exploit.

    Remember the attempted root exploit by obfuscated code in the linux kernel?

  50. Do you think by Anonymous Coward · · Score: 0
    that this line would have been part of the summary if the flaw were discovered in Windows?
    While serious, the flaw has already been corrected.


    Of course, if the (another) flaw were discovered in Windows, it would hardly be newsworthy.

  51. This proves it! by The+Spoonman · · Score: 1, Flamebait

    The government is in cohoots with Microsoft! This is all just a smear campaign because we KNOW that security vulnerabilities like this do NOT happen in Open Source software! The software goes through "many eyes" who catch these kinds of things. The fact that it occurs in recent and older versions of the software simply proves they're just smearing, and there's no basis for this in fact. I'm so tired of other people pointing out the security flaws in our software. Don't they understand we're working towards a common goal of ridding the world of Microsoft who make useful, but insecure software! We want the world to use software that's more difficult to use, but secure. That way, only people who know what they're doing will ever use a computer, just as our lord, Linus, says it should be. Torvaldo Fhtagn!

    Please note: the above is a work of fiction, sarcasm and humor. If you didn't find it funny, pull the rod out of your ass and get a clue.

    --
    Which is more painful? Going to work or gouging your eye out with a spoon? Find out!
    http://www.workorspoon.com
    1. Re:This proves it! by Anonymous Coward · · Score: 0

      The government is in cohoots with Microsoft! This is all just a smear campaign because we KNOW that security vulnerabilities like this do NOT happen in Open Source software! The software goes through "many eyes" who catch these kinds of things. The fact that it occurs in recent and older versions of the software simply proves they're just smearing, and there's no basis for this in fact. I'm so tired of other people pointing out the security flaws in our software. Don't they understand we're working towards a common goal of ridding the world of Microsoft who make useful, but insecure software! We want the world to use software that's more difficult to use, but secure. That way, only people who know what they're doing will ever use a computer, just as our lord, Linus, says it should be. Torvaldo Fhtagn!


      Please note: the above is a work of total crap, written by a low-grade moron. If you found it funny, pull the shit out of your head and get a clue.

    2. Re:This proves it! by mark_hill97 · · Score: 1

      I know your post was meant to be humorous but doesn't it seem like open source worked since this was found and patched?

    3. Re:This proves it! by The+Spoonman · · Score: 1

      Not the way the cultists would want you to believe. Things of this magnitude are supposed to be found long before they're in production. Not a version or two later. It was more a jab at the cultists than anything else.

      --
      Which is more painful? Going to work or gouging your eye out with a spoon? Find out!
      http://www.workorspoon.com
  52. UIDs by r00t · · Score: 5, Informative

    The effective UID (euid) is changed when you run a setuid app, while the real UID (uid in this case, or ruid) is not.

    The effective UID is normally associated with permission to access files. Well, Linux actually uses the filesystem UID (fsuid or fuid) for that, but that one nearly always tracks the effective UID for compatibility.

    There is also a saved UID (suid or svuid) that is helpful for apps that need to swap UIDs back and forth. It's not used for anything else.

    1. Re:UIDs by Columcille · · Score: 1

      Helpful info, thanks. Wish I had some mod points for you. :)

      --
      I love my sig.
  53. That looks like: by r00t · · Score: 1

    if the-user-really-is-root or the-user-can-do-no-harm-trying

    The second case is probably for debugging or for when using a non-setuid X server that relies on a kernel-based framebuffer device to control access.

  54. How about the drunk guy? by antdude · · Score: 1

    did she already tazer that drunk dude too? ;)

    --
    Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
  55. ObSimpsons by Anonymous Coward · · Score: 0

    I think we should throw a ticker-tape parade on behalf of the heroic inanimate carbon^Wparentheses!

    (On an annoyingly pedantic note, I doubt very much it was a missing parenthesis, because that would fail to compile in every language I know. I do, however, believe that there were missing parentheses.)

  56. ruby by Anonymous Coward · · Score: 0

    ah -- this can not happen in ruby code ;)

    geteuid

    is the same as

    geteuid()

    if geteuid is a method or function in the scope

  57. Re:Wow. Homeland Security.... by kabz · · Score: 1

    Jack: Sorry Chloe, that IP address was 163.56.1.276 Chloe: Trying it now Jack, thanks

    --
    -- "It's not stalking if you're married!" My Wife.
  58. Where was the warning? by The+Pim · · Score: 2, Interesting
    There are a number of interesting issues with this bug and how it's being reported.
    • Never mind that the bad code is valid C, it's insane that it didn't generate a warning. I hope GCC has the option, and security sensitive code should be built with as many warning enabled as possible.
    • Code that's conditional on "whether I'm root" is a hole waiting to open. Must better to have a separate wrapper that is setuid and accepts a constricted set of options, then calls the real program (which is not setuid).
    • Given that X is a network service, most commonly run on single-user machines, a local root vulnerability (while egregious) is hardly a "worst-case scenario".
    • This appears to be an effective use of government funds.
    --

    The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    1. Re:Where was the warning? by Just+Some+Guy · · Score: 1
      Never mind that the bad code is valid C, it's insane that it didn't generate a warning.

      Which warning would you like it to throw? "warn: Add more parens at random places!"

      Code that's conditional on "whether I'm root" is a hole waiting to open. Must better to have a separate wrapper that is setuid and accepts a constricted set of options, then calls the real program (which is not setuid).

      But the setuid wrapper will still have to test for its rootness at times, and I'm not sure that moving that line of code from one program to another would make much of a difference.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Where was the warning? by The+Pim · · Score: 1
      Which warning would you like it to throw?
      Comparison of a function constant?
      But the setuid wrapper will still have to test for its rootness at times
      I don't think so. Why? It just sets ruid to euid and passes along a limited set of options to the real X server.
      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    3. Re:Where was the warning? by Anonymous Coward · · Score: 0

      Hah.

      Use Gentoo for a day- you'll find out that half the stuff you compile will throw hundreds of warnings. Like anyone pays attention...

    4. Re:Where was the warning? by Anonymous Coward · · Score: 0

      maybe if you were a programmer you'd realize that there's a perfectly good use for this. Often times you have to check function pointers to see if they're NULL aka 0

    5. Re:Where was the warning? by The+Pim · · Score: 1

      That's a non-null constant function pointer.

      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    6. Re:Where was the warning? by mce · · Score: 1
      Comparison of a function constant?

      Nice try, and it would help. But please note that you're just plastering over the problem without really solving it. What happens when I use a non-constant function pointer and forget the parenthesis? Who's gonna warn me in that case? Without needlessly warning about every single function pointer test, that is.

      And please don't tell me that the solution is to declare

      if (fptr) ...;
      illegal and to always require
      if (fptr != 0) ...;
      because then we're not writing C anymore. (Maybe that's a hint to the real solution...)
    7. Re:Where was the warning? by Alioth · · Score: 1

      The compiler would have to be able to read minds to throw a warning on that (it won't, even with -Wall). It's a perfectly sane thing to compare a function pointer to NULL in most code. Perhaps we need -Wdowhatimeannotwhatisay.

    8. Re:Where was the warning? by djmurdoch · · Score: 1

      Comparison of a function constant?

      Nice try, and it would help. But please note that you're just plastering over the problem without really solving it. What happens when I use a non-constant function pointer and forget the parenthesis?


      In that case you don't get a warning. But in this case the error would have been discovered much earlier.

      Just because a warning won't solve every problem doesn't mean it's a waste of time.

      In this case the likely real use of the code would be as an expansion of a macro, where the macro might be a function pointer, or might be a function. But a simple workaround to indicate intention would be to require parenthesis wrappers:

      if ( (foo) == 0 ) is legal, no warning

      if ( foo == 0 ) is legal, but generates a warning.

    9. Re:Where was the warning? by marcosdumay · · Score: 1

      There is not much use in comparing a constant to 0. Even more when 0 is a forbiden value for that costant. That is a feature missing from GCC, or more exactly a bug on the warning that is given if you use (!funcName).

      Or do you really mean that the compiler shouldn't warn you if you write "if(2 != 3)..."?

  59. Relying on compilers to catch errors by 200_success · · Score: 1

    The compiler's job is to turn any syntactically valid source code into executable code. It might warn you about syntactically dubious constructions. But compilers aren't designed to catch logic errors. While the presence of syntax errors tells you that the code is definitely wrong, the absence of syntax errors does not indicate that the code is correct.

    An expressive, succinct, high-level language is still the better bet than a verbose language for producing quality code. All the verbose language does is make you type more, and probably increase the total number of typos. Working in Pascal just creates more syntax errors, which doesn't necessarily reduce the number of logic errors. If you insist on being verbose, your effort would be better spent on adding more assertions and comments to your code.

    Unfortunately, if the goal is to produce quality code, C is succinct in all the wrong places, with shortcuts like if (a = b), and verbose in all the wrong places, such requiring you to do your own memory management.

    1. Re:Relying on compilers to catch errors by Chandon+Seldon · · Score: 1

      You can have a language that catches mistakes like this yet isn't overly verbose. In a more strongly typed language (like Haskell for example) the erroneous code wouldn't have compiled because a pointer to a function obviously isn't what you want in an integer comparison.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    2. Re:Relying on compilers to catch errors by Mike+McTernan · · Score: 1

      Actually, I would hope that the compiler would print something here, but alas, my version of GCC doesn't:

      [mm1@nv-mike mm1]$ gcc --version
      gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-54)
      Copyright (C) 2002 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      [mm1@nv-mike mm1]$ echo -e '#include \nint main() { if ( printf != 0 ) printf("Sucks\\n"); return 0; }' | gcc -xc - -Wall
      [mm1@nv-mike mm1]$

      The problem is that comparisons between 0 and a pointer type are silently ignored (to allow NULL to be defined as 0?). If the comparison is with a non-zero value we are warned:

      [mm1@nv-mike mm1]$ echo -e '#include \nint main() { if ( printf != 50 ) printf("Sucks\\n"); return 0; }' | gcc -xc - -Wall
      : In function `main': :2: warning: comparison between pointer and integer
      [mm1@nv-mike mm1]$

      However, if I do something else syntactically valid, but dubious, gcc does give me a hint:

      [mm1@nv-mike mm1]$ echo -e '#include \nint main(int argc, char *argv[]) { if ( argc = 0 ) printf("Sucks\\n"); return 0; }' | gcc -xc - -Wall
      : In function `main': :2: warning: suggest parentheses around assignment used as truth value
      [mm1@nv-mike mm1]$

      Since it would seem rare that you would want to compare a function address (I guess weak linkage could make use of such a comparison), I'm suprised that the compiled doesn't produce a warning and allow somthing like an explicit cast or added parenthesis to neutralise the warning in cases where the programmer really does with to compare a function pointer type will 0.

      I guess Theo de Raadt maybe had a point in the KernelTrap interview [http://www.kerneltrap.org/node/6550] posted yesterday on Slashdot when he said:

      "I would love to see a new C compiler that was fully compliant, did minimal optimization, was small and fast, and high quality."

      Maybe in this case, a compiler is the wrong tool and lint would be better?

      --
      -- Mike
    3. Re:Relying on compilers to catch errors by simon_clarkstone · · Score: 1
      An expressive, succinct, high-level language is still the better bet than a verbose language for producing quality code.
      Strange that you should link to LISP here, since in Scheme one can pull of almost exactly the same trick, again by forgetting a pair of parentheses. (if (eqv? foo 0) ...) versus (if (eqv? (foo) 0) ...)
      --

      C:\>spell -b slashdot_submission.txt
      Bad command or file name.
  60. Re:Related news - invoice by Anonymous Coward · · Score: 0

    I can just see the invoice for an audit on a closed-source project...

    Quantity Item Price
    1 pair parenthesis $ 1
    1 knowing where they belong $999,999

      total $1,000,000

    the lameness filter hates crudely formmated posts and will make you resort to things even more crude

    as if several sequential spaces do not compress well. yeah, right.

    Important Stuff
    Please try to keep posts on topic.
    Try to reply to other people's comments instead of starting new threads.
    Read other people's messages before posting your own to avoid simply duplicating what has already been said.
    Use a clear subject that describes what your message is about.
    Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
    If you want replies to your comments sent to you, consider logging in or creating an account

    Computers don't actually think. You just think they think. (We think.)
    All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the Poster. The Rest © 1997-2006 OSTG.
    home

    awards

    contribute story

    older articles

    OSTG

    advertise

    about

    terms of service

    privacy

    faq

    rss

    like this filler is worthwhile?

  61. Why didn't OSS peer review catch this long ago? by I'm+Don+Giovanni · · Score: 1

    This flaw was found by a security audit of the code, which is an advantage of OSS, that such audits can be performed by third parties. But why didn't the ongoing peer reviews perfomred by the open source community themselves uncover this ages ago?

    --
    -- "I never gave these stories much credence." - HAL 9000
    1. Re:Why didn't OSS peer review catch this long ago? by acoopersmith · · Score: 1

      The bug was only introduced in January 2005 - and honestly, every time I looked at that code during the Xorg 6.9/7.0 development cycle, my brain automatically filled in the parentheses. Unless you're looking for it, it's easy to miss when reading the code.

    2. Re:Why didn't OSS peer review catch this long ago? by Ruie · · Score: 1
      Actually, you are watching peer review in action.

      The bug is recent, a little time passed and it got caught and fixed.

    3. Re:Why didn't OSS peer review catch this long ago? by dinivin · · Score: 1


      Sorry, but 15-16 months is not "recent".

    4. Re:Why didn't OSS peer review catch this long ago? by Ruie · · Score: 1

      Well, if we compare code to mathematics it does match up - it takes about 2 years to publish a math paper..

  62. Re:Wow. Homeland Security.... by Morgaine · · Score: 1

    Jack: "That was a test. Chloe would have known that 276 is an illegal address byte. We have your room surrounded. Either come out now with your hands up, or take the cyanide pill."

    --
    "The question of whether machines can think is no more interesting than [] whether submarines can swim" - Dijkstra
  63. the usual confusion by penguin-collective · · Score: 5, Insightful

    There can't be a "missing parenthesis in X11" because X11 is not a piece of code, it's a protocol. This vulnerability only affects the X.org and XFree86 implementations of X11; there are many other implementations that are not affected.

    It's pretty sad that Windows and Macintosh have conditioned people to think that every window system is just a piece of code; the notion that a window system could be an API standard with multiple implementations doesn't seem to occur tothem.

    1. Re:the usual confusion by pseudochaotic · · Score: 1

      +1 point for pointing out a factual error in the article
      -1 point for somehow dragging in Microsoft in an article about X
      ---------
      0 total points

      Sorry, you lose.

      --
      And the l33t shall inherit the 34r7h.
    2. Re:the usual confusion by Anonymous Coward · · Score: 0

      I'm sorry you don't understand that this is a real problem: both Windows and Macintosh fail to have a well-defined window system API separate from their implementation. They have it for their C and C++ libraries, which is why many command line programs are easily portable, but not for their window system.

    3. Re:the usual confusion by haroldhunt · · Score: 2, Insightful

      Uhh... coming from someone with 5 years of experience in the X Window System, your statement that X11 refers to a protocol and not a codebase is overly pedantic and not truly reflective of reality.

      The name 'X11' effectively refers to a code base because the 'sample implementation', which was extended for specific hardware by XFree86 and X.org, is the basis of almost all X Servers in existance. For example, Sun and HP both ship their own X Servers, but the base upon which they implemented their device-dependent code for specific video cards and input devices. Free X servers for Windows and Mac OS X both use the sample implementation (X.org to be specific). Commercial X Servers for Windows all seem to use the sample implementation as well. The only non-sample implementation X Server that I know of is WeirdX, an X Server written entirely in Java, which implies that everything would have to have been rewritten.

      Harold

    4. Re:the usual confusion by penguin-collective · · Score: 1

      The name 'X11' effectively refers to a code base because the 'sample implementation', which was extended for specific hardware by XFree86 and X.org, is the basis of almost all X Servers in existance.

      The name "X11" does not refer to a code base because changing any one of the X11 implementations incompatibly does not change the protocol--it simply makes that particular implementation incompatible.

      In contrast, when Microsoft changes the Windows API or Apple changes Cocoa, that defines what the current version of those window systems is; there is no separate standard. That's a profound difference between the two approaches to window systems.

      What the historical relationships between the X11 server code bases are doesn't have any bearing on this; however, even from a software engineering point of view, the various X11 servers are not "a code base"--even though many of them started from pieces of the MIT reference implementation, they are now very different from one another. And there have been more reimplementations from scratch of the X11 protocol, including several in non-C languages, numerous protocol proxies and transformers, and dozens of libraries.

    5. Re:the usual confusion by haroldhunt · · Score: 1

      Uhh... you made a statement about use of language, then tried to back up your point with tehcnical facts that have nothing to do with how people use words. I'm sure you hate it when people ask you if you have a Tivo at home and they really just want to know if you have a DVR :) My point is that the usage of the term X11 effectively refers to a code base and that most people use it this way, while it is technically incorrect.

      Historical relations are what my comments were all about; there is only one code base in wide spread use (on the X Server side, which is what the article had to do with, I believe) for the protocol, the OS layer, the DIX layer, and the MI layer. It is rather trivial to implement a working X Server on top of this (you just have to write the DDX layer); I know, I've done it (Cygwin/X). While some people might like to imagine that Sun and HP have reimplemented all of that shared code, it simply isn't true, they have not (learned from discussions with their engineers at conferences, and the fact that they still contribute patches to these shared parts of the code).

      In summary, I don't think you understand how much pull the sample implementation code has on X Servers on all platforms. In addition, there have been various experimental projects that have reimplemented the X11 protocol (such as XCB - not finished yet, thus not in use), a couple of proxy solutions (LBX - deprecated, nobody uses it in practice), NX (neat - but nobody uses it in practice), DXCP (again neat, the foundation of NX, but no one ever used it), and the only dozens of libraries that I know of all link against Xlib, thus they don't implement any of the X11 protocol :)

      If you were in the industry you would be surprised how much of the code that is actually in use is shared.

      Harold

    6. Re:the usual confusion by penguin-collective · · Score: 1

      My point is that the usage of the term X11 effectively refers to a code base and that most people use it this way, while it is technically incorrect.

      No, it does not even "effectively" refer to that. When people say that something is an X11 application, they expect that it talks to an X11 server; they neither know nor care what libraries it links to or what codebase the server is based on. In fact, they can't even tell.

      People may imagine that all this interoperability is achieved because it's all one big codebase, but that assumption is wrong; while there is a lot of code sharing, the code sharing is ultimately not what makes X11 interoperable, as the existence of both clients and servers (however little used they may be) that don't share any code shows.

      In summary, I don't think you understand how much pull the sample implementation code has on X Servers on all platforms.

      It doesn't matter how much code is shared; what makes something an "X11 server" or an "X11 application" is that it implements the protocol. If Cygwin/X stopped implementing the X11 protocol correctly, it would cease to be an X11 server, no matter how much MIT reference code it contained.

      (And, as I was saying, there have been numerous independent X11 protocol implementations, in languages like Java, Lisp, Python, Perl, SML, and many others. Chances are that if X.org unilaterally changed the X11 core protocol, lots of people would scream.)

    7. Re:the usual confusion by haroldhunt · · Score: 1

      Wow, we're really talking past one another. I'm telling you how people use the term 'X11' these days, and you're railing on about points that I don't disagree with (that it is a protocol standard, etc. etc.).

      Harold

    8. Re:the usual confusion by penguin-collective · · Score: 1

      No, I'm saying your statement about how people use the term is wrong. Most X11 users don't understand what X11 is or how it works, but they expect X11 clients and X11 servers to talk to one another, and that's an expectation that's guaranteed by the protocol. The fact that many of those users incorrectly assume that interoperability is achieved through sharing a single codebase doesn't change the fact that they are using the term to refer to the protocol-level guarantees.

      Secondarily, I think you're really overestimating the importance of code reuse. The fact that lots of X11 reference code has found its way into lots of different X11 implementations is not what guarantees X11 interoperability (after all, the separate implementations are maintained separately now and could easily each make incompatible changes). Almost all UNIX workstations contained Bell Labs UNIX code, but they were actually wildly incompatible in many ways. Even with all the shared code, X11 interoperability is guaranteed by the protocol definition, not through code reuse. And that's a crucial feature of the X11 window system that I'm sure you intuitively respect; or did you think "oh, I don't like the way GCs work, so I'll just change it in Cygwin/X?" What kept you? If it's the codebase that defines X11, hey, anything's fair game.

    9. Re:the usual confusion by haroldhunt · · Score: 1

      You're throwing a lot of red herrings in there. I never said anything about interoperability guarantees and I didn't say that users have any knowledge that a single codebase is in play. What I said was that when someone says "hey, there is a problem with X11", they are almost certainly, without knowing anything about it, referring to a single codebase that has the problem.

      Furthermore, the X Window System is not UNIX; it is much simpler and the sample implementation is very compartmentalized. From talking with Jim Gettys and Keith Packard at the X.org conferences (and evidenced by the code base itself), the way that UNIX vendors created their versions of an X Server was not to start from the ground up and pull in pieces that suited them; rather, they started with the complete sample implementation and wrote only a device driver. The code evidences this because there are DDX layers for IBM hardware and OS written by IBM, DEC hardware and OS written by DEC, Sun hardware and OS written by Sun, and I think some form of HP hardware and OS support written by them, contributed to and maintained in the early sample implementations. DDXs can range from hardware support only and limited OS support, to a full implementation like the XFree86/X.org DDX that contains support for loading modules, reading config files, etc. Over the years, various vendors have contributed any major changes they made back to the sample implementation (or X.org at the moment). There is no need to break the protocol; they just make a new extension when new functionality is needed.

      If you want to know more about it, just go to the next X.org developer's conference. Two years ago it was in Boston, MA at an HP office (now closed), two months ago it was here in Santa Clara, CA at a Sun office; next year we're going to try to keep it here on the West coast again. There are no mysteries about the X11 system and several of the original players attend the conferences in addition to developers from all the big X11 provider (HP, Sun, RedHat, Novell, sundry linux distros (Debian, Ubuntu, etc.)). You can ask anything you want and get all the history that you want; unfortunately, you'll also find that the term X11 effectively refers to one shared codebase :)

    10. Re:the usual confusion by penguin-collective · · Score: 1

      If you want to know more about it, just go to the next X.org developer's conference.

      I know the history of X11 well, having used the X Window System since its X10 days.

      unfortunately, you'll also find that the term X11 effectively refers to one shared codebase :)

      If X.org seriously starts treating X11 like a codebase rather than a protocol, that's the end of the X11 window system. With its network transparency already effectively broken by both Gnome and KDE, it would really open the floodgates to mutually incompatible direct-to-display graphics systems.

      when someone says "hey, there is a problem with X11", they are almost certainly, without knowing anything about it, referring to a single codebase that has the problem.

      Yes, and that's why it's important to correct them because if X11 and X.org become identified, the aspects of X11 that have allowed it to survive several generations of Macintosh and Windows and still be relevant will be lost.

  64. balls by Anonymous Coward · · Score: 0

    So you'd like it more difficult to write code?
    I'm sorry, but the point about C and C++ with their 'make it so' attitude, whether it's right or wrong.
    This defect is a failure of the good old 'Mark 1 eyeball' when it came to submission, pure and simple.

    The irony is that many programmers think that C and C++ are difficult languages on the basis that they don't 'Do what I mean'.

    Maybe we should all be programming everything in Ada instead?

    The point is, you do have to think about what you're doing when writing software. If you're not doing than, then I'm afraid that your sloppy thinking will come back and bite you in the arse sometime extremely soon. A software language is just a tool like any other, to use and misuse as you see fit...You sum up the pros and cons...

    The fault is with the programming process, and no matter what tools you use to implement something, it will never make up for the carity of thought required to implement something well.
    The concept of the language is to improve the visibility of what you're doing, and enable you to write software rapidly and reliably, but if no-one is checking what is written, then the choice of language is immaterial.

    Although I'm not a great believer in the holy OSS, I would have thought that the concept of 'Many Eyeballs' would have picked it up earlier, although I gather that this has already been spotted and fixed in many situations.

  65. King of ironies by pablodiazgutierrez · · Score: 1

    That reminded me... Isn't it great that whoever decided to give a name to the phenomenon of "lisping" spelled it that way? So subtly evil!

  66. Mac OS X Tiger by themadplasterer · · Score: 3, Interesting

    Tiger shipped with (X11 1.1 - XFree86 4.4.0) and X11R6.9.0 and X11R7.0.0 are forked from that. So it could well affect Mac OS X. If it does it will be interesting to see how long it takes Apple to provide an update if at all, given that it's open source

    1. Re:Mac OS X Tiger by EMR · · Score: 2, Interesting

      Home land security is WAY behind on things OR eweek is way behind on things. This was fixed back in March and ONLY affects X.org 6.9 adn 7.0 so Mac OS X is unaffected.

      https://bugs.freedesktop.org/show_bug.cgi?id=6213

  67. I've always thought C was rather inconsistent here by Anonymous Coward · · Score: 0

    I'm not exactly an expert on C, but I've often been confused by this:

    In C, if I want the address of a variable X (say it's an int, float, double, char, etc - any C-defined data type), I would use the ampersand operator:

    int x = 20;
    int * ptr_x = &x;

    So, why not use the same convention for getting the address of a function?
    ( skipping declaration of function_ptr because I don't remember the syntax for it - just been too long since I needed to declare a function pointer variable)

    function_ptr = &myFunction

    - sure it adds a little bit of verbosity (one character's not bad), but would make it more explicit that I want the address of the function. And, lacking the ampersand, you could then have the compiler throw an error.

    Is there some subtelty of the C-language that such syntax would cause some sort of collision with another c construction? Like, for example, does the C language really use all function names as declarations of pointer variables, so that &myFunction is the address of the variable that holds the pointer to the actual function code, rather than the address of the code itself?

    I dunno, but in any case, it should be more difficult, syntactically, seems to me, to run into this type of programming error than it actually is, apparently.

  68. Nondisclosure by Anonymous Coward · · Score: 0

    They found a critical flaw, however due to the invocation of State Secrets Privilege (http://en.wikipedia.org/wiki/State_Secrets_Privil ege) they are unable to discuss the matter any further.

  69. Thin client by phorm · · Score: 1

    Hmm. Well where I work most sites have a linux server that allows machines that are somewhat akin to thin clients to connect to a master X server.

    1. Re:Thin client by PeterBrett · · Score: 1

      Yes, so the X server is running on the thin clients, and the X clients, i.e. the applications, are running on the server. So there should never be any need to run an X server on a terminal services server.

      X is confusing because the client/server are the "wrong way round".

    2. Re:Thin client by Plunky · · Score: 1
      X is confusing because the client/server are the "wrong way round".

      No its a graphics server. The server is where the graphical display is, and the clients are the programs that want to draw on the graphical display. One server, many clients.

    3. Re:Thin client by ??? · · Score: 1

      XDM != X Server. The X server still runs on the thin clients.

  70. Re:Wow. Homeland Security.... by NeoSkandranon · · Score: 1

    It's actually an octet not a byte (in the above stated format)

    Who are you and where is the real jack ;)

    --
    If you can't see the value in jet powered ants you should turn in your nerd card. - Dunbal (464142)
  71. Off Topic :: Concerning Sig by LordOfTheNoobs · · Score: 1
    Sig: I stole this sig.

    The set of those bearing this sig is composed of between zero and infinity thieves, and exactly one liar.

    --
    They're there affecting their effect.
    1. Re:Off Topic :: Concerning Sig by geekboy642 · · Score: 1

      +1, Funny
      -1, Obvious

      --
      Just another "DOJ fascist authoritarian totalitarian bootlicker" -- Zeio
    2. Re:Off Topic :: Concerning Sig by Anonymous Coward · · Score: 0

      What if multiple people invented the sig simultaneously? What if in some cases it wasn't stolen but freely given?

    3. Re:Off Topic :: Concerning Sig by zippthorne · · Score: 1

      Well either way, the people with that sig are all theives and liars.

      --
      Can you be Even More Awesome?!
    4. Re:Off Topic :: Concerning Sig by Anonymous Coward · · Score: 0

      no they're not they're thieves _OR_ liars

    5. Re:Off Topic :: Concerning Sig by hobbit · · Score: 1


      Infinity? Infinity is a limit, but even if it were a number, how long do you suppose it would take for a sig to be transmitted between an infinite number of people?!

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
    6. Re:Off Topic :: Concerning Sig by LordOfTheNoobs · · Score: 1

      Assuming any possible positive real increment of time to acheive a transfer between an individual have the sig and any number of others short of the infinate limit, it would take about infinately long.

      --
      They're there affecting their effect.
    7. Re:Off Topic :: Concerning Sig by hobbit · · Score: 1

      So your mission, should you choose to accept it, is to revise your upper boundary of the number of thieves in the set, based on the age of the concept of signatures, the speed of signals around the brain, etc.

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
  72. Re:This is not a remote root vunerability by acoopersmith · · Score: 3, Informative

    The exploit mentioned in this article cannot be exploited by a user who isn't logged into your system - you have to be able to run the Xorg command with certain options. See X.Org's advisory at http://lists.freedesktop.org/archives/xorg/2006-Ma rch/013992.html

  73. Unlike WMD's: by Anonymous Coward · · Score: 0

    They actually found something.

  74. Show me the source... by DusterBar · · Score: 2, Interesting
    While this is unfortunate that there was such a bug, there is something to be learned here, beyond the fact that any software can have such flaws:

    Homeland Security was able to do the code audit on X11.

    Maybe that really should be written as, because the source code was publicly available, Homeland Security was able to do this. How many of these types of faults exist in closed source software that no outside group had the chance to dig into like with X11 or OpenBSD or...

  75. I don't understand the intention of the fixed code by gfim · · Score: 2, Insightful
    The fixed code is
    if (getuid() == 0 || geteuid() != 0) do something that only root can do
    What is the intention of this test? Allow something to be done if the real user id is zero (i.e. it is root logged in) or if the effective user id is not zero (i.e. if the program is running as setuid to somebody other than root). That doesn't make a lot of sense to me.
    --
    Graham
  76. Re:I don't understand the intention of the fixed c by acoopersmith · · Score: 3, Insightful

    It's in code that allows you to do things like load code modules from other paths, so it's only allowed if you're already root or not running setuid-root. (It should probably check that you're not running setuid at all, but there's no real point having Xorg setuid to anyone but root, so no one has added that check.)

  77. Re:Wow. Homeland Security.... by Anonymous Coward · · Score: 0

    It's actually an octet not a byte (in the above stated format)

    Indeed, it's an octet within the 32-bit field. And the size of that octet (and indeed all octets) is 1 byte.

    So your perfectly accurate observation merely highlights that the illegal 276 was trying unsuccessfully to be only one quarter part of the IP address, which we knew already. :P

    Who are you and where is the real jack ;)

    The real Jack's hiding from pedants. You can see his point. And Chloe took the cyanide to keep the thread from growing. :P

  78. Now I think I'm starting to understand. by Allnighterking · · Score: 0, Troll

    They are trying to find sufficient errors in Linux code to explain why they were the only group of people in the world who didn't know a major hurricane could cause the levies to break in New Orleans. (They may be on Windows, hard to tell as they use Akimai to ensure uptime)

    --

    I'm sorry, I'm to tired to be witty at the moment so this message will have to do.

  79. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  80. Is X11 a code word for pr0n? by CPNABEND · · Score: 1

    If it is, I need to patch my server ASAP.

    --
    My wife doesn't listen to me either...
  81. Move to OSS? by satcomdaddy1 · · Score: 1

    If this results in a Government move to OSS, ensuring that it's as secure as the proponents (of which I am one) say, then I'm all for it! IIRC, TFA mentions a $1.2M price tag for this "security scanning". If that results in more OSS in Gov't, it's worth exponentially more than the current pricetag. I am longing for the day when I can use an OS that is open source. My little 55 person outfit has more than $1.2M of MS and supporting software, between the OS, Exchange, Office, Server, AD, card readers, AV, apps to "push down" upgrades, etc.., I get tired of having to drink the Kool-Aid

  82. Ok... by Anonymous Coward · · Score: 0

    When are they gonna repeat this for Windows?

    It is getting rather obvious that Microsoft can't be bothered to use automated code scanners; when will Homeland Security force themselves on the company whom 90% of everyone runs the OS from?

    Hmmmm, no answer. Why is that?

  83. Its a cold day in hell. by Anonymous Coward · · Score: 0

    Thank you, DHS. Today you have made the world safer.

  84. Wrong warning by spitzak · · Score: 1

    I just checked, and stupid gcc does not produce any warning whatsoever. I tried it as C++, I tried -Wall and -W, and still nothing. Not a good showing there.

    I think the proper warning is that the test is constant. "geteuid != 0" is always true.

    1. Re:Wrong warning by AtrN · · Score: 1

      It's not really a constant. Since its an external symbol the compiler doesn't know its value. It's just a place holder until link time.

    2. Re:Wrong warning by Anonymous Coward · · Score: 1, Informative

      Actually, global symbols are known to be non-NULL.
      This is defined in the C standard so the compiler can optimize the test away.

      This is quite usefull for writting efficient macros (or inlined functions) in
      which an argument can be either a function pointer or a global function:

      #define call_if_exist(fun,arg) if (fun!=0) { fun(arg) ; }

  85. nullptr to the rescue by neutralstone · · Score: 2, Informative

    Rumor has it the ISO C++ committee is likely to pass through a proposal for a new keyword, nullptr, which will have a "magic" type "pointer-to-anything" and has the value of the null pointer constant.

    So, E.g.:

    struct A;
    int f( A* ); // #1
    int f( int ); // #2

    int m =  f( 0 ); // # calls #2
    int n =  f( nullptr ); // calls #1

    Of course, that wouldn't help in the aforementioned case.  0 will still be convertible to a pointer type as it is now; it's just that 'nullptr', being a pointer itself,  makes for a "better" conversion to a real pointer type.

    nullptr is supposed to be a non-disruptive pure extension (except for the fact that it breaks code that uses 'nullptr' as an identifier) -- meaning that it should not change the meaning of existing code.

    1. Re:nullptr to the rescue by shutdown+-p+now · · Score: 1
      Isn't it actually implementable in C++98?
      struct nullptr_type {
      template <typename T> operator T* () const { return 0; }
      } const nullptr;
      I recall VC6 did not like it much ("internal compiler error") last time I tried that though, but that was a few years ago. Is there any modern C++ compiler which can't handle it?
    2. Re:nullptr to the rescue by neutralstone · · Score: 1

      That kind of works, but I think the authors wanted to make sure that nullptr has the same semantics everywhere, and the only clean way to force that is with a reserved word.  If it's an identifier, the name can be hidden or replaced by some other library implementation, which could lead to all kinds of non-portable weirdness.  And if the type is a normal user-defined type it can be used to deduce template arguments (which I think they wanted to avoid).  Also, I think there were some other arguments about quality of code and diagnostics from compilers when referring to the type and to the value.

  86. Why? by Junta · · Score: 2, Informative

    A linux terminal server need only the X libraries, not even a single instance of an X server, which generally requires elevated privileges to run. I think I've seen work to correct that, but as it stands at large an X server runs as root and has to arbitrate security, whereas X applications linked to X libraries, displaying to a thin client over the network, the server has no root level code and only the thin client filesystem/system is at any risk.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  87. Agree with the sentiment, but.... by Junta · · Score: 2, Insightful

    Unfortunately, the distros compete with the likes of Windows. As such, though technically speaking X on a multi-user system of any remote importance is a bad idea, if you shrug off X on servers Windows administrators may not like it as much. Install Red Hat or SuSE server oriented distributions and by default you still end up with a X environment. Good administrators know not to run X and it is powerful and even more convenient to run X apps remotely or inside a detachable VNC session. For small business to medium business/departmental servers, expect X servers to be the norm in the enterprise despite best practice.

    The obvious solution is X not as root, so the worst you can do is screw around with the devices X really needs access to (screw around with the graphics, and local input devices, but an administrator can still ssh and have an intact, secure system in the ways that matter)

    --
    XML is like violence. If it doesn't solve the problem, use more.
  88. Re:Homoland Security - The Linux Pary by Anonymous Coward · · Score: 0

    That is very well written. Congratulations. You are winner.

  89. Re:Related news - invoice by Anonymous Coward · · Score: 0

    "Computers don't actually think. You just think they think. (We think.)"

    Even when we're on the brink
    Of thinking what we think we think,
    The honest eye should wink.

                                  -Auden (of course. Sometime in the 70s.)

  90. Maybe. by jd · · Score: 1

    If it's in UTF16 on a 16-bit machine, or UTF32 on a 32-bit machine, then yes.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  91. Coming soon.... "Parenthesis Day" by renjipanicker · · Score: 2, Funny

    Starring Bruce Willis, of course, who assembles a crack team to go into the code and insert the missing punctuation before the world gets blown up.

    1. Re:Coming soon.... "Parenthesis Day" by Anonymous Coward · · Score: 0

      How long till New Line Cinema anounces "Parenthesis on a Plane" ?! Starring Samuel - I've had it with these non alphanumerical characters! - Jackson.

  92. umm... by ShaunC1000 · · Score: 1

    "A missing parentheses in a bit of code is to blame. " how was the source able to compile?

    1. Re:umm... by mr.newt · · Score: 1

      The source was able to compile because a function name without the parentheses is a pointer. So the compare was between a pointer address and zero, which is perfectly valid syntactically.

      -Michael

  93. Critique... by jd · · Score: 4, Interesting
    1. Knowing the line won't help you figure out the exploit
    2. Whether anyone tells you about a bug or not, you're always capable of scanning source - or even binaries - in search of unknown exploits
    3. You knowing about a bug doesn't alter the odds of "Them" knowing about a bug - it only alters the odds of you fixing it
    4. X11 bugs are rarely externally exploitable, as not many people run X sessions over the public internet and therefore those ports will be blocked at the corporate (or personal) firewall
    5. The mathematical model of conflict ("Game Theory") only has a solution (ie: win no matter what the opponent does) when both sides know absolutely everything, ergo the only way to establish a sane IT security policy is to assume the attacker knows all the defects and exploits that exist, whether they are published or not


    That last one makes things tough. How can you have security when everything is known? Well, in practice that is the only context security is even possible. "Security through obscurity" really means "we don't know what our opponents know and we're not even sure what we know". If, however, you assume that your opponents know everything then you don't take shortcuts. You plan for contingencies, you have fallback positions, you have not just a plan but a roadmap of possibilities and how to deal with them.


    (At least, for any scenario too complex to actually have a complete solution for. For simpler problems, such as a chess puzzle or - for the past decade - the entire game of draughts, it is possible to map a complete, guaranteed winning strategy that will work no matter what the opponent does. Such a solution exists for the complete game of Chess and indeed for the complete game of Go, but has not yet been found. For any given computer system, such a solution must also exist for the operator/admin, but the chief problem has always been to get them to bother even putting the bits of solution that are known in place.)

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Critique... by joe+155 · · Score: 1

      Good post and I like almost everything that you say, but I must disagree with this part

      The mathematical model of conflict ("Game Theory") only has a solution (ie: win no matter what the opponent does) when both sides know absolutely everything, ergo the only way to establish a sane IT security policy is to assume the attacker knows all the defects and exploits that exist, whether they are published or not

      I don't think that game theory has solutions such as this... lets take the prisoners dilemma, it has now "win" solution (assuming rational actors) even if both sides have perfect knowledge. To make this claim you would need to be able to show a model of game theory which worked out in this way, and to be honest I think that this isn't the case. It is rational for crackers to try and get exploits which will be advantageous, and it is rational for the OSS people to want to fix it (partly for vainglory... maybe a bit of diffidence). Because of this there is no "win" condition; it continues forever and will do so, you cannot end the game, unless we all agree to write good code and not look for/exploit holes... which probabl won't happen...

      --
      *''I can't believe it's not a hyperlink.''
  94. Don't you know how the government works already? by Anonymous Coward · · Score: 0

    They are only telling you about this because they were using it to root machines and somehow got busted for it and found another way to do it which is less obvious. Naturally they want you to think you are safe, that's their job. ;)

  95. well, wait until next week by woolio · · Score: 1

    Next week there will be a followup article:

    "The Department of Homeland Security has taken into custody the programmer who injected the security flaw in the commonly used X11 Linux server. The programmer is suspected of having ties to new-age terrorist groups. Officials state that a plot was in progress to compromise vital government computers via this security flaw. Despite the target being an open-source program, the flaw subtle enough that nobody would spot it, despite being very serious. The suspect will be tried on charges of terrorism, vandalism, and a violation of the Millenium act... "

  96. Automated code used to check programs by Anonymous Coward · · Score: 0

    This caught my attention:

    "...using an automated code-scanning tool..."

    In fact, I just heard a talk last Friday about some of our University's faculty's efforts to make code-verifying programs. You give the program what the code is supposed to do, run the program on your code, and the program tells you whether or not the code does what it's supposed to do. The group hopes to run their program on a 1 million line, production ready program in the near future.

    If anyone's interested, a similar presentation is available at http://www.cs.utexas.edu/users/misra/HCSS.pdf.

  97. How about this one? by Anonymous Coward · · Score: 1, Informative
    1. Re:How about this one? by Anonymous Coward · · Score: 0
      Just days after the release of 3.9, there is a patch in -stable which fixes an X vulnerability. I don't know if this is the same issue as the one in that article.

      Also, from that article:
      So, basically, even though the X server appears to be running with ring 3 privileges, it can be considered to run with "kernel-like" privileges.
      The OpenBSD crew is aware of this problem. It is inherent in the way that X's concept of userland drivers works. OpenBSD has since (in release 3.9) made the kernel feature allowing this to be disabled by default -- meaning that X will not work without explicity enabling it.

      This is bad news for X users, but maybe in the future it is possible that the OpenBSD crew can rework the Xorg drivers so that they no longer pose this threat.
  98. Double bug half-fixed !!! by wtarreau · · Score: 2, Informative
    Obviously, it is still wrong :
    /* First the options that are only allowed for root */
    - if (getuid() == 0 || geteuid != 0)
    + if (getuid() == 0 || geteuid() != 0)
                        ^^
    This would grant the if statement to root and everybody else. This one
    should be applied next, otherwise the bug is still there :
    @@ -1677,7 +1677,7 @@
      }
      if (!strcmp(argv[i], "-configure"))
      {
    - if (getuid() != 0 || geteuid() == 0) {
    + if (getuid() != 0 && geteuid() == 0) {
    Willy
    1. Re:Double bug half-fixed !!! by Anonymous Coward · · Score: 0

      if (getuid() == 0 || geteuid() != 0)

      This is ok. The feature is enabled in two cases:

          - the program is run by root
          - the program is not run by root and is NOT suid root

      The second case is the same but inverted:

          ! (getuid() == 0 || geteuid() != 0)
      -->
          ( getuid() != 0 && geteuid() == 0 )

      which litteraly means "I am not the root user but the program is effectively running root"

      So the purpose of the test is to disable a feature that would allow a regular a
      normal user to become root.

    2. Re:Double bug half-fixed !!! by Chirs · · Score: 1

      In that case the "First the options that are only allowed for root" comment should be fixed, as it is misleading.

  99. Re:This is not a remote root vunerability by Matt+Perry · · Score: 1
    Please note that this exploit is for the local user only. If you are the only user on your Apple or Nix box, then this is a non-news item.
    That doesn't mean that you are safe. A vulnerability in another program could allow an attacker to gain access the system as an unprivileged user. Once on the system they could exploit the X vulnerability to gain root privileges.
    --
    Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
  100. Better question would be: by DaedalusHKX · · Score: 1

    The better question that nobody has asked is this one... would Microsoft submit to this, and release their codebase to public scrutiny? They attack Open Source / Free Software as if we're the devil, but we've put a lot of work and heart into making things clean and clear. True, Linux / Opensource misses a few points that BSD's have traditionally followed more closely (being free to all) but this also allowed a wealth of magnificent code to be completely ripped off by people who then denigrate all forms of non closed source code (Microsoft for one, despite the fact that the entire world bases their TCP/IP stack on that developed by Berkeley, and all of M$'s TCP/IP tools seem based on or completely ripped off from the BSD groups.)

    But what do I know :)

    --
    " What luck for rulers that men do not think" - Adolf Hitler
    1. Re:Better question would be: by Tsunayoshi · · Score: 1

      I'm glad that in 300+ comments (at the time of this posting) that someone brought up this point. DHS was able to find this small error becuase it had access to the source code. How many errors of this type exists in any given Windows component? We will never know because we will never have the access to find out.

      --
      "Get a bicycle. You will not regret it, if you live." - Mark Twain, "Taming the Bicycle"
  101. missing Parenthesis FOUND! by wardk · · Score: 1

    they were aparently wrapped around Weapons of Mass Desctruction in Iraq

  102. Huh? by TheLink · · Score: 1

    When did C have strong type checking?

    It's normal for you to misuse stuff without casting. If you're lucky gcc might grumble about it.

    --
  103. Difference by suv4x4 · · Score: 2, Interesting

    That's the difference between closed source and open source I guess...

    Critical vulnerability in X11, missing parens are to blame, report: "missing parens in code leaves X11 vulnerable, the problem is fixed."

    --vs--

    Critical vulnerability in Windows, missing parens are to blame (but that's under NDA), report: "the incompetent programmers of the Redmont monopolist did it again, your Windows is totally open to hackers due to a bad, bad vulnerability. While we're on this, let's discuss also how OSX and Linux are infinitely cooler than Windows will ever be, and how Windows users are clueless idiots."

    1. Re:Difference by Jesus_666 · · Score: 1

      No, the real difference is as follows:

      Open Source:
      Fri Mar 10 17:29:51 2006 UTC (7 weeks, 4 days ago) by deraadt:
      proper geteuid calls because suse hires people who mistype things


      Closed Source:
      User switching just got more convenient! With Microsoft X11's Privilege Escalation Technology (PET) you don't have to remember your administrator password anymore - if you need administrator privilieges they're right at your fingertips. X11 PET - a Microsoft innovation. (Patents pending)

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
  104. Re:I've always thought C was rather inconsistent h by mce · · Score: 1
    Note that forcing people to add an ampersand would not close this "hole" in the language anyway.

    Sure,

    if (something && geteuid) got_root();
    would not silently compile into something bad, but the following still would:
    some_func_ptr = &geteuid;
    if (something && some_func_ptr) got_root();
  105. Re:I don't understand the intention of the fixed c by hermanphp · · Score: 1

    so if I understand correctly, if I can set the suid-bit to another non-priviliged user I'll be able to pass this check?

  106. Too smart to debug. by fuyu-no-neko · · Score: 0

    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."

    Shouldn't that quote be that if you write the code cleverly in the first place, you're too smart to debug it?

    --
    Don't take the above poster too seriously. He doesn't.
    1. Re:Too smart to debug. by Viol8 · · Score: 1

      Err , no. Try reading the quote again. You might understand it at
      some point.

  107. Re:I've always thought C was rather inconsistent h by Per+Abrahamsen · · Score: 1

    That is another and more general problem, namely implicit pointer to int cast.

    The many implicit convertions have never been my favorite part of the language, and I try not to rely on them in the code I write.

  108. The lesson by Julian+Morrison · · Score: 1

    ...of this is: use a real programming language, in which comparing a function's name to an int is a syntactic error rather than a pointer operation.

  109. What is the point of that piece of code? by master_p · · Score: 1

    The if block will be executed anyway, since the result of getuid() is either zero or non-zero.

    A good programming language would catch that error: comparing a function address with 0 makes no sense, because the function address can never be 0. Referring to 'getuid' as a function pointer should be a mistake. The function pointer of 'getuid' should be '&getuid' (i.e. getting a reference to the function).

    The above shows how broken C is (and C++ by that extend), and that the software problems the IT industry has are mostly due to inferior programming languages.

    1. Re:What is the point of that piece of code? by Myria · · Score: 1

      On an embedded system, there is no particular reason that an object could not legitimately be at address 0. It is mostly by convention that nothing is placed at that address.

      In DOS, the data at address 0 is either a pointer to the function called when there is an integer division by 0 or a pointer to machine instructions that mean "exit program".

      Melissa

      --
      "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
    2. Re:What is the point of that piece of code? by master_p · · Score: 1

      Nope...NULL is a reserved address meaning 'illegal'. Practically not even embedded systems put user functions at address 0.

      In DOS, address 0 holds the interrupt descriptor table.

  110. Wrong fix by LoonyMike · · Score: 0
    I think the fix is completely wrong.
    If there were no parenthesis, there would be no hole. With the new
    ()
    there is now a hole where there was none.
  111. but there is an other xorg bug, so start compiling by phsdv · · Score: 1
    better start your compiler, another xorg bug has been found in xorg-x11 6.8.2. See the following Gentoo security advisory:
    Linux Security Advisory

    Title: X.Org: Buffer overflow in XRender extension (GLSA 200605-02)
    Severity: high
    Exploitable: local
    Date: May 02, 2006
    Bug(s): #130979
    ID: 200605-02

    Synopsis

    A buffer overflow in the XRender extension potentially allows any X.Org user to execute arbitrary code with elevated privileges.

    Background

    X.Org is X.Org Foundation's public implementation of the X Window System.

    Affected Packages

    Package: x11-base/xorg-x11
    Vulnerable: < 6.8.2-r7
    Unaffected: >= 6.8.2-r7
    Architectures: All supported architectures

    Description

    X.Org miscalculates the size of a buffer in the XRender extension.

    Impact

    An X.Org user could exploit this issue to make the X server execute arbitrary code with elevated privileges.

    Workaround

    There is no known workaround at this time.

    Resolution

    All X.Org users should upgrade to the latest version:
    Code:
    # emerge --sync
    # emerge --ask --oneshot --verbose ">=x11-base/xorg-x11-6.8.2-r7"

    References

    CV E-2006-1526
  112. dist-update not required by Firefalcon · · Score: 1

    You shouldn't need to do a dist-update, upgrade should be fine - debian maintainers will almost ceratainly backport this if required.

  113. Re:I don't understand the intention of the fixed c by Anonymous Coward · · Score: 0

    Yeah, and do what?
    If you can make a program setuid someone else, you have sufficient privledges to execute anything you want with their rights. It still won't get you root, because the process won't be running as root.

  114. Good job its open source by tuxisthefuture · · Score: 1

    Its a good job X11 is open source software, otherwise this bug may have gone un-noticed.

  115. Caution: Sometimes 0 != NULL by ndim · · Score: 1

    Never rely on 0 being a reasonable value for pointers. Use NULL.

    I've seen too many programs segfault on AMD64 just because some lazy programmer wrote "0" as a pointer value to save typing the three more characters required to type "NULL". "0" is a 32 bit integer which turns out to be NOT equal to "NULL", a 64 bit pointer.

    1. Re:Caution: Sometimes 0 != NULL by sholden · · Score: 2, Informative

      Then the compiler is not compliant with the standard. Since it defined the constant 0 (and only the constant 0 not for example 1-1) in a pointer context as being converted to the NULL pointer at compile time. The only times 0 isn't correct is as an argument to a function with no prototype (which no one does anymore, right :) and as an argument to a varargs function call - since in both those cases there is no pointer context to trigger the conversion.

      You need a better compiler.

  116. Re:I've always thought C was rather inconsistent h by jeremyp · · Score: 1

    Functions are constant pointers in C. After all, what is a function but an address that the program jumps to. In this respect they are similar to arrays.

    e.g.

    int a [20];
    int f() {}

    a is a pointer. f is a pointer.

    --
    All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  117. Re:This is not a remote root vunerability by Anonymous Coward · · Score: 0

    If anyone has access to your box and wants root you are in trouble anyway, unless you have some sort of encrypted root-filesystem...

  118. Re:Wow. Homeland Security.... by marquis-cablewitch · · Score: 1

    I thought the size of all octets was 8 bits, and the size of a byte was between a number higher than about 6 and hopefully lower than 40. Historically speaking.

  119. Re:Wow. Homeland Security.... by megabeck42 · · Score: 1

    It's always been 8 bits, except during the energy crisis when pushing electrons around got a lil more expensive, they used 7 bits for a while. Measure the size of a 2x4 some time.

    --
    fnord.
  120. Re:I don't understand the intention of the fixed c by aug24 · · Score: 1

    Lets try that again...

    I may be being slightly thick here, but isn't it checking that

    EITHER

    uid == 0 (the process was started by root)

    OR

    euid != 0 (the effective user id is not root)

    Now, the euid!=0 check is presumably to check the program is not suid root, but, because it's an 'or', the check would also be passed if the program was not started by root and *not* suid root? Checking the euid!=0 doesn't tell me much - because it can be almost anything - unless we also check the uid and suid to give context.

    If you understand the situation better and can see why the code is correct, then I'd genuinely appreciate an explanation of the above.

    Cheers,
    Justin.

    --
    You're only jealous cos the little penguins are talking to me.
  121. didnt they have the worst gov security rating? by Soothh · · Score: 1

    didnt they have the worst gov security rating? yet they have time to dig into
    outside projects.. on security no less?

    missappropriation of time maybe?

    --
    We have seen that living things are too improbable and too beautifully "designed" to have come into existence by chance.
  122. Sig could be a 'Stand Alone Complex' by MCRocker · · Score: 1


    Since the /. crowd is highly networked and geeky, there's a distinct chance that this could actually be a Stand Alone Complex in the real world. That is, no original liar exists... just a pent-up emotional need sensed by the network of geeks that independently expressed itself by reverse hacking the cadre of un-sig'd geeks resulting in a viral meme that...

    Um. OK. I've been watching too much adult swim. I'll admit it.

    --
    Signatures are a waste of bandwi (buffering...)
  123. Abstraction... by Kjella · · Score: 1
    Honestly, I've always felt that if you're constantly doing compares to the same static value, those should be wrapped in their own function. Like:
    inline bool uidisroot()
    {
        return getuid() == 0;
    }
    That way you can screw up exactly once instead of lots of places in the code. I can't really say I understand the code either - if you are root, or your effective uid is not null. Does that mean having any other uid than your own? What's your euid if you sudo?
    --
    Live today, because you never know what tomorrow brings
    1. Re:Abstraction... by cathector · · Score: 1

      that's the better way to do it, allright.

  124. Really. Most of us geeks... by Anonymous Coward · · Score: 0

    ...have known for years that the whole entirety of X11 is one huge gigantic gaping security hole anyways. That's why none of us with an IQ greater than our shoe size never run it on any hosts directly exposed to the public Internet.

  125. seriously? by YesIAmAScript · · Score: 2, Insightful

    In concept, there is a separate protocol and implementation of X. But the source has been available under a very permissive license since the very beginning. Because of this, the only thing I've ever seen that was reimplemented was the server (window server), everything else has just been compiled directly from the reference sources.

    And even those window servers are compiled from sources derived from the reference sources, with patches.

    Do you actually know of any implementations of X other than the two you mentioned? I tried to search for some and couldn't find any.

    --
    http://lkml.org/lkml/2005/8/20/95
    1. Re:seriously? by penguin-collective · · Score: 1

      Do you actually know of any implementations of X other than the two you mentioned? I tried to search for some and couldn't find any.

      The X11 protocol has been reimplemented numerous times independently, including different client libraries (e.g., pure Java, Lisp, Perl, and Python implementations) and various proxies. Some toolkits don't use Xlib but reimplement the protocol themselves, and I believe the people at X.org are working on their own replacement for Xlib. Furthermore, all the different versions (whether derived from one another or not, and even if they are a decade old) talk to each other.

  126. Compiling === by The+Cornishman · · Score: 1
    what language was this?

    "===" won't compile in any language I know.

    Source: Icon Programming Language Handbook
    Beta edition.
    Copyright © 1996. Thomas W. Christopher

    Quote:

    The object equal operators (=== and ~===) test two objects to see if they are identical. Structured objects, lists, tables, records and such, may have identical contents, but they are only equal if they are the same object.
    Icon *can* be compiled, but especially these days there's hardly any need to do so.
  127. ...and now a word... by Anonymous Coward · · Score: 0

    ...and now a word from the sponsors who made this all possible,.... and necessary. Personal service and group plans are available. Coming soon to your neighborhood?

  128. WHY is the X run as root - because by Anonymous Coward · · Score: 0

    The PC hardware doesn't support proper framebuffer + display command lists...

    You end up not being able to write a real driver.

    X therefore needs direct access to the hardware registers.

    On any reasonable I/O architecture you can have driver provide that level of access without direct hardware interface.

  129. how parenthetical by Anonymous Coward · · Score: 0

    Sorry, I couldn't resist.

  130. Re:I don't understand the intention of the fixed c by Marlow+the+Irelander · · Score: 1

    The thing is, if it's not root and not setuid root, _it can't do anything dangerous_. This code is something that should only be allowed if the user is running as root (not just setuid root, as, AFAIK, X is by default to let it access hardware) , and that's how it originally was. Recently, though, someone added the code to say that if it wasn't setuid root - in other words, if it can't do something harmful, if it's running with normal user privileges - it doesn't matter, let it try and execute the code anyway.

    I don't know why you would run X with normal user privileges. I can't think of any such situations, but I'm not an X guru; perhaps it's related to the modularization of X.

  131. Re:This is not a remote root vunerability by pentalive · · Score: 1

    If one of those entities wants to gain root access to your machine after it is confiscated, they would probably just boot it single user and change the root password.

  132. Yes, and in 300+ comments, I wonder if anyone's: by DaedalusHKX · · Score: 1

    Yes, and in 300+ comments, I wonder if anyone's mentioned that a good "hacker" "cracker" whatever you want to call him (security penetrator?) with a good hex editor, handmade if necessary could EASILLY break a system... at least with OpenSource the bugs CAN be found... and oftentimes people stumble upon them when they run a search for kicks (I should know, I found a bug in RedHat 5.2... back when I was in college, using redhat 5.2 and the only reason I found it was because I decided to test the actual software used so I could get some practice using debugger and code/event tracers.) It was awesome watching the drivers take hits in memory as I moved the mouse about, etc. Its a truly liberating experience, probably the same as when someone finally understands our universe... its just a step into a bigger world.

    --
    " What luck for rulers that men do not think" - Adolf Hitler
  133. "Perpetual games" by jd · · Score: 1

    Ok, the more "correct" version is "win or draw under any conditions". However, if the game can continue forever, then that would be a valid "draw" condition, as neither side has lost. In chess, they have a three-repeat rule to avoid continuous cycles of this kind by just classing it as a stalemate.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  134. Re:I don't understand the intention of the fixed c by aug24 · · Score: 1

    Smashing explanation - thanks.

    Justin.

    --
    You're only jealous cos the little penguins are talking to me.
  135. Re:Here is the actual flaw: by knfloyd · · Score: 1

    It's great - a huge security flaw and it's treated as "whoops!" A typo, no less, treated as an oversight and no big deal.

    Imagine what all you hippies would do if MS said something like this?

    KF