Slashdot Mirror


Don Box: Huge Security Holes in Solaris, JVM

DaHat writes "Don Box, one of the authors of the original SOAP specification in 1998, now an architect on Microsoft's next generation Indigo platform recently responded to James Gosling's remarks regarding huge security holes within the .NET Common Language Runtime (CLR). Don argues that the same 'flaws' that Gosling noted in the .NET CLR exist both within the Solaris operating system as well as the JVM, both of which support execution of C and C++ code, as well as explaining why this is not necessarily a bad thing."

226 comments

  1. On Defense by fembots · · Score: 2, Funny

    First instance of Microsoft mehing FUD?

    Next up, Notepad will be the target since it allows any malicious code to be written on it.

    1. Re:On Defense by goofyspouse · · Score: 1

      Help an old man out...WTF were you trying to say?

      The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search box to the right.

      Suggestions for mehing:

      1. meting
      2. meshing
      3. meeting
      4. mating
      5. mahonia
      6. matting
      7. Meeting
      8. mewing

    2. Re:On Defense by RizwanK · · Score: 1

      I think the title of this particular SD post could have been worded a bit better -- I just got an email from a friend saying "Oh my God, they've just found a massive security hold in blah - check it out!"

    3. Re:On Defense by Afrosheen · · Score: 1

      I think he means they said 'feh' or 'meh', which means 'fuck it, it doesn't matter'. Therefore, meh-ing something means to pay it little or no attention, to shrug it off.

      I believe this is a new word, as if English doesn't have enough words already.

  2. JNI is an API, not a platform... by patniemeyer · · Score: 4, Informative

    Solaris - yes, it's unsafe. That's why my Solaris machine gets attacked if I don't have a firewall in front of it for ten seconds.

    JVM - no, that's safe. JNI is an API, not a platform. For that matter you can say that any language which uses sockets for network programming or can write a file is unsafe. Not to mention that normal programmers never use JNI... It's a very low level integration API.

    Don's comments did not really add anything that wasn't covered in the Slashdot discussion.

    Pat Niemeyer
    Author of Learning Java, O'Reilly & Associates

    1. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 1, Insightful

      Solaris - yes, it's unsafe. That's why my Solaris machine gets attacked if I don't have a firewall in front of it for ten seconds.

      Really? Who the hell writes worms for such an obscure platform?

    2. Re:JNI is an API, not a platform... by Rinikusu · · Score: 3, Informative

      Isn't JNI basically what you use when you want to write a "java native" driver for your custom hardware (I'm thinking x10 and what not)? (But then you'd have to port the JNI to every platform you wanted to support, right?)

      --
      If you were me, you'd be good lookin'. - six string samurai
    3. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0
      The same guys who keep writing worms for IIS.

      Remember, IIS has a much smaller installed base than Apache, yet IIS still has orders of magnitude more security holes than Apache.

    4. Re:JNI is an API, not a platform... by essiescreet · · Score: 3, Informative

      Yes, this is corrrect. The jni allows you to declare "native" methods for Java. This allows you to do stuff like connect to shared memory, process UNIX signals, and do other low-level operations that are platform specific.

      So, you do have to port it, but it's there if you really, really need to do something in C that you can't do in Java.

      As for normal programmers not using it, that's not true. I use the JNI for integrating java with a large software package that's written in C, and runs on AIX or Linux. I'm a regular programmer. It's really not that difficult, just a little different.

      In my case, it's allowed me to write Java add on's to a system that's written in C. This makes the delopment faster, the GUI's prettier, and the interface is the only C code to manage.

    5. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      What do you mean "obscure platform"? Sun customers both feel they deserve to have the bugs fixed!

    6. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 3, Interesting

      For that matter you can say that any language which uses sockets for network programming or can write a file is unsafe.

      Actually, yes that is a true statement which is why the .NET CLR allows you to tweak that out and explicitly deny those rights. (By default these rights are denied for applications running on a remote store.) And, as Don Box said, the unsafe keyword is not meant for daily consumption. To paraphrase, "normal programmers never use the unsafe keyword. It's a very low level integration API."

    7. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      There are more applications than just hardware drivers. Sun's own Java3D uses JNI, as do various other applications that utilize opengl libraries. In fact, I see lots more JNI stuff that is simply a wrapper around a C/C++ library that I do anything else. Then there's stuff like MATLAB that doesn't want the vital proprietary parts of the code available as .class files, so they use JNI to interface with their Java gui stuff. It has tons of good uses.

    8. Re:JNI is an API, not a platform... by patniemeyer · · Score: 4, Informative

      First, technically there's no reason you couldn't build an API allowing pure Java hardware drivers. Sun did it for JavaOS (which apparently went nowhere, but for other reasons). I wish someone would take this idea and port it to Linux, giving us pure Java device drivers.

      But in answer to your question - yes, you can use JNI to talk to unsupported hardware by invoking native routines and, internally, the Java libraries use it to invoke native code on the platform for basic services like talking to the filesystem, sockets, or anything that's not written in pure Java.

      Many people might be surprised though to know just how much of Java is written *in Java*... The vast majority of the APIs are pure Java code. Only the lowest level stuff is delegated to platform specific code. For example, Java does DNS and most crypto in pure Java.

      And finally, most X10 hardware uses a serial API... I have one controlled by Java... also a network of Dallas Seminconductor sensor devices controlled by Java.

      Pat Niemeyer
      Author of Learning Java, O'Reilly & Associates

    9. Re:JNI is an API, not a platform... by Scorillo47 · · Score: 2, Interesting

      And a similar blog entry here:

      http://blogs.msdn.com/adioltean/archive/2005/02/ 07 /368226.aspx

      I am reading now an article in which James Gosling claims that .NET has a huge security hole. The problem seems to be that .NET allows execution of both safe and unsafe managed code in the same process:

      [...], Gosling is concerned about "unsafe" code, which is produced by traditional languages like C and C++. Unsafe code is old code that does not strictly follow the rules of type safety that .NET defines, and this sort of code requires additional permissions to execute. According to Sterling, "you as a developer take it upon yourself" to utilise unsafe code in your .NET applications.

      But what James Gosling fails to mention is that the Java runtime also allows the same type of unsafe code execution in every process running safe Java code. No, I'm not smoking crack. The technology is well established in the Java world and it is called JNI. Here is a quote:

      The JNI allows Java code that runs within a Java Virtual Machine (VM) to operate with applications and libraries written in other languages, such as C, C++, and assembly. In addition, the Invocation API allows you to embed the Java Virtual Machine into your native applications.

      Programmers use the JNI to write native methods to handle those situations when an application cannot be written entirely in the Java programming language. For example, you may need to use native methods and the JNI in the following situations:

      The standard Java class library may not support the platform-dependent features needed by your application.
      You may already have a library or application written in another programming language and you wish to make it accessible to Java applications.
      You may want to implement a small portion of time-critical code in a lower-level programming language, such as assembly, and then have your Java application call these functions.
      Think of it a second - in fact, how does a small Java program interoperate with the underlying operating system? How does a "Hello world" Java program succeed to write anything to the console? After all, the Win32 API is not directly callable from Java, correct?

      Therefore, by its own measure, Gosling only suceeded to demonstrate that Java also contains a huge security hole... :-)

      P.S. And, please, don't tell me that JNI is not a security hole because writing JNI code is eventually harder and not done as often than using "unsafe" in C#... Face it - in Java, whenever you are writing to a file, communicating through a network interface or just handling GUI controls, there is always some unmanaged C++ code being executed in your process...

      --
      Don't try to use the force. Do or do not, there is no try.
    10. Re:JNI is an API, not a platform... by patniemeyer · · Score: 1

      the unsafe keyword is not meant for daily consumption.

      Wait... I don't know the answer to this, but - won't all C/C++ code running on .NET be tagged as unsafe? Or is the programmer expected to tag every pointer cast or dereference explicitly?

      Normal programmers do use C/C++ daily... and it is unsafe. I think the point vs. JNI is valid.

      Pat Niemeyer

    11. Re:JNI is an API, not a platform... by squiggleslash · · Score: 4, Interesting
      IIS has orders of magnitude more worms and viruses than Apache, not security holes. (If you know different, please report all these security holes to the respective developers.)

      In any case, that's not why IIS is a target. IIS is a target for a number of reasons:

      1. The default web server (once you installed the Option pack) on NT4 was a version of IIS that had a couple of security holes.

      2. IIS is almost certainly more popular than Apache on Windows-type servers. Yes, Apache runs on it too, but there's a mentality that goes with Microsoft products. With Windows being the most "popular" (well, most installed) operating system in existance, you'd expect it to be the home for most virus writers, and virus writers aren't going to want to write for platforms they consider obscure.

      3. IIS always runs on Windows which almost always has the same CPU architecture (ie ix86) and APIs. Apache can run on a variety of platforms. Exploiting, for example, buffer overflows, is relatively difficult if you don't know the architecture, or even something as simple as how you can make system calls.

      4. People hate Microsoft. Most people's views of Apache and similar systems are neutral at worst. I've never met or talked to anyone who hates Apache.

      5. One serious hole is enough. Both Apache and IIS have suffered these in the past and probably will do in future (well, until Gosling rewrites Apache in Java ;-)

      IIS is usually used as the proof to counter the argument that marketshare matters when viruses are written. I think this is always a bogus argument: IIS's marketshare is enough (it's not like writing a virus for GNU/Linux), and IIS is tied to an operating system that is the most installed in the world. It's fair to say it's the exception that, quite literally, proves the rule.

      --
      You are not alone. This is not normal. None of this is normal.
    12. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      You don't tag the C/C++ code, you tag the C# class that is using the C/C++ code.

      Now, there is Managed C++ and if you are using that to create dotNet classes, you only need to mark it unsafe when you are doing something that is, well, unsafe. :) You can either tag an individual method, or you can tag the class, or you can tag the entire assembly as unsafe. The caller can determine if it wants to execute your assembly. This permission bubbles all the way up to the machine configuration. So if you explictly denied all apps the right to run unsafe code, your assembly will not be allowed to run. Sounds secure to me.

      It's clear that you understand JNI, but equally clear that you're missing the facts when it comes to the .Net security model. Since Box knows 'em both, I'll defer to him.

    13. Re:JNI is an API, not a platform... by YU+Nicks+NE+Way · · Score: 2, Informative

      Managed C++ is type and bounds safe. Unsafe C# and/or C++ allow type inference, but not bounds checking, and therefore allow a major class of exploits that aren't possible within the standard portions of the dialects. A call into C/C++ from within CLR requires PInvoke, just as a call into C/C++ from Java requires JNI.

      Normal programmers writing in C#/Managed C++ use C/C++ less frequently than "normal" Java programmers do, actually, because they have access to the intermediate "unsafe" calls, through which most perf sensitive enumerations can be run without moving "down to the metal".

      Basically, Gosling said it, and you fell for it. In /.-speak, they say "YHBT, YHL, HAND."

    14. Re:JNI is an API, not a platform... by patniemeyer · · Score: 3, Insightful

      Face it - in Java, whenever you are writing to a file, communicating through a network interface or just handling GUI controls, there is always some unmanaged C++ code being executed in your process...

      Of course... and Java executes RISC instructions that could reveal flaws in the processor design too... but those levels were not written in the course of daily programming. The native drivers in Java are very small (e.g. all of Swing is built on a few AWT calls for opening windows and doing primitive drawing). And those routines presumably get a lot of scrutiny for all kinds of reasons - security being one and performance being another. I have never heard of a common security problem like a buffer overflow in the native libs shipped with Java... It's going to happen someday of course and that's why people created Java and managed code. To minimize the exposure of those regions.

      The futher up the food chain your code goes the more protected it is and the harder it becomes to exploit low level security holes. It's analogous to the way in which you (used to?) gain confidence in the GNU C compiler by having it compile itself and then using the 2nd gen to compile a third... At each step the possibility of simple problems become much more abstract and harder to exploit.

      Pat Niemeyer
      Author of Learning Java, O'Reilly & Associates

    15. Re:JNI is an API, not a platform... by jeif1k · · Score: 4, Insightful

      JVM - no, that's safe. JNI is an API, not a platform.

      You can look at C# as two languages: an "unsafe" and a "safe" language. The safe language is the equivalent of Java. The "unsafe" language is the equivalent of C or C++ linked in through JNI. Linking "unsafe" to "safe" code in C# has the same restrictions on it as does linking native code to pure Java code in Java. So, Gosling's rantings have no technical merit.

      However, the C# solution is better than the Java solution: unsafe code in C# still contains substantially more error checking than equivalent C code linked through JNI, you generally need much less unsafe code in C# than in Java to accomplish the same task, and C# unsafe code doesn't need to be recompiled for different platforms and can just be distributed like other C# code.

      Don's comments did not really add anything that wasn't covered in the Slashdot discussion.

      What do you want? He is responding to an enormously stupid, self-serving comment from Gosling. You have to be clear and keep things simple in order to reach the kind of people who would swallow Gosling's nonsense in the first place.

    16. Re:JNI is an API, not a platform... by Screaming+Lunatic · · Score: 1, Interesting
      Not to mention that normal programmers never use JNI... It's a very low level integration API.

      And that's why a whole class of software is not written in Java. Get out of your web services, connect to database world.

      At my previous position, we had a volume renderer that was written in C++, an SDK on top of the volume renderer that was written in managed C++, and applications were written in C#, VB.NET and Python.NET.

      The right tool for the right job.

      Using JNI would have been a pain in the eff-ing ass. Java is not low-level enough to be a high-performance systems programming language, and not high-level enough to be a scripting langauge. Hence, a good choice for web services but not the best choice for anything else.

    17. Re:JNI is an API, not a platform... by MoebiusStreet · · Score: 2, Informative
      The vast majority of the APIs are pure Java code.

      RTFA:

      In looking at the Indigo code base (which was 1123 C# files as of early last week), only 19 of them use the unsafe keyword.

      Why in the world would one consider the *possibility* of unsafe code in the CLR a security hole? Sure, you can call the use of unsafe a hole. But if (like virtually all .Net developers I know) you never use that, then there's no issue at all.

      Is Gosling complaining that the CLR is so flexible that someone with extraordinary needs *can* use unsafe when necessary?

    18. Re:JNI is an API, not a platform... by myowntrueself · · Score: 1, Troll

      "giving us pure Java device drivers."

      I'm sorry, but that just sounds like a joke...

      I'm not sure though, are you being serious?

      --
      In the free world the media isn't government run; the government is media run.
    19. Re:JNI is an API, not a platform... by jeif1k · · Score: 1

      First, technically there's no reason you couldn't build an API allowing pure Java hardware drivers.

      You are confusing "purity", "safety", and "security"; if you did what you suggest, you would indeed be writing drivers in "pure Java", but if those APIs were accessible, they would undermine safety.

    20. Re:JNI is an API, not a platform... by Marthisdil · · Score: 0

      but those levels were not written in the course of daily programming.

      And neither are the exploits people write to take advantage of "flaws"

    21. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      He is responding to an enormously stupid, self-serving comment from Gosling.

      Or rather, Gosling was pointing out an inherent advantage of Java that was one of the primary design goals of Java, but which .NET does not concern itself with. Then Don Box said he doesn't think it's an advantage. Then you agreed that you don't think it's an advantage.

      But that doesn't make the advantage go away. It just means that neither you, nor Don Box, are interested in it.

    22. Re:JNI is an API, not a platform... by jeif1k · · Score: 0, Flamebait

      It's going to happen someday of course and that's why people created Java and managed code. To minimize the exposure of those regions.

      You seem to be blissfully unaware of about half a century of computing history: safe, managed code used to be common in high-level language. The people who created Java no more created it than they created integer addition. The Java language is about where programming languages were in the late 1960's/early 1970's.

      The real question to ask is how in the world unsafe languages like C and C++ ever managed to succeed, and why something as poorly designed as Java ended up catching on when there have been far better languages with the same kind of safety guarantees around for decades.

      But, perhaps, the answer is simply that people like you write the books that people get their information from. The blind leading the blind, it seems.

    23. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      I dunno, I hate Apache. I've programmed/set up/managed both IIS and Apache over the past 8 years, and Apache is primative in comparison.

      Error checking the conf file? No way, just dump core!

      Log files getting too big? Don't worry, we'll just stop processing your webserver requests!

      Oh the joy, you people must truly be masochists.

    24. Re:JNI is an API, not a platform... by owlstead · · Score: 1

      Actually, when using BSH, it's pretty fun to use it (Java) as a scripting language, and it certainly beats the hell out of JavaScript (or python, but that's just my less te opinion). The JNI interface is pretty simple, but you would have to put it in place of the managed C++ SDK.

      Now if they would only intergrate BSH into Eclipse so you can have completion etc. etc. as well.

    25. Re:JNI is an API, not a platform... by gammelby · · Score: 1

      Java hardware drivers? The JEPES project got pretty close.

      Ulrik

    26. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Actually windows boxes run about 20% of the servers out there. Where as apache runs on 70%.

      Source: http://news.netcraft.com/archives/web_server_surve y.html

      But hey whats the truth when you are spouting compnay FUD.

    27. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Sorry, but I must have missed the part where I said anything that contradicted that.

    28. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      It's also what you use when you want to talk to your window system.. or perform I/O.. or in fact do anything to do with interacting with anything outside of the JVM.

      (Sure, you might use the JNI libraries /bundled/ with your JVM, but it's still JNI...)

    29. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 1, Interesting

      Who says that JNI code is run in the same address space as the JVM? That's an assumption you are making because you miss the point entirely that JNI is an API. The C code could be running in a separate process using IPC to transfer the data (you don't access Java memory directly when using JNI) for all you know.

      For that matter, the JVM could be integrated into the kernel where all Java (and thus safe) code is run in a single address space and the C code could be run in a restricted address space using the MMU to enforce the code, thereby getting better performance by not needing bounds check or whatever. The point is that C# is insecure because of taking Java's design and hacking it up without understanding why it was designed that way. Incidentally, that applies to their hacked up Java standard library as well as at the VM level.

    30. Re:JNI is an API, not a platform... by aminorex · · Score: 1

      No joke. Bottom-end interrupt handlers run with GC locked. You want security, go pure Java.

      --
      -I like my women like I like my tea: green-
    31. Re:JNI is an API, not a platform... by Dun+Malg · · Score: 1
      ...half a century of computing history: safe, managed code used to be common in high-level language. ... The real question to ask is how in the world unsafe languages like C and C++ ever managed to succeed

      Just curious...which high level languages were these, and is the greater safety not in large part due to the relative simplicity of older systems? I mean, how hard is it to wring all the bugs out of an application or OS written for a machine with 16K of RAM, and did they really bother to weed out all possible "exploits" when weren't 10,000 russian teenagers writing viruses to "zombie box" that machine?

      --
      If a job's not worth doing, it's not worth doing right.
    32. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 1, Insightful

      Or rather, Gosling was pointing out an inherent advantage of Java that was one of the primary design goals of Java, but which .NET does not concern itself with. Then Don Box said he doesn't think it's an advantage. Then you agreed that you don't think it's an advantage.

      You got it wrong. Box fully agrees that the design goal is quite important. He just points out that Java achieves it no more than C#.

      But that doesn't make the advantage go away. It just means that neither you, nor Don Box, are interested in it.

      There is no "advantage" to go away; if there is any difference at all, it is that JNI code is both more likely to contain serious errors and that it is far less efficient invoking it.

    33. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Who says that JNI code is run in the same address space as the JVM? That's an assumption you are making because you miss the point entirely that JNI is an API.

      Either way, it's unsafe.

      And, in any case, what makes you think that "unsafe C# code" is running in the same address space? You are missing the point entirely that it is a language construct.

      The C code could be running in a separate process using IPC to transfer the data (you don't access Java memory directly when using JNI) for all you know.

      Well, it already is slow enough that it might as well be.

      The point is that C# is insecure because of taking Java's design and hacking it up without understanding why it was designed that way. Incidentally, that applies to their hacked up Java standard library as well as at the VM level.

      C# and Java are exactly the same when it comes to unsafe components: they both have safe modules, and they both have unsafe modules, with the same restrictions on them. C#'s unsafe modules are simply easier to write and contain more error checking, which makes it easier to write correct unsafe code in C#.

      As for your claims that the C# designers didn't "understand" Java, that's just laughable. Java's design choices were well understood long before Java even saw the light of day. If there is any question about competency, it's about the Java language designers, who made some extremely embarrassing blunders.

    34. Re:JNI is an API, not a platform... by jeif1k · · Score: 3, Insightful

      which high level languages were these, and is the greater safety not in large part due to the relative simplicity of older systems

      Many of the classics, among them Lisp, Algol, APL, Simula, and Smalltalk. Modula-3 even had C#-like safe/unsafe sublanguages (as did a few other languages). And while they didn't have GC, languages like Pascal and Modula were safe languages in most other respects.

      and is the greater safety not in large part due to the relative simplicity of older systems? I mean, how hard is it to wring all the bugs out of an application or OS written for a machine with 16K of RAM

      The world did not begin with 16k Apple II's or the teenage dabblings of some industry luminaries in software. People had large computers running multiuser operating systems and safe, high-level languages in the 1960's.

      and did they really bother to weed out all possible "exploits" when weren't 10,000 russian teenagers writing viruses to "zombie box" that machine?

      We are talking about runtime safety here. You are confusing runtime safety and security; runtime safety helps with security, but it is neither necessary nor sufficient to guarantee it.

    35. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      I will believe that Microsoft is finally serious about security, and that IIS and Exchange have finally been secured when Microsoft starts running it themselves for their public services without hiding the servers behind firewalls. I would even believe they were trying if they hid their public servers behind their own firewalls running a Windows OS. So perhaps we should compare, naked public servers running Apache & non Microsoft and naked public servers running IIS?

    36. Re:JNI is an API, not a platform... by adiposity · · Score: 1

      The default IIS on Windows 2000 Advanced Server has the code red flaw and is exploited within 5 minutes of port 80 being allowed into the box. I have done this personally, only because I did not realize the previous sys admin had already forwarded port 80 to the ip address I chose. When I installed Win2k Adv Server, it immediately got hit and slowed down the entire network. Eventually I turned off IIS and patched Win2k, but it was a serious problem.

      So, the problems continue with IIS, and are not simply because there was a buggy version with NT4. Although, I do agree that it's a target because it's in the default install, just like OpenSSH is a huge target because it's running on so many Linux boxes.

      -Dan

    37. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      "Error checking the conf file? No way, just dump core!"

      How about configtest? Error checking the conf file just fine.

      "Log files getting too big? Don't worry, we'll just stop processing your webserver requests!"

      How about logrotate?

      Easier complaining rather than learning how to use the tool. Ya, I know, I've been trolled.

    38. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0


      The default IIS on Windows 2000 Advanced Server has the code red flaw and is exploited within 5 minutes of port 80 being allowed into the box. I have done this personally, only because I did not realize the previous sys admin had already forwarded port 80 to the ip address I chose. When I installed Win2k Adv Server, it immediately got hit and slowed down the entire network. Eventually I turned off IIS and patched Win2k, but it was a serious problem.

      Why didn't you turn IIS off (or patch it if it was needed) before connecting it to the Internet? Sounds like the problem is poor administration skills.

      So, the problems continue with IIS, and are not simply because there was a buggy version with NT4.

      No, the problems do not continue with IIS. To my knowledge there hasn't been a problem with IIS 6.0. Which is Microsoft's current version (and has been for over a year and a half). Time to get a new argument people (or demonstrate a problem with IIS 6.0). This one is no longer applicable. Give it up.

    39. Re:JNI is an API, not a platform... by hugg · · Score: 2, Interesting

      I understand your point, but I believe that there is potential for many more exploits in Java than you let on. For instance, here's the .so file for the AWT shared libraries on my 1.4.2 JDK:

      3059052 Jun 4 2004 /usr/local/java/jre/lib/i386/libawt.so

      That's 3MB (w/o debug info) of potentially exploitable wrapper code, lots of which depends on complex and (and potentially exploitable) Win32/X/Motif/whatever code. The rest of the shared libs total to about 6MB. Java's native layer is not thin like say, Smalltalk -- part of the reason for this is performance, part is feature set.

      Also, a quick search for "buffer overflow" on the Java bug database brings up 1860 results. I'm sure one or two of those involve native code and were/are potentially exploitable, just no one got around to it.

      Yes, I'm sure much of the Java codebase is heavily audited, and the common things like socket/file I/O are pretty secure. But I wouldn't say "all is well" if I had to bet my business on that being true.

    40. Re:JNI is an API, not a platform... by Lehk228 · · Score: 1

      RTFP He didn't know that port 80 was forewarded to the machine

      --
      Snowden and Manning are heroes.
    41. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0


      Sorry, but I must have missed the part where I said anything that contradicted that.

      That's because he's completely clueless and doesn't understand what you meant with this point:

      "3. IIS always runs on Windows which almost always has the same CPU architecture (ie ix86) and APIs. Apache can run on a variety of platforms. Exploiting, for example, buffer overflows, is relatively difficult if you don't know the architecture, or even something as simple as how you can make system calls."

      Apparently he, like so many others, can't differentiate between the general term "Apache" and a specific instance of Apache. Therefore he makes the specious conclusion that because 2/3 of web servers run "Apache" (the general term) that therefore those 2/3's are all the same version (instance) of Apache.

      The 2/3 argument fails when examined closely. Yet the anti-Windows apologist will dredge it up each and every time thinking that they're actually making a point when instead they're making idiots of themselves.

    42. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0


      RTFP He didn't know that port 80 was forewarded to the machine

      I did RTFP. And it sounds like he didn't need IIS. So why was it running *regardless of if the port was forwarded or not*. Code Red is a known problem with unpatched IIS 5.0 systems (i.e. the version that installs by default on W2K systems). Therefore I would expect a good administrator (i.e. not him) to disable IIS until the system were patched. But hey...why let common sense let him have "ammunition" about how bad IIS is?

      Also...it's a moot point. IIS 5.0 is no longer current (and hasn't been for over a year and a half). Thus a discussion about non-current software having problems is stupid. It serves no purpose. Why bring it up as an example of a security problem when the problem was fixed in the current (going on over a year and a half) version? It's an agenda. One that makes the person who holds it look like a fool.

    43. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      JVM - no, that's safe.

      Safer, perhaps. Safe, absolutely not. JNI, just like .NET's C/C++ support, give the programmer a chance to screw things up and write unsafe code. The issue is the ease at which a programmer can make these mistakes as well as the level difficulty for a programmer to not make these mistakes when using these features.

      No environment is completely safe. I can write a simple form validation servlet that will execute arbitrary code inside my JVM. It would require me being stupid and almost consciously unsafe, but it can be done. All I'd have to do is accept a file upload, get the bytes from that file, define a new Class object from those bytes, instantiate and run.

    44. Re:JNI is an API, not a platform... by cnettel · · Score: 1
      So, the problems continue with IIS, and are not simply because there was a buggy version with NT4. Although, I do agree that it's a target because it's in the default install, just like OpenSSH is a huge target because it's running on so many Linux boxes.
      Well, even Windows 2000 vanilla is getting 5 years old now, but I of course don't know when this happened. There have been service packs to slipstream for years and Windows 2003 also for a number of years. And, of course, that doesn't excuse the bug itself. But the severity is caused by the huge number of computers, never really intended to be real web servers, which have been turned into zombies. As noted here and in the grandparent, we're not interested in market-share for real servers, just the number of hosts possible to reach in an attack. I bet most Apache and IIS setups don't host any real site, but are just there to toy with or by "accident"/"oh, how cool, a web server" interest.
    45. Re:JNI is an API, not a platform... by sumdumass · · Score: 1

      That last time i install windows 2000 advanced server or win2000 small business server, iis was on by default. In 8 minute from the install, i was busy looking for driver updates and installing other stuff.

      I'm not the parent poster but there is no reason to think that a fresh server on a closed network would get a virus right of the bat. the problem was that the network had an outside port forwarded to it before he knew about it. I guess thats never an issue when you network consists of moms computer and the scap heap you salvaged to become an network engineer on.

    46. Re:JNI is an API, not a platform... by adiposity · · Score: 1

      The reason IIS was running is because that is the default behavior, which is just plain stupid. The average Windows server doesn't need a web server.

      I usually slipstream service packs. In this case I had not done so. A previous machine had failed and needed a replacement ASAP. So, I installed Win2k AS from the original CD and started configuring things. IIS was on by default. I knew this; I didn't care--I was behind a NATed network, and every minute wasted was money lost. It turned out a port was forwarded which allowed Code Red to be exploited. If I had known this, obviously I would have been more careful about allowing IIS to run.

      The point, however, was that I installed Win2k, a fairly expensive product, and within minutes, had my network hosed because it contained an insecure service which was enabled by default...without my ever selecting it. As it happened, I knew this service was on there and would have disabled it had I known the port was forwarded to that machine, but the real error here lies with the poor design in IIS. Just because I didn't take every single precaution I could have (and should have) doesn't mean the fault is all mine. Part of the problem was me not being familiar with that network, part was that I was in a hurry, and part was that Microsoft's product was extremely insecure by default. Considering the amount of money I paid to have access to that product that MS put on the CD, I'm kind of disappointed that it was so flaky.

      Also, this happened over a year ago, so my story is not current either. But I just wanted to say that if the parent was suggesting that it was only the IIS with NT 4.0 that was so insecure, he/she's wrong. IIS continues to have problems, and Win2k isn't so long ago. Most windows companies are still running Win2k for their servers. Yes, there are patches, and yes, I install them, and *NO* I don't use IIS for *anything*. It's disabled on all my servers. I'd bet my job that IIS still has horrible security holes, though.

      -Dan

    47. Re:JNI is an API, not a platform... by carboncopy79 · · Score: 1

      There have been ssh-brute force on many many UNIX machine around the world. It tries to attack machine with weak password.

      Note, that I use brute force in a very loose way.

    48. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Solaris unsafe? I can't say I would agree with that. Sure applications sitting on Solaris might be unsafe. Apps like ssh, bind, or apache. But those are impacted on all Unix/Linux platforms. If Solaris were so unsafe then why do a lot of companies use them as edge servers to protect various M$ servers? We run Solaris and Linux and I have to say there have been a hell of a lot more remote exploits in Linux then Solaris.

    49. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      I actually find it quite disappointing how much is done in native code. It seems Sun still does not trust Java to do computation intensive task despite everytime showing us nice little benchmarks how fast everything is with their new VM.

      I'm talking stuff like image decoding, zlib, SSL, etc. Yes it would be a little slower.. Who cares? At least you're not running critical parts of your program in c mode. With the zlib/png exploits it HAS been shown just how drastic the effects of this can be. These are typically also the parts of your application that are hard or impossible to shield from the user.

      If you want to run at full "native" speed you can always make your own implementation with JNI. If Sun is scared of loosing face over this they can always provide this API seperatly or have an alternative version of their JRE.

    50. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Your comments don't make sense. The point is not whether JNI is an API or a platform, it's whether a Java programmer can possibly do something as bad as unchecked code in C#. Which he can. If you want to be really safe on .NET, you can just load an assembly with security restrictions that prevent unsafe code, problem solved. Same thing with Java of course (don't allow it to use JNI).

    51. Re:JNI is an API, not a platform... by JesseT · · Score: 2, Informative

      You can look at C# as two languages: an "unsafe" and a "safe" language. The safe language is the equivalent of Java. The "unsafe" language is the equivalent of C or C++ linked in through JNI. Linking "unsafe" to "safe" code in C# has the same restrictions on it as does linking native code to pure Java code in Java. So, Gosling's rantings have no technical merit.

      You got this wrong too. As Don explained in his blog, if you weren't too busy to have read it, you'd realize that "unsafe" C# is still managed code. It doesn't get "linked" through the CLR's equivalent of a JNI interface. It's still managed code. There isn't any unmanaged code here to speak of. C# code can still interoperate with unmanaged code using the .NET BCL's P/Invoke and COM interop layers, but it has nothing to do with the "unsafe" subset of the C# language. It's a part of the .NET Framework itself, and all managed languages targetting the .NET Framework can utilize those features.

    52. Re:JNI is an API, not a platform... by AmberBlackCat · · Score: 1
      Most people's views of Apache and similar systems are neutral at worst. I've never met or talked to anyone who hates Apache.

      Let me introduce you to the PHP guys...

    53. Re:JNI is an API, not a platform... by bigsteve@dstc · · Score: 2, Informative
      Either way, it's unsafe.

      If the JVM and (say) C code are in separate address spaces, then the C code does not ever need to see the physical addresses of Java objects, or anything else in the JVM address space. Thus, the JNI API can in theory be implemented so as to make it impossible for the C code to break the Java type system.

      However, I've never come across a JNI API implementation that works that way. It is just too expensive.

    54. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      "Before connecting it to the Internet"? You mean Win2k was so catastrophically insecure that (rather than using bootp) you had to fly out to the colo, install a spare CD-ROM drive, and click "Next >" a few dozen times by hand for each machine? *snort*

    55. Re:JNI is an API, not a platform... by jeif1k · · Score: 1

      It doesn't get "linked" through the CLR's equivalent of a JNI interface.

      Of course, it doesn't get "linked": it's a language construct. That is one of its advantages over JNI: because the compiler and runtime know about unsafe constructs, they can get inlined. Something that may require a complete API and pages of C code with JNI can be done with just a single line of unsafe code in the CLR.

      It's still managed code. There isn't any unmanaged code here to speak of.

      Of course, it's "managed code". Why are you re-stating something that is both obvious and irrelevant to the point we are discussing?

      You got this wrong too.

      No, I didn't. Gosling made the claim that the existence of the "unsafe" construct in C# is a security hole relative to Java. Gosling is wrong: the "unsafe" construct is no more of a security hole than the presence of JNI is in Java. In both Java and C#, unsafe code can only be executed by trusted code.

      In fact, the fact that unsafe code in C# is managed actually is better from a runtime safety and security point of view because it arguably greatly reduces the probability of error.

    56. Re:JNI is an API, not a platform... by jeif1k · · Score: 1

      If the JVM and (say) C code are in separate address spaces, then the C code does not ever need to see the physical addresses of Java objects, or anything else in the JVM address space. Thus, the JNI API can in theory be implemented so as to make it impossible for the C code to break the Java type system.

      First of all, people use JNI for buffer and array manipulation; that JNI code wouldn't work if it weren't in the same address space. So, your claim that JNI code can run in a separate address space is just bogus.

      Second, even if JNI code did run in a separate address space, it would still be beyond the control of the Java security modules, so it would still be unsafe.

      Third, whatever harebrained construction you cook up with JNI in your mind, you can do the same harebrained thing with C#'s unsafe code. In fact, because C#'s unsafe construct has a well-defined language, it would be far easier to do such things.

      I'm sorry, but your arguments are just plain stupid.

    57. Re:JNI is an API, not a platform... by Fallus+Shempus · · Score: 1

      Why the hell would you use JNI for array manipulation, java actually competes with native code quite well at this sort of thing.

    58. Re:JNI is an API, not a platform... by vandy1 · · Score: 1

      It's quite all of the languages mentioned were 'safe' languages to a great extent (perhaps moreso than Java), but the reason why C succeeded was an accident of history - it was running on a PDP-11 (before that, its predecessor), and was highly portable. UNIX succeeded precisely *because* it was portable, and C was a package deal with UNIX. Cheers, Michael

    59. Re:JNI is an API, not a platform... by man_of_mr_e · · Score: 1

      Why the hell would you use JNI for array manipulation, java actually competes with native code quite well at this sort of thing.

      Integerwise, sure. But what if you want to use SIMD instructions (Altivec, SSE, etc..)?

    60. Re:JNI is an API, not a platform... by Fallus+Shempus · · Score: 1

      I wouldn't be using java at all for anything that's architecture reliant, I know some things are possible, but I'd most likely stick with C or assembler.

    61. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      For example, for stuffing large amounts of data into OpenGL arrays, or for calling optimized BLAS routines on Java numerical arrays, etc.

      JNI has an extensive set of primitives to enable just such operations without copying. The idea that JNI can reasonably be implemented in a separate address space is just complete nonsense.

    62. Re:JNI is an API, not a platform... by man_of_mr_e · · Score: 1

      Well, that's just it. Once you go to JNI, all cross platform bets are off anyways so why not take advantage of machine architecture?

      But that wasn't really the point anyways, I was simply providing a possible reason for going to native code for array or other kinds of processing.

    63. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0


      The point, however, was that I installed Win2k, a fairly expensive product, and within minutes, had my network hosed because it contained an insecure service which was enabled by default...without my ever selecting it.

      Few operating systems ship without any services listening by default. This is hardly unique to Windows. On my newely installed Solaris 10 system there are currently 29 services listening. I'm certain that as time progresses we'll discover vulnerabilities in at least one of these services. How is this any different than Windows?

      As it happened, I knew this service was on there and would have disabled it had I known the port was forwarded to that machine, but the real error here lies with the poor design in IIS.

      How does a bug equate to poor design?

      IIS continues to have problems, and Win2k isn't so long ago.

      No...IIS does not continue to have problems. IIS 6.0, the current version for over a year and a half now, has not had any exploits that I'm aware of. Or do you know otherwise? The fact that IIS 5.0 is still used is irrelavent to a discussion as to how secure IIS is. The only version that matters is the current version.

      I'd bet my job that IIS still has horrible security holes, though.

      That's a good thing for your employer. You're obviously uninformed and are more of a risk to your employer than an asset. They would be good to take you up on this offer and walk you out the door. To date IIS 6.0 has one known vulnerability and no known exploits. This is much better than Apache. Where would you like to pick up your final paycheck?

    64. Re:JNI is an API, not a platform... by jeif1k · · Score: 1

      Well, that's nice for you. However, many people would like to be able to use high performance, native numerical libraries, graphics libraries, and other such code, while at the same time building complex GUI interfaces. Other people have already taken care of the portability for the native code (Atlas, OpenGL, etc.), so that's not a concern.

      JNI is the best solution for Java for doing that sort of thing, but JNI is slow, tedious, and hard to deploy across platforms. C#'s "unsafe" constructs and DLL interfaces offer the same functionality with much better performance, much better portability, and much better runtime safety.

    65. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      That's why my Solaris machine gets attacked if I don't have a firewall in front of it for ten seconds.


      Attacked or compromised? All the Windows filesharing requests in my firewall's logs could be considered "attacks".

    66. Re:JNI is an API, not a platform... by Dun+Malg · · Score: 1
      Many of the classics, among them Lisp, Algol, APL, Simula, and Smalltalk. Modula-3 even had C#-like safe/unsafe sublanguages (as did a few other languages). And while they didn't have GC, languages like Pascal and Modula were safe languages in most other respects.

      OK, now I get where you're coming from. I didn't catch the whole safe/unsafe subdivision. Indeed, [C|C++] has no "safe" aspect.

      The world did not begin with 16k Apple II's or the teenage dabblings of some industry luminaries in software. People had large computers running multiuser operating systems and safe, high-level languages in the 1960's.

      Well yeah, I was thinking of those same large machines, like the initial base release of the PDP-11 with its max usable RAM of 28Kwords. Admittedly, I was exaggerating a bit to make the point.

      "and did they really bother to weed out all possible "exploits" when weren't 10,000 russian teenagers writing viruses to "zombie box" that machine?"

      We are talking about runtime safety here. You are confusing runtime safety and security; runtime safety helps with security, but it is neither necessary nor sufficient to guarantee it.

      Understood, but my point remains. The scouring of every nook and cranny of the software is always less critical when you don't have hordes of cretinous jerks looking to "pwnz0r!" the machine. Were they really safer at runtime, or were they just not pushed to the extremity many current systems are? Admittedly, [C|C++] is Not The Ideal Choice in a world where everything is getting bigger and more complex.

      --
      If a job's not worth doing, it's not worth doing right.
    67. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      I wouldn't be using java at all for anything that's architecture reliant

      Neither would I. I would be using C# because it has all of Java's benefits, plus it does this well, too.

    68. Re:JNI is an API, not a platform... by Anonymous Coward · · Score: 0

      Dear Pat Niemeyer, Author of Learning Java, O'Reilly & Associates:

      I'm glad you always point out that your name is Pat Niemeyer, Author of Learning Java, O'Reilly & Associates. It's incredibly helpful. That way I know this is a comment by Pat Niemeyer, Author of Learning Java, O'Reilly & Associates.

      Thank you Pat Niemeyer, Author of Learning Java, O'Reilly & Associates!

    69. Re:JNI is an API, not a platform... by bigsteve@dstc · · Score: 1
      I'm sorry, but your arguments are just plain stupid.

      You picked the wrong person to argue with on this topic. I just happen to have implemented the JNI interfaces in an open source Java virtual machine. By contrast, it is clear that you haven't even read the JNI interface spec.

      First of all, people use JNI for buffer and array manipulation; that JNI code wouldn't work if it weren't in the same address space. So, your claim that JNI code can run in a separate address space is just bogus.

      For your information, the primary JNI 1.1 calls for accessing the elements of an array have the following form:

      NativeType *Get<PrimitiveType>ArrayElements(JNIEnv *env, ArrayType array, jboolean *isCopy);

      void Release<PrimitiveType>ArrayElements(JNIEnv *env, ArrayType array, NativeType *elems, jint mode);
      The Get... call returns a pointer to an area of memory that contains the elements of the Java array ... as they were when the call was made. The JNI spec says that the pointer may refer to the actual array, or to a separate buffer that was specially created. The JNI sets "*isCopy" to JNI_FALSE or JNI_TRUE to tell the caller which semantics were used. The Release... call performs the reverse operation. If the Get... call returned a copy, the Release call's "mode" argument allows the native code to controll copying of the buffer contents back to the Java array.

      To implement these JNI calls when the Java and native code in separate address spaces, you simply make them always perform a copy.

      In JNI 1.2 they added some alternative forms of the array operations to make it more likely that native code can access an array contents without a copy. But if you read the specs carefully, you will see that it is valid for a JNI implementation to exclusively use copy semantics for these calls as well. Second, even if JNI code did run in a separate address space, it would still be beyond the control of the Java security modules, so it would still be unsafe.

      That is rubbish:

      1. The distinction between "safe" versus "unsafe" is that "safe" code cannot break Java type safety. Java sandbox security doesn't come into it.
      2. Accepting your (IMO bogus) definition of safety as including Java sandbox security, an untrusted application cannot load untrusted JNI plugins anyway. Java sandbox security forbids this ... unless you deliberately mutilate the security policy.
      3. Finally, even if you were prepared to take take the risk of allowing untrusted applications to load untrusted JNI plugins, it should be possible to implement JNI so that all relevant JNI calls check to prevent violation of the security model.

      Third, whatever harebrained construction you cook up with JNI in your mind, you can do the same harebrained thing with C#'s unsafe code.

      True ... but irrelevant. My point was and is that this approach could be made to work. I never said it was a good idea. For a start, the cost of typical JNI calls would be prohibitive.

    70. Re:JNI is an API, not a platform... by Decaff · · Score: 1

      Why in the world would one consider the *possibility* of unsafe code in the CLR a security hole?

      Because of the way in which many coders work. .Net makes the use of raw memory access and pointers easy - just use a keyword. It can make the use of potentially insecure legacy code embedded in .Net routine. Its a classic example of Microsoft designing for the convenience of the developer and not for security.

  3. Flaws aren't a bad thing? by MattyDK23 · · Score: 2, Funny

    I can see it now..."Bugs deserve rights too!"

    1. Re:Flaws aren't a bad thing? by Rosco+P.+Coltrane · · Score: 5, Funny

      I can see it now..."Bugs deserve rights too!"

      Well, ask the original bug at NSWC if it enjoys being taped to a cardboard note since 1947...

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Flaws aren't a bad thing? by smittyoneeach · · Score: 1
      Boss Hogg says to "get yo' fax straight", Roscoe :)
      [There has been a widespread myth that the original bug was moved to the Smithsonian, and an earlier version of this entry so asserted. A correspondent who thought to check discovered that the bug was not there. While investigating this in late 1990, your editor discovered that the NSWC still had the bug, but had unsuccessfully tried to get the Smithsonian to accept it -- and that the present curator of their History of American Technology Museum didn't know this and agreed that it would make a worthwhile exhibit. It was moved to the Smithsonian in mid-1991, but due to space and money constraints was not actually exhibited for years afterwards. Thus, the process of investigating the original-computer-bug bug fixed it in an entirely unexpected way, by making the myth true! --ESR]
      However, if the NSWC in question is actually Dahlgren, the attention of the gun nuts in the crowd is drawn to the 18.1 inch gun down there on the firing line. Nothing above 16 inches was ever deployed in a US Naval gun, but it makes a swell trivia question.
      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    3. Re:Flaws aren't a bad thing? by Anonymous Coward · · Score: 0

      Say, you wouldn't know a joke if it painted itself dayglo-yellow, wore a silly hat and shouted "I'm a joke" at ya would you?

      Lighten up for chrissake...

    4. Re:Flaws aren't a bad thing? by Anonymous Coward · · Score: 0

      It's not a BUG, it's a FEATURE!

    5. Re:Flaws aren't a bad thing? by J.D.+Hogg · · Score: 1

      Boss Hogg says to "get yo' fax straight", Roscoe :) No I don't.

    6. Re:Flaws aren't a bad thing? by Anonymous Coward · · Score: 0

      Example of something I think truly funny:
      Brevity is the soul of wit, whereas ambiguity is that other thing...

  4. What do these both have incommon? by drakethegreat · · Score: 0, Redundant

    They are both systems that are closed source (Well Solaris is now debatable) and both are managed by corporations. We all know how that affects security.

    1. Re:What do these both have incommon? by Anonymous Coward · · Score: 0

      What a crock... You actually think that open source is inherently secure because it isn't managed by a corporation?

      All you have to do to blow your hypothesis out of the water is to look at the history of Linux and some of the apps running on it to see a long string of security holes. OSS gets patched just like CSS.

    2. Re:What do these both have incommon? by javatips · · Score: 4, Informative

      Java source code is available with little effort. So if you want to check it out and do some security analysis, you can do it.

  5. Reminds me of this link by agent · · Score: 1

    Bill_Gates.m4a Warning, it is on a slow connection.

    1. Re:Reminds me of this link by Anonymous Coward · · Score: 1, Funny

      Wooo, someone is stupid enough to use Exeem!

  6. Trademark lawsuit? by Anonymous Coward · · Score: 0

    MS calls it "Indigo"...

    Do I smell a lawsuit from SGI?

  7. I don't think anyone really read what Gosling said by Anonymous Coward · · Score: 5, Interesting

    Are we just going to have this continuing debate in which every side is inaccurately reduced to one slashdot-blurb-sized sound bite?

    Anyway, JNI doesn't need to be a security hole of the sort Mr. Box mentions; one can concieve of a Java VM which disallows unsafe JNI code from touching the memory of the bytecode-verified safe code, by partitioning JNI execution into a separate process. In fact at least one such JVM implementation exists already.

  8. Standards by davidstrauss · · Score: 2, Funny

    Is this the new Microsoft Box model?

    1. Re:Standards by Anonymous Coward · · Score: 0

      The Microsoft Box (tm) is more open than open source boxes!

  9. This proves Python, Perl, and other FOSS==secure by Anonymous Coward · · Score: 1, Funny

    Since Java and .NET are both so insecure; by subtraction, F/OSS is the most secure stuff around!

  10. here we go again.... by kevinx · · Score: 5, Funny

    is this one of those, "your hole is bigger than mine" arguments?

    1. Re:here we go again.... by mmkkbb · · Score: 1

      and the third one smiled as she slid down her barstool

      --
      -mkb
    2. Re:here we go again.... by km790816 · · Score: 1
      is this one of those, "your hole is bigger than mine" arguments?
      No. It's one of those, "pot calling the kettle black" arguments.
  11. All bloatware is buggy and risky. by plinius · · Score: 1

    It is in the very nature of bloated software that its complexity increases faster than the number of source lines, and that the vulnerabilities and bugs increase perhaps even faster than that.

    a tiny shot fired across the bow of bloatism

    1. Re:All bloatware is buggy and risky. by gnuman99 · · Score: 1
      a tiny shot fired across the bow of bloatism

      Oh, putting the UI in the kernel, are we? I think people just don't learn from mistakes of Windows...

      Buggy X is one thing, buggy kernel is another.

    2. Re:All bloatware is buggy and risky. by Anonymous Coward · · Score: 0

      No overlapping windows? You gotta be kidding!
      What are windows doing for you, if they can't overlap?
      Getting rid of bloat is one thing, but ham-stringing your software gets you nowhere.

  12. FUD by micromuncher · · Score: 5, Informative

    To use JNI inside of an applet, it needs to be signed with the DLL/shared library pre-installed in lib. So, the topic of "Huge Security Hole in Solaris and JVM" is alarmist and FUD, considering that to get outside of the sandbox, you need to jump through serious configuration hoops.

    --
    /\/\icro/\/\uncher
    1. Re:FUD by Anonymous Coward · · Score: 2, Informative

      You can't use Unsafe/PInvoke inside a .Net hosted control (applet) unless permissions have been explicitly granted beforehand.

      So to get outside that sandbox, you need to jump through configuration hoops.

    2. Re:FUD by Anonymous Coward · · Score: 0

      ... and that is *exactly* what you must do if you want to run .NET code with "unsafe" tag.

  13. Indigo platform? by ackthpt · · Score: 1

    Going back to SGI, eh? Iris Indigo

    --

    A feeling of having made the same mistake before: Deja Foobar
    1. Re: Indigo platform? by zrk · · Score: 1

      I had one, then I upgraded to an Indy...6 years ago.

      Gotta love how MS is the only one to reuse defunct names like this...

    2. Re: Indigo platform? by LuSiDe · · Score: 1
      Gotta love how MS is the only one to reuse defunct names like this...


      Notice how Indigo is put between "'s. Indigo may be trademarked by Microsoft which may be the reason why only they use it. Perhaps the trademark was even bought from SGI. Or, it may be just a name which'll be changed.

      Also, remember Indigo is simply a color similar to purple. I remember owning a Indigo2 which was purple. My lovely and stable purple puppy :-)

      There's some DE for *NIX/Windows with its own widget set using. It was called Athene, Athena(e) or something like that. Anyway, it included a few different DE's such as one which resembled AmigaOS 3.x and also which resembles, or which will resemble (!) "Microsoft's Indigo".
      --
      WE DON'T NEED NO BLOG CONTROL.
  14. Babies... by JossiRossi · · Score: 1

    Well sure, "Mr. Righteous" Yes, My Baby is bleeding. And sure I refuse to bandage her. But you know what, your baby is bleeding too so you can shut up, it's not that bad. Jerk.

    --
    Just a boy doing unproffesional IT work that's way above his head.
  15. This just in! by kiwidefunkt · · Score: 5, Funny

    This just in: Programming languages are insecure. They allow third parties to run arbitrary code on your processor.

    Microsoft will be releasing a patch which fixes this problem soon. Stay tuned.

    --
    www.kiwilyrics.com - a wiki for lyrics
    1. Re:This just in! by jimicus · · Score: 1

      Microsoft will be releasing a patch which fixes this problem soon.

      I thought they already this ages ago - it was called Internet Explorer 4.

    2. Re:This just in! by speaker+bracelet · · Score: 1

      They already have .. It's called Windows.

    3. Re:This just in! by slo · · Score: 1

      For clarification: Although against conventional usage, we define you, the client, as the second party, and Microsoft as the first party for the reason that we refuse to be second.

    4. Re:This just in! by Anonymous Coward · · Score: 0

      The patch is available, it's relatively simple to install, and there are even options.

      Take your computer (without any cables or anything connected to it), build a nice box around it, leaving 6" (15cm) free on each side, with the computer held up on a few strings run on the inside of the box.

      For added protection, drill holes in the case (1/2" bit or larger recommended).

      Go down to your local concrete supplier (or for Linux users, cement supplier, gravel yard, and beach) and get 10 cubic feet of concrete (0.228 cubic metres) (Linux users, roll your own, to taste, check the net for a HOWTO before starting). Make sure to request that the concrete supplier include metal foil tension elements.

      Fill the box with concrete, ensuring the computer is fully submerged. Allow to harden.

      Viola, your computer is now safe. For a more modern look (though with a minor risk of IR intrusion), Lucite can be substituted for concrete.

    5. Re:This just in! by Anonymous Coward · · Score: 0

      Their fix:

      The program 'Firefox.exe' is attempting to move (MOV) the contents of register EBX to register EAX. Should windows allow this operation?

      | Yes | | No |

      The program 'Firefox.exe' is attempting to push (PUSH) the contents of register EAX on the stack. Should windows allow this operation?

      | Yes | | No |

      The program 'Firefox.exe' is attempting to jump (JMP) to memory address 0xD49F16C208E2B791. Should windows allow this operation?

      | Yes | | No |

      The program 'Firefox.exe' is attempting to noop (NOOP). Should windows allow this operation?

      | Yes | | No |

      ...

  16. Yawn! by Z00L00K · · Score: 2, Insightful
    This seems to be a shit-throwing contest more than actually trying to figure out means to manage security issues in platforms.

    Programs will have bugs, regardless of what programming language that is used, since it always comes down to machine-code or even microcode in the end, and it's not easy to test a large software package for all possible permutations.

    The only way around this problem is a layered security approach, which means that breaking one layer will not cause any critical effects. Unfortunately Microsoft has only recently recognized this and are applying patches on and off. Solaris and most *NIX:es are a little better off, but there are a lot of work to do for all operating systems here!

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  17. But that's where you're wrong-- Inline.pm! by Anonymous Coward · · Score: 1, Funny

    But Perl and Python have the same security flaw we are discussing with regards to .NET and Java-- both allow linking against unsafe compiled code!

    So the only really safe language to be using, in truth, is HQ9+. Rather than leaving the opportunity for error as Perl, Python, Java and .NET do, HQ9+ utilizes an innovative language design which ensures by the very syntax of the language that security violations are not possible. Consider using HQ9+ for your next enterprise application development project.

  18. Re:here we go again....size doesn't matter by Anonymous Coward · · Score: 0

    Size doesn't matter, It's how you use it.

    (sorry)

  19. Re:It's that darn C and C++ code again.. by SnarfQuest · · Score: 2, Funny

    Intercal! It's very hard to write viruses using it.

    (It's very hard to write anything else in it either)

    --
    Who would win this election: Andrew Weiner vs Andrew Weiner's weiner.
  20. Inaccurate comparison by shlong · · Score: 1, Informative
    Saying that the JNI exposes Java to the same C/C++ flaws as .NET/CLR is techinically true, but not very accurate. JNI was added to Java purely to allow the JVM to operate as a browser plugin. It wasn't something that Sun really liked or wanted to do since they really wanted Java to be a better, safer, and portable language. I think that this point was even discussed in some of the early books on JNI.

    Microsoft, however, is actively looking to extend the CLR with a JNI-like interface. Why? To make it easier for people to port their legacy C/C++ apps to .NET. If you can keep most of your exsiting codebase untouched and just write .NET wrappers to access it, porting is theoretically easier. Microsoft doesn't care about platform portability (or safety, for that matter), they just want an easy way to get faster adoption.

    Looking back at Java, JNI calls are hardly ever used. There are few books on the topic (I think an O'Rielly book on it was supposed to come out years ago on then got mysteriously pulled), and very few Java projects use it. It's a different mindset and a different set of goals between .NET and Java, and I think that Gosling is perfectly justified in pointing out the dangers of the path the Microsoft is taking.

    --
    Cat, the other, tastier white meat.
    1. Re:Inaccurate comparison by Alt_Cognito · · Score: 0

      Correct me if I'm wrong, but doesn't the SWT use JNI - it certainly links to some native windows GUI DLL calls. That's used by Eclipse - eclipse is by no means a small insignificant project.

    2. Re:Inaccurate comparison by funk_doc · · Score: 1

      A point not made is that there is only one CLR, if there is an exploit for it, it will work in ANY .NET application. There are however dosens of implementations of the JVM. An exploit for one JVM wont necessarily work in another JVM.
      This is a common theme for Java applications, an interface is published, and many compaines will implement it.

    3. Re:Inaccurate comparison by soulhuntre · · Score: 1

      "An exploit for one JVM wont necessarily work in another JVM"

      Hell, in a lot of cases even non-buggy code for one JVM can't run ont he others. This is one of the places where Java fell down big time.

      --
      --> Fight tyranny and repression.... read /. at -1!
    4. Re:Inaccurate comparison by ray-auch · · Score: 1

      Maybe no-one is making that point because they know there _is_ more than one CLR... (1, 2).

    5. Re:Inaccurate comparison by funk_doc · · Score: 1

      At our orgainzation the developers develop on a number of different JVM's. Windows, Linux, Apple, BEA's JVM amongst others. Other then poorly written threading code, I've never once an instance of an application running differently on other JVM's. I've been developing on Java for 5 years.

    6. Re:Inaccurate comparison by funk_doc · · Score: 1

      Do you know anyone running production and mission critical software on mono? Didn't think so. Mono is not prime time yet, for that matter neither is .NET

  21. Re:I don't think anyone really read what Gosling s by de1orean · · Score: 1

    Are we just going to have this continuing debate in which every side is inaccurately reduced to one slashdot-blurb-sized sound bite?

    You mean there's another alternative? I don't follow.

  22. Why "managed" == "denial" by Concern · · Score: 5, Insightful

    When .NET was first announced and the details began to be known, there were a number of lively discussions here about it. The "feature" of running unmanaged code was hotly debated, but the debate seemed to me to be entirely one-sided. It seemed clear unmanaged code is another classic Microsoft mistake - trading sugary convenience today for billions in headaches for their customers tomorrow. I went looking for someone to convince me otherwise and didn't succeed. Maybe now?

    There is great value in a "managed" system like the Java VM. It gives us an extraordinary amount of safety that we are frankly unaccustomed to. People are still gradually learning how to think about it, but you see more and more security-critical projects going "Java only" as they figure it out.

    There is also obviously no way we can do everything that way. For hot code, we work at lower levels, put in more work, and (for now) accept the additional risks. Note that the constant stream of ugly worldwide security problems is gradually but now noticeably decreasing our apetite for doing everything that way.

    As far as I can tell, by allowing unmanaged code in the runtime, .NET gives you only the worst of both worlds.

    You get all the overhead of the VM, but you don't really get safety.

    I know perfectly well you can tell the .NET runtime not to allow unmanaged code. That doesn't matter, because the choice is there, "unmanaged" is still a huge problem.

    Either it is avoided by everyone (everyone recognizes that it's a mistake), or we all begin to use it (it's in XYZ library), and then we all end up allowing unmanaged code, and we are no longer safe.

    --
    Tired of Political Trolls? Opt Out!
    1. Re:Why "managed" == "denial" by graznar · · Score: 3, Interesting

      There is great value in a "managed" system like the Java VM. It gives us an extraordinary amount of safety that we are frankly unaccustomed to.

      Which I'm guessing your misinformation leads you to believe that .NET doesn't afford?


      There is also obviously no way we can do everything that way. For hot code, we work at lower levels, put in more work, and (for now) accept the additional risks. Note that the constant stream of ugly worldwide security problems is gradually but now noticeably decreasing our apetite for doing everything that way.


      Right...for "hot code" .NET developers use Interop to access lower level APIs and interfaces.


      As far as I can tell, by allowing unmanaged code in the runtime, .NET gives you only the worst of both worlds.

      I'm not really sure why you're wailing on .NET; security is a holistic effort. Your sysadmin needs to disable access to dangerous operations; the developer needs to put in place security measures (regardless of what language); the user needs to know how to operate software.

      JNI does essentially the same thing as Interop. People who have been using JNI in its originally intended context don't see this, but some people use JNI to access lower level interfaces and APIs (such as shared memory, native APIs, etc.).

      Now, of course, I'm sure you'll gloat about the proverbial "sandbox" that Java offers, but you fail to realize that .NET has this also. Try running an assembly off a remote store or even run a method through a remote channel. .NET's standard security is pretty high. It respects system permissions and principals, so I'm not sure why people keep saying it's some sort of apocolyptic risk.

      Unmanaged isn't any different than writing a program and using JNI to talk to it.

      --
      [ check out my ruby book @ http://ww
    2. Re:Why "managed" == "denial" by Concern · · Score: 2, Insightful

      I'm sure you'll gloat about...

      Relax.

      Try running an assembly off a remote store or even run a method through a remote channel.

      I'm aware that the default security configuration in .NET is not Pants Down for remote code.

      I don't want to confuse "attack" with "mistake." What about problems in local unmanaged code that we wrote ourselves?

      Unmanaged isn't any different than writing a program and using JNI to talk to it.

      I don't know how good a comparison this is.

      Any VM must use "managed" code to interface with lower-level "unmanaged" code. This is what you see in any core library: wrapper objects that invoke unmanaged native code. No PC is "managed" down to the silicon - although some Java embedded devices literally are.

      The difference is in how that boundary works. In Java, JNI is deliberately very rudimentary and extremely low level. It is designed exclusively to allow access to native routines - not bit twiddling within the VM itself. It's use is vehemently discouraged by policy (100% pure etc etc) and JNI use in the field is rare as a result.

      Everyone can hammer on the fixed Java API, and at some point we trust that lower-level foundation. We then declare that our own Java code, built on top of it, is "safe" and "managed."

      In .NET, if I understand correctly, the attitude is very different.

      http://msdn.microsoft.com/library/default.asp?ur l= /library/en-us/dnreal/html/realworld06012004.asp

      They encourage the use of unmanaged code, and the framework makes it much, much easier to use. It's billed as a feature.

      We slip in unmanaged C# to fiddle with buffers to do parsing or whatever. This is not going to C like in JNI, but just quick-and-dirty cheating within the VM. There is no such thing as "unmanaged Java."

      So you can cheat the VM and make C# a little faster. But now no one is looking over your shoulder. Your new unmanaged code may have problems. You are not safe in your VM anymore (nor are you portable). Meanwhile you still have the overhead of running that way.

      It often comes up in the Java community that people wish JNI did more work for you, so that it would be easier to use. But we always come back to the same answer: if you make JNI easy, and start encouraging its use (going the Microsoft route), soon everyone is using it. There is no more portability and you lose security and stability. Great for MS, of course. But if we really don't care about that, why not just back away from the VM in a more orderly fashion altogether?

      --
      Tired of Political Trolls? Opt Out!
    3. Re:Why "managed" == "denial" by julesh · · Score: 1

      You seem to have missed the entire point of this article, which is that .NET's unmanaged code facilities are no worse than Java's JNI. Which is probably true. Both allow you to interface unsafe code with safe, but the use of both is disallowed by the environment you typically run untrusted code in when using the platform.

      I fail to see the problem.

    4. Re:Why "managed" == "denial" by Anonymous Coward · · Score: 0

      Any time a feature must be discouraged by making it deliberately difficult to use, you are looking at one of two things:

      1) A feature which should be easy to use, but only used when absolutely needed, and have checks to ensure it's done 'properly'.

      2) A feature which isn't needed, or which is so fundamentally broken that you're better off without it.

      Which is it? Since, clearly, people are willing to jump through hoops to use JNI, it's not number two.

  23. Welcome To Microsoft's Security 'Solution' by Anonymous Coward · · Score: 0

    "I know you are but what am I!"

    Nya,nya,nya...

  24. Why "managed" != "denial" by mark99 · · Score: 2, Interesting

    I write a lot of C#, and I almost never use unmanaged code.

    But sometimes I do. I would start far fewer projects with C# if I couldn't be sure I could get out of that particular straightjacket.

    That being said, I am starting to have my doubts about writing huge programs without giving a thought to memory management. It is fun, and it is fast, but there is no way back...

    1. Re:Why "managed" != "denial" by geoffrobinson · · Score: 1

      Isn't unmanaged code only an issue for C/C++, not C#, in the .NET system?

      --
      Except for ending slavery, the Nazis, communism, & securing American independence, war has never solved anything.
    2. Re:Why "managed" != "denial" by mark99 · · Score: 1

      Of course technically you are right, all C# is managed.

      But we are also talking of the dangers of "unsafe" code (pointer manipiulation), which you can write in C#.

  25. Uh... by panth0r · · Score: 0

    I'll don huge security holes in your box!!!

    --
    I like suggestions, but I don't like contributing towards them.
  26. Hmm.. by vurg · · Score: 5, Funny

    So when will this become a serial exchange of yo momma jokes?

  27. Inaccurate Inaccurate comparison by steve_l · · Score: 5, Informative

    JNI is the second edition at a Java to C++ API. It is the underpinnings of every binding from Java to platform there is, not an afterthought for applets (though Netscape were involved). If you don't use it much in your code, it's because other people (i.e Sun) do it for you. They also go out their way to make it hard to do so, whereas MS, with P/Invoke and COM support, make it really easy to invoke native code *from trusted apps*.

    Most .NET code that I know doesn't use unsafe either: MS go out their way to discourage you. You have to compile as unsafe, grab pointers only briefly, and then only ever get to run if your code came from a trusted place. All remote code is blocked, even that on a network share.

    Where MS do care is about COM integration, about platform integration. True, there is only one platform they care about, Windows.

    But consider this: Integration between Java and Linux, especially the GUI, sucks. Want decent Java/Gnome bindings? You need the third party Java-Gnome libs, which use, wait for it, JNI. Want Java KDE bindings, go to KDEJava and get the java libraries plus native code. If you want to integrate with the OS, you need native code, which means JNI.

    The fact that JNI is pretty rare can be seen by the fact that Gnome, KDE and drag-drop integration with the rest of the Linux GUI is pretty much nonexistent.

    I think the FUD Sun are saying about "unsafe" is so bogus. If they want to slag it off, just pick on the .NET APIs, too much of which are thin wrappers around Win32. OR the fact that the .NET runtime needs IE6 installed, and IE6 is the web browser component for .NET apps. OR the fact that ASP.net is built on IIS. Those are security holes. Windows is a security hole. ActiveX is a gaping security hole. IIS is server side disaster. .NET is actually pretty secure, but its just damage limitation on an otherwise dangerous piece of junk. Its like having ABS brakes on a Ford Explorer; not enough on its own to stop you crashing and burning horribly.

    1. Re:Inaccurate Inaccurate comparison by mattgreen · · Score: 1
      just pick on the .NET APIs, too much of which are thin wrappers around Win32

      Hey, it beats having GUIs that look like ass and are sluggish (Swing).
    2. Re:Inaccurate Inaccurate comparison by hkb · · Score: 1

      True, there is only one platform they care about, Windows.


      Yeah, which is why they're implementing all those proprietary technologies like XML, XSLT, SOAP, Web Services and other industry-standard protocols to lock everyone else out.

      Yes, that's sarcasm.

      If they want to slag it off, just pick on the .NET APIs, too much of which are thin wrappers around Win32.

      Too true, but they've got to start somewhere and their "progress" with Longhorn, and their real progress with ASP.NET 2.0 shows they are eliminating this as quick as they can and going to managed solutions.

      OR the fact that the .NET runtime needs IE6 installed, and IE6 is the web browser component for .NET apps.

      IE is their browser. It makes sense to me that they use their own product. Does it not to you?

      OR the fact that ASP.net is built on IIS.

      It's not built on IIS at all, it's built on an ISAPI .DLL called aspnet_isapi.dll. The code for this could be quickly adapted for any other platform (assuming it was open sourced/completed by MS).

      There were recent articles in aspnetPro and MSDN that discussed and showed a code example that implements ASP.NET on top of a basic, custom web server. No IIS at all.

      Those are security holes. Windows is a security hole.

      blah blah blah, slashdot trolling. Microsoft has been seriously slacking in security, but Windows 2003 and IIS 6 show they're serious and competent on designing secure software.

      IIS is server side disaster.

      IIS 2-4.0, maybe, although 5.0 wasn't stellar either. 6.0 however, is quite nice, quite speedy, and relatively secure. I actually like it more than Apache, which scares me.

      Update your biases on technology that isn't years old and crappily designed. Take a look at the current offerings. It's like rambling about KDE 1.1 or Apache 1.0.

      --
      /* Moderating all non-anonymous trolls up since 2004 */
    3. Re:Inaccurate Inaccurate comparison by ChatHuant · · Score: 1

      IIS is server side disaster.

      Sounds like FUD to me. SecurityFocus disagrees with you. And for a lagniappe compare the vulnerabilities listed against IIS 6 and the ones listed against Apache.

      So do you have any facts to back your post?

    4. Re:Inaccurate Inaccurate comparison by spongman · · Score: 1
      OR the fact that ASP.net is built on IIS.
      It's not built on IIS at all, it's built on an ISAPI .DLL called aspnet_isapi.dll. The code for this could be quickly adapted for any other platform (assuming it was open sourced/completed by MS).
      Actully, it's not built on either. ASP.NET can easily be hosted natively within any process you like (including Cassini and Apache) without the need for wrapping the ISAPI dll.
    5. Re:Inaccurate Inaccurate comparison by steve_l · · Score: 1

      Well, there is this mornings critical patch for ASP.net path interpretation which could lead to remote code validation.

      More to the point, Win2K's installation of IIS was hopelessly insecure. Think of Code Red. Why did it spread? Because IIS exported all your printers using IPP by default. And because IIS is architected so that most of its extensions run as DLLs in the same process as IIS. So crash some plugin, you are running as root. Now, I know that really you can run as COM+ things in a COM+ process for better lifecycle and security, but dont know how good it us.

      IIS6 on win2K3 is a lot better, but that is because IIS5 was so bad.

    6. Re:Inaccurate Inaccurate comparison by hkb · · Score: 1

      You're not really saying anything. Could you please clarify?

      Some interpreter/compiler/yadda yadda is needed. And in non-beta form, this is currently the ISAPI dll. In the Apache/Mono world, this is XSP (mod_mono currently uses XSP on the back-end).

      In beta, this is no longer the case. See the whole Whidbey deal for further information.

      --
      /* Moderating all non-anonymous trolls up since 2004 */
    7. Re:Inaccurate Inaccurate comparison by spongman · · Score: 1

      i'm saying you don't need the ISAPI dll, you can just host and call ASP.NET directly.

  28. Why no tainted data in either runtime? by steve_l · · Score: 2, Insightful

    You make some good points. Nobody does use unmanaged BTW, its just too painful. There is one thing wore than it: managed C++.

    One thing though, neither Java or .NET have any notion of tainted data. all this security stuff does is let you run untrusted code in a sandbox, or trusted code in a secured zone to slightly limit the damage it can do.

    But neither language has the idea of marking strings or other data that came from an untrusted source, the way Perl does. Which is odd, as both Java and .NET have so far succeeded server side.

    Compared to Perl, Java is insecure as you can too easily fall to a SQL string attack, either in your web page, or, heaven forbid, Web Service.

    1. Re:Why no tainted data in either runtime? by pHDNgell · · Score: 2, Interesting

      But neither language has the idea of marking strings or other data that came from an untrusted source, the way Perl does. Which is odd, as both Java and .NET have so far succeeded server side.

      Why bother with tainting when you can just do rigorous validation with things like struts? It's been quite a while since I've seen a bug related to inappropriate input handling, and that was in a perl script.

      Compared to Perl, Java is insecure as you can too easily fall to a SQL string attack, either in your web page, or, heaven forbid, Web Service.

      It's actually rather hard to fall victim to a SQL injection attack unless you are just using the APIs the wrong way (which is more difficult). In our application...I can only think of a couple of places where SQL is generated in the code, and in those places, we generate prepared statements to deal with any input.

      --
      -- The world is watching America, and America is watching TV.
    2. Re:Why no tainted data in either runtime? by Theatetus · · Score: 1
      Why bother with tainting when you can just do rigorous validation with things like struts?

      Why bother with that when you can do rigorous validation of data without a managed VM?

      Here's a little thing people seem to be forgetting: buffer overruns and smashable stacks aren't being written by applications developers. These vulnerabilities are found (increasingly rarely) in core libraries. Check bugtraq and vulndev: most exploits being found now are not overrunnable buffers and such; they're SQL insertion and format string exploits. These can be checked for even in plain-old C but people don't check for them and these managed VMs are setting up a mental Maginot line that makes developers even less willing to check for them.

      --
      All's true that is mistrusted
    3. Re:Why no tainted data in either runtime? by spongman · · Score: 1

      you're correct. but .NET does allow you to have many AppDomains in a single process, each running with different code access security permission sets. One AppDomain could be allowed to write to the local drive, whereas you could load code from the network and run it in an AppDomain that's not allowed to write locally (or only write to temporary storage), run unsafe code, or whatever, depending on the permissions you give it.

    4. Re:Why no tainted data in either runtime? by Jobe_br · · Score: 1

      Yes, you're right. However, I think part of the parent post's point is that in Struts (and other frameworks), the framework has made it dead-easy to do this validation. Trivial, really. And every book and tutorial I've seen covers it, so really - there's no reason not to do it, even within the managed VM.

      However, per your example, and my experiences, doing the same rigorous validation and manipulations in C is painful, quite.

  29. Whiny by 5n3ak3rp1mp · · Score: 4, Funny

    I can't help feeling that some small percentage of this type of back-and-forth is something like a junior-high whiny geek arguing about how the Micro Channel bus architecture is better than ISA and that , incidentally, Apples are utterly irrelevant. ...Oh, wait. That geek was at one time a friend of mine, and this was circa 1985, and this was an actual discussion. ;) (hi, don ulrich! i still use a Mac, and Apple still exists! where's your precious PS/2 micro-channel NOW?!?! nyaaah, nyaaah!!)

    1. Re:Whiny by man_ls · · Score: 1

      Being superior in terms of technical specifications, and market forces, are very different.

      Microchannel Architecture was a 32-bit bus far ahead of its time, it was very fast, but IBM kept the specs so tightly controlled that MCA devices were expensive as hell, and as a result, not widely produced.

    2. Re:Whiny by 5n3ak3rp1mp · · Score: 1

      I totally understand. But while my geeky friend was blabbing about MCA, I was trying to convey my awe because the Mac OS (at the time, and before the onslaught of nubile women started beating down my door*) was THE MOST AMAZING thing I had ever seen in my entire short life. I mean literally, this thing existed when green-on-black terminal-esque interfaces were still in vogue (think: IBM PC XT with DOS)

      I guess I got "Steve'd" REAL early on ;)

      *slight exaggeration

  30. the FUD comes from Gosling by jeif1k · · Score: 2, Insightful

    To use JNI inside of an applet, it needs to be signed with the DLL/shared library pre-installed in lib.

    And the equivalent is true for C# "unsafe" code: there are restrictions on where it can be run from and what can run it.

    So, the topic of "Huge Security Hole in Solaris and JVM" is alarmist and FUD, considering that to get outside of the sandbox, you need to jump through serious configuration hoops.

    The FUD is the nonsense Gosling was spewing about C#. Box is responding with hyperbole (he says so explicitly) to demonstrate how absurd Gosling's argument is.

    Unfortunately, creating FUD seems to be a major occupation at Sun these days, and the targets are Sun's biggest competitors: Microsoft and Linux.

    1. Re:the FUD comes from Gosling by micromuncher · · Score: 1

      The original argument Gosling had was how easy it was to produce something "unsafe" from legacy code. zdNet article My argument is Box's take on the original article's title, because it's just fuel for the m$ minions to go Java bashing.

      So flag me as troll/flamebait minions! I fart in your general direction.

      --
      /\/\icro/\/\uncher
    2. Re:the FUD comes from Gosling by jeif1k · · Score: 2, Interesting

      The original argument Gosling had was how easy it was to produce something "unsafe" from legacy code.

      No, Gosling wasn't complaining about lack of safety, he was complaining about lack of security. He keeps confusing the two issues, and you apparently do too.

      There is nothing wrong with producing something either unsafe or unsecure from legacy code: unlike Java, .NET is a serious desktop platform. Desktop applications are trusted, and hence there is no problem with them running legacy code in a trusted mode. Lack of a good migration path from legacy code to Java is one of the big problems with Java.

      On the other hand, .NET enforces the same sandboxing and trust model as Java when it comes to applets and remote code, so there are no security problems arising from the ease with which you can migrate code to it.

      because it's just fuel for the m$ minions to go Java bashing.

      Gosling started this, Box responded. Box's response was entirely accurate and appropriate.

      As for "m$ minions", I am not using .NET because I don't want to tie myself to Microsoft platforms. But Java, at this point, is technologically and legally such a disaster that it is not a reasonable choice for most applications. Java deserves every bashing it gets, from M$ as well as from long-time Java users like me.

    3. Re:the FUD comes from Gosling by julesh · · Score: 1

      I am not using .NET because I don't want to tie myself to Microsoft platforms.

      Seeing as there are non-MS implementations of almost all of the .NET platform, that's a daft argument.

    4. Re:the FUD comes from Gosling by jeif1k · · Score: 1

      Seeing as there are non-MS implementations of almost all of the .NET platform, that's a daft argument.

      Depends on what you mean by ".NET platform.". Strictly speaking, "the .NET platform" is C# together with all of Microsoft's APIs. The .NET implementations for other platforms are still incomplete, and it is unclear whether they will be able to remain compatible with Microsoft .NET.

      However, what I do consider a good choice is Mono+Gnome: that combination gives you all the advantages of the C# language, together with a complete set of proven, mature open source APIs. Furthermore, Mono+Gnome runs on all major operating systems.

  31. Just further proof... by CptSkippy · · Score: 0, Troll

    Just further proof that when Microsoft sat down to write .NET they took their JVM (that Sun defeated in the courts) and did some keyword replacements on the source and came up with C#.

  32. Neither is really a security hole.... by Jaime2 · · Score: 5, Interesting

    Let's take a look at how each technology can become a security hole: By remote execution of content presumed to be in a "sandbox".

    .NET: Since unmanaged code is turned off by default for remotely loaded code, it will not be run by an unexpected trip to a web page.
    Java: Since JNI won't work by default under the same circumstances, the newest virus won't be injected into your system by an evil web page.

    Anything else is simply an architectural choice. MS likes to preserve compatibility while allowing you to move forward as quickly as posible. Sun wants you to rewite stuff in Java (for the most part), so the new stuff is more secure, but there will be more old stuff floating around that is still unsecure because we won't yet have found time to port it.

    BTW, Code Access Security in .NET is sophisticated enough to allow some apps to use unmange code, but not others, or some users, or software from a certain publisher, and a bunch of other options as well. You don't have to simply "turn on unmanaged code". They even have a simply way to allow software publishers to communicate these settings to customers instead of letting Joe Blow admin decide to simply turn off security to make it work.

    In summary, both technologies allow you to blow your own foot off if you aim the gun properly and squeeze the trigger. So what -- we were allowed to do that before these technologies came along and preventing you from being able to blow your own foot off will only slow adoption and cause more feet to be blown off.

    1. Re:Neither is really a security hole.... by Anonymous Coward · · Score: 0

      Java by default doesn't use a sandbox. It runs with all permissions enabled.

      I'm not 100% by what you mean by "remotely loaded code." Java applets run in a sandbox. Java Web Start will start a sandbox.

      However, if you run a Java JAR file through a fileserver, it will not run with a sandbox and can, conceivably, start running native code with no restrictions. (Think "extract DLL to Windows PATH".) .Net appears to be safer than Java. Java by default uses no sandbox. Java contains only "by VM" security permissions - either everything in the VM can use JNI, or nothing can. (Actually, this isn't true, but you'd have to write your own classloader to make it not true, you can't configure it through the default Java system. In effect, it is true.)

  33. I don't see the big fuss by Rocko+Bonaparte · · Score: 2, Insightful

    Some people just have to do low-level stuff in a high-level application. People can write malicious code for that, but that's the price you pay.

    The little bit of C# I've looked at has shown that .NET does a lot to reduce the amount of old-fashioned pointers you need. Most of that has been wrapped up into things like references and delegates, which can be tracked and managed.

    They could have also prevented C++ from coexisting with the .NET framework, but I think that would have reduced a huge selling point. .NET is more than just a VM, and it's trying to solve a lot of problems. C++ should be able to take advantage of it.

    I think people are just complaining is on the assumption that .NET will become the next overwhelming thing, and it's VM will be widely adopted--hence the biggest target for attacks. It's very possible to write a JNI exploit that the naive user may also run. Ultimately, accountability still resides with the end user, but these higher-level languages have reduced the amount of stuff the end user has to track.

    --
    No I'm not trolling.
    1. Re:I don't see the big fuss by m50d · · Score: 1

      It's integration that's the difference. And to my mind .NET comes off much better. Because like it or not, you will need to use raw C at some stage, and if you can put it directly into your application, you're less likely to make a mistake passing things than with JNI. It feels strange to be rooting for MS, but in this case they really are the better option.

      --
      I am trolling
  34. I can already see it by Hyksos · · Score: 0, Offtopic

    Quite a cool surname... Box. I bet that most slashdotters would call his family the Boxen :P

  35. What Mac bus in 1985? by swb · · Score: 1

    Did any Mac in 1985 even have an expansion bus?

    I'm not including the XL because it was a Lisa not a Mac, and the Lisa expansion slots were more useless then than ISA is today.

    I'll agree with your main point, though.

    1. Re:What Mac bus in 1985? by 5n3ak3rp1mp · · Score: 1

      Yeah, there was no Mac expansion bus until NuBus with the Mac II in '87. (I've seriously been using Macs consistently since the 128k Mac Plus in 12/84.) But my friend's point at the time was along the lines of, "Only REAL computers have expansion buses". My retort of "Duude, but you have to check out this mouse thing, and the windows and menus. And it has a 4 VOICE DIGITIZED SOUND chip!" seemed to fall on deaf ears because it wasn't as buzzword-friendly.

      Even at the tender age of 11-12, REAL geeks are already having architecture arguments ;) (thankfully, I seem to have adjusted better than my friend)

  36. Apologetics by Anonymous Coward · · Score: 1, Interesting

    5. One serious hole is enough. Both Apache and IIS have suffered these in the past and probably will do in future (well, until Gosling rewrites Apache in Java ;-)

    When you see the first Apache-based worm which has 15 different potential attack vectors-- which nimda did-- you may make this argument. Not until then. Yes, one vulnerability may be all you need. But the others, ah, certainly help, especially considering that the more critical vulnerabilities are out there, the less likely all extant installations have patched them all.

    I also find it very wierd that you try to use both "virus writers use microsoft products" and "virus writers hate microsoft" as excuses for IIS's worm problem. Wouldn't there be a slight problem with those two overlapping?

    Aside from this, believe it or not, worms are not the only thing out there which make use of security exploits, and the other things don't fall prey to the situations you describe. IIS's poor security track record did not begin with the worm problem. the worm problem just threw it into such sharp relief it could no longer be ignored.

    1. Re:Apologetics by Anonymous Coward · · Score: 0

      I also find it very wierd that you try to use both "virus writers use microsoft products" and "virus writers hate microsoft" as excuses for IIS's worm problem. Wouldn't there be a slight problem with those two overlapping?

      You're new here, aren't you?

      We all hate Microsoft, but we all use Windows. We all hate the MPAA and the RIAA, but we like the movies and music they produce. (This is for small values of "all".)

      In some cases it is a misguided hate, and we actually like their products (but love to complain about them). In some cases it is the result of monopoly power and we have no choice (which makes the hate stronger). In some cases it is about being good professionals, and we can say exactly why we hate them because we have evaluated them repeatedly.

      Generally, rather than not use those products, we just obtain them illegally. That's stickin' it to the man!

    2. Re:Apologetics by Anonymous Coward · · Score: 0

      We all hate Microsoft, but we all use Windows. We all hate the MPAA and the RIAA, but we like the movies and music they produce. (This is for small values of "all".)

      Is that so?

      In that case, may I venture to hypothesize that perhaps squiggleslash's assertion that virus writers both hate Microsoft and use their products is not actually based on any evidence or real-world knowlege, but simple projection as a slashdotter-- expecting that since some slashdot.org readers feel this way, so must "virus writers"?

    3. Re:Apologetics by squiggleslash · · Score: 1
      First, let me say I think the GP hit the nail on the head.

      Second, I project real life. Virus writers are, given the MASSIVE market share of Windows, likely to be Windows users themselves.

      And generally, most people I know, regardless of whether they're geeks or not, are not especially fond of Microsoft. Most are neutral, many dislike them. They dislike Microsoft because they use Windows.

      And geeks, in my experience - which naturally is going to include most virus writers - are especially negative towards Microsoft.

      No, I don't know any virus writers personally, but I'd have to be blind not to notice the way the world is.

      --
      You are not alone. This is not normal. None of this is normal.
    4. Re:Apologetics by squiggleslash · · Score: 1
      It's interesting how everyone who wants to jump on anyone pointing out the flaws in the "IIS proves that unpopular systems are targets too" argument rarely bother to consider the context, and usually just accuse anyone making the argument of being Microsoft apologists. A quick look at my posting history would tell you otherwise.

      The fact is: until those of you who ignore the degree to which platform marketshare affects virus writers actually open your eyes and look at what's happening, you'll continue to avoid attacking the problem. You'll install GNU/Linux and Apache in the belief that by doing so, you're some how securing yourself because, some how, those products are better written.

      One bug is all it takes. I don't care if NIMDA exploited six million, the fact is if there's a viable root exploit, it can be exploited. And once the market figures change, you'll be just as vulnerable.

      Right now I'm looking most of all not at the web servers, who at least benefit from the fact that the majority of Apache admins tend to be relatively clued up compared to IIS admins (see point 1), but at Apple users. As an OS X user, I'm seriously concerned about the number of people who have bought your argument and really belief OS X isn't going to have just as many attacks once it gains marketshare - as it probably will do now the Mac mini is out. Those people are going to make it harder for everyone. Just as the "experts" who used to claim you couldn't get a virus via email made sure nobody was prepared for these kinds of things, so you who argue that there's something about Microsoft's products that makes them vulnerable that just isn't true about anyone else's are going to leave non-Microsoft users vulnerable.

      Stop it. Think about what you're arguing. I don't like Microsoft either, but I'm not going to spend my entire life in some permanent 1984ish hate, arguing advocacy for the sake of it, as you are.

      --
      You are not alone. This is not normal. None of this is normal.
    5. Re:Apologetics by Anonymous Coward · · Score: 0

      I will not argue that people will attempt to attack OSX. I'd be honestly surprised if they never succeeded. However your case still does not hold water. OSX and Apache are both designed to prevent a lot of problems.

      Many of the more common attacks on Ms Windows cannot work simply because OSX does not run users as root/administrator by default. OSX has some excellent design underneath that prevents many other problems. For starters they used the prooven in the real world BSD system as a basis. (heavily modified)

      Apache has prooven itself in the real world. 60% market share, and it isn't attacked often.

      Now running Apache 1.0 or OSX 10.0 is asking for trouble, just like running the IIS that came with Windows 2000 is asking for trouble. However all of the above is out of date.

    6. Re:Apologetics by Anonymous Coward · · Score: 0

      It's interesting how everyone who wants to jump on anyone pointing out the flaws in the "IIS proves that unpopular systems are targets too" argument

      What I am primarily interested in is that your attempts at "flaws" here are ridiculously weak and shotgun-style. None of them do anything to refute the simple fact that despite a smaller installed base than Apache, IIS is a more potentially fruitful target for system cracking. "Well, the virus writers felt like writing an IIS virus" or "well, it's not IIS's fault, it's IIS's users fault" don't really represent any kind of meaningful "context" unless you can meaningfully demonstrate these things are true in significant numbers; you do not get to speak for virus writers just because you feel like it.

      You do observe correctly that there is a technical barrier in writing cross-platform worms, but this is not an insurmountable technical barrier, and it is a technical barrier that has been surmounted in practice previously. This may mean it is easier to construct an effective IIS than Apache worm, but, well, being easy to exploit is the entire problem here isn't it? Besides, even just targetting Apache/x86 and ignoring all other platforms would certainly be enough to get your worm on the map, were Apache software as frequently prone to security problems as IIS; as the lasting power of worms targetting early IIS versions have demonstrated, even a worm that targets a platform/software configuration with a minority installation can have effects which are noticeable internet-wide.

      I have no interest in whether or not you are an OS X user or anything else. I titled my post "apologetics" simply because I know that at this exact moment, you are apologizing for IIS's poor track record regarding worms by trying to claim it is simply a trick of circumstance rather than a function of poor security. I am not interested in you, only what you have said. You apparently have much more interest in attacking me than what I have said, which doesn't really help your argument. "STOP IT, OPEN YOUR EYES, YOU HATE ADVOCATE!" may catch readers' eyes, but it doesn't really say anything.

    7. Re:Apologetics by Anonymous Coward · · Score: 0


      OSX and Apache are both designed to prevent a lot of problems.

      So is Windows. And it's security is very effective if the system is administered properly. The problem is that Windows has made server administration easy so even clueless people can administer it

      Many of the more common attacks on Ms Windows cannot work simply because OSX does not run users as root/administrator by default.

      Agreed. So don't run Windows as an administrator. This is a security best practice.

      OSX has some excellent design underneath that prevents many other problems. For starters they used the prooven in the real world BSD system as a basis. (heavily modified)

      It doesn't provide anything over Windows.

      Apache has prooven itself in the real world. 60% market share, and it isn't attacked often.

      And it's also been compromised in the real world. With that said what is your point?

      Now running Apache 1.0 or OSX 10.0 is asking for trouble, just like running the IIS that came with Windows 2000 is asking for trouble. However all of the above is out of date.

      Yes, it is. And it's been so for over a year and a half. Yet here we have you arguing based on this outdated information. Why is that? Probably because IIS 6.0 has proven itself to be very good security wise.

    8. Re:Apologetics by Anonymous Coward · · Score: 0


      You do observe correctly that there is a technical barrier in writing cross-platform worms, but this is not an insurmountable technical barrier, and it is a technical barrier that has been surmounted in practice previously.

      Example please? The opposite appears to be true:

      http://news.com.com/2100-1001-940989.html

      "Apache worm barely squirms"

      ""This specific implementation...it doesn't pose a large problem because of its focus," said Peter Szor, chief antivirus researcher for Symantec, pointing out that because the worm focuses on FreeBSD, a relatively minor player in the Unix world, few computers would be affected.

      However, there are indications that the flaw exploited by the worm appears in other platforms, which could mean the advent of more damaging worms."

      This is the reason why you don't see a lot of Apache worms. A worm written for one platform is unlikely to work on a different platform (as noted in the article the flaw exists on other platforms but the exploit fails on other platforms).


      as the lasting power of worms targetting early IIS versions have demonstrated

      Why are we discussing early versions of IIS? Microsoft's current version (which I will note has been "current' for over a year and a half) has an excellent track record. Let's discuss the security record of Microsoft's current version shall we?

    9. Re:Apologetics by Anonymous Coward · · Score: 0

      I also find it very wierd that you try to use both "virus writers use microsoft products" and "virus writers hate microsoft" as excuses for IIS's worm problem. Wouldn't there be a slight problem with those two overlapping?

      No, people who Microsoft products are the ones who hate Microsoft. Why else would they? If you never use a Microsoft product, why would you care that one just crashed, losing a few hours of work?

      Personally, since I started using Linux at home, I don't hate them as much as I used to. But I still wish they would go away, so I could get rid of their crap products at work too. My brother uses nothing but Windows. He still believes that Linux is too hard to use, like Bill Gates tells everyone, but he has only negative things to say about Microsoft. I don't remember him saying one positive word since pbrush.exe (not mspaint.exe) was the only program he used.

    10. Re:Apologetics by Anonymous Coward · · Score: 0

      Interestingly, I've noticed very different attitudes to Windows versus Linux. When something goes wrong on Windows, people are quick to anger and blame the OS (even if it's something unrelated, like an application crash). With Linux, people don't generally blame the OS, but rather themselves or the hardware (which are usually behind most problems on either OS, actually).

      I've even noticed my attitudes are very skewed: when a hobby OS like Linux or BSD has trouble on my systems (power management, for example, rarely works properly), I just accept it because they're volunteer efforts. Since I paid for Windows (as part of the price of the PC), I expect it to work, and tend to get annoyed when it doesn't, even though it's usually my own fault (e.g. for installing unsigned drivers).

      I've also run into a lot of non-technical people who've never used Linux (and would probably hate it if they had), but think it's an almost magical system that would run perfectly and somehow solve all their computer problems, if only they knew how to use it.

  37. You can't be serious by Anonymous Coward · · Score: 0

    "Get out of your web services, connect to database world."

    Dude. Maybe I'm misunderstanding you, but you use JDBC, and if you use a real J2EE implementation, the virtual machine handles that portion as well.

    Java and Solaris are an order of magnitude safer than .NET. Only somebody with an agenda thinks otherwise.

  38. Ah, yes... SOAP... by Anonymous Coward · · Score: 2, Interesting

    "See, it's XML over HTTP, so no need to change your firewall configuration". Security? Ah!

    And Microsoft bought into it because they needed something to interoperate with the rest of the world, and they couldn't do a 180 and use CORBA without "looking bad".

    And now we get that XOP turd (discussed here [slashdot.org]), because somebody wisened up and realized that XML was just bad at byte framing, and, yes, we need binary data.

    1. Re:Ah, yes... SOAP... by Anonymous Coward · · Score: 0
      And Microsoft bought into it because they needed something to interoperate with the rest of the world, and they couldn't do a 180 and use CORBA without "looking bad".

      C'mon, no one could use CORBA without looking bad!

  39. From the 'Yeah, well, duh!" department by scovetta · · Score: 2, Interesting

    JNI is an absolutely necessary part of Java. How do you think System.out.println() really works? Down through the (many) layers of calls within standard Java classes, you eventually get to a JNI call. In fact, without JNI, Java wouldn't be able to access the network, files, console, etc. It's like saying the keyboard is responsible when you type format c: (or when you click-click-click for the younger generation).

    --
    Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. --Nietzsche
    1. Re:From the 'Yeah, well, duh!" department by spongman · · Score: 1
      or when you click-click-click for the younger generation
      err, that would be "double-click-right-click-click-click-click..."

      OH SHIT!!!

  40. Re:I don't think anyone really read what Gosling s by X · · Score: 1

    A brilliant point... except that a) the real problem isn't the JNI code messing with the VM, and b) you can do the same thing with .NET.

    --
    sigs are a waste of space
  41. We're heading in that direction by Anonymous Coward · · Score: 0
    1. Re:We're heading in that direction by myowntrueself · · Score: 1

      Hopefuly they have the memory hogging under control; somehow it seems a waste to have 4G of ram in an embedded device just to run java

      ;)

      --
      In the free world the media isn't government run; the government is media run.
    2. Re:We're heading in that direction by zipwow · · Score: 1

      Hopefuly they have the memory hogging under control; somehow it seems a waste to have 4G of ram in an embedded device just to run java

      1998 called, they want their joke back.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    3. Re:We're heading in that direction by myowntrueself · · Score: 1

      2005 and its still a joke.

      I manage a bunch of servers that run java applications and they regularly get their memory resources swamped.

      --
      In the free world the media isn't government run; the government is media run.
    4. Re:We're heading in that direction by zipwow · · Score: 1

      It's only a joke in 2005 to those who haven't paid attention since 1998.

      I write Java applications that are moderate in terms of memory consumption, and are high-speed components at the core of our business.

      My friends manage a bunch of servers that run C++ applications, and they regularly get their memory resources swamped.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
  42. C++ support in Java vs .NET by DrXym · · Score: 4, Interesting
    Yes Java supports C++ native calls, but look at how bloody painful it is to do it. You have to define an interface, run it through a stub compiler, implement the stubs and use helpers to marshal types back and forth between C++ and their Java equivalents. It involves lots of files and lots of fiddling about.

    The consequence of this is that no-one uses JNI unless they absolutely positively have to. It's a pain and life is much easier if everything is in Java. Thus with the exception of a few esoteric things such as SWT, most libraries are pure and portable.

    Now contrast this with .NET. Writing native C++ and wrapping it in a garbage collection safe class involves no stub generation and can be done in a single file - the assembly info, interface and gc wrapper can all be specified in situ. Consequently it's a lot easier to pull C++ into a .NET application. MS DevStudio 2003 even has wizards to do it. It is also a lot easier to call DLLs and ActiveX from .NET since MS provide PInvoke and COM Interop to do just that.

    Now on the face of it, this is all well and good, especially if you have a lot of legacy crap to port. But by the same token it means many more .NET apps are tainted than on Java. The problems this causes for portability should be obvious.

    And this is called "Microsoft having their cake and eating it". They can expound portability and present the facade that .NET is cross-platform, when in reality they provide tools and wizards to ensure it remains anything but. Apps that are infested with native instructions and OS-specific calls are by definition unportable.

    Mono demonstrates the problems faced in porting .NET to other platforms. Mono must literally pull in the whole winelib in order to cope with the number of tainted .NET apps that attempt to call out to Win32. And too bad if you're running Mono on a non-x86, non-Linux system since winelib is x86 only (for now).

    And I don't see the situation getting any better. Perhaps if Mono gains momentum it might put the brakes on tainted code, but there is a long way for that to happen. I believe the only way Mono is going to make an impact is if ships with a cross-platform IDE with tools that default to its open source stack. This is almost a reality since ICSharpDevelop & MonoDevelop are both fairly complete IDEs but there is nothing yet which defaults to the open source stack and runs on all major platforms.

    1. Re:C++ support in Java vs .NET by Chembryl · · Score: 1
      All true. But as a developer I have access to the entire call stack when importing my C++ components into .NET. Do I get that with dynamically loaded C++ components with JNI and Java?

      Can I set code access security permissions within the Java VM to deny all other code from execution on my machine? I can in .NET, but its not set by default!

      Anyway this seems like just esoteria to me. More security incidents occur these days due to business illogic, laziness and misconfigurations than from things like dll injection or obscure buffer overflows.

      --
      - This and all my posts are public domain. I am a Physicist. I am not your Physicist. This is not Physically advice
    2. Re:C++ support in Java vs .NET by mibus · · Score: 2, Informative

      And too bad if you're running Mono on a non-x86, non-Linux system since winelib is x86 only (for now).

      From the Darwine FAQ:
      It means that WineLib is now working on Mac OS X, and that developers should be able to recompile their Win32 Apps using WineLib and make them work in Mac OS X.

    3. Re:C++ support in Java vs .NET by DrXym · · Score: 2, Interesting
      I know about Darwine (hence the for now in my original post), but this project is only a port of the Win32 API. That might help for PInvoke but it won't help you if you're invoking unsafe C++ DLLs or other x86 instructions. Phase two of Darwine supposedly integrates winelib with an x86 emulator but it hasn't happened yet.


      But even if / when that occurs it's not ideal. In fact it's terrible. To run .NET apps on the PPC, not only do you need Mono but also winelib and an x86 emulator!


      As a corporate entity MS must be rubbing its hands with glee about this even if some of the CLR purists are probably aghast.

    4. Re:C++ support in Java vs .NET by Anonymous Coward · · Score: 0

      Your information is old, and your premise isn't accurate to begin with.

      Let's start with your information. Mono has abandoned the Wine implementation for SWF in favor of Managed Windows Forms... a pure managed implementation of SWF. While not complete, it's progressing at staggering speeds and is expected to ship this year.

      But, even if there were not a solution to the SWF problem, the premise of your argument is flawed to begin with. MS has never claimed that SWF, or a few other parts of the MS .NET runtime) are portable. These are extension libraries that were never meant to be ported to other platforms. One can argue that a runtime environment with out GUI support is severely lacking, especially when compared to a runtime that includes it, i.e. Java. But this in no way can be used as argument that .NET is non-portable. Portable extensions to *standard* .NET that provide for cross-platform GUIs can always be created.

      In any event, I fail to see how any of this has anything to do with the security of either platform... which sans-FUD is as close to identical as is possible with differing architectures and implementations (i.e. you can find flaws in either, and the chances are great that the number of flaws will approach the same number).

    5. Re:C++ support in Java vs .NET by Anonymous Coward · · Score: 0

      The consequence of this is that no-one uses JNI unless they absolutely positively have to.

      You say that like it's a bad thing.

    6. Re:C++ support in Java vs .NET by spongman · · Score: 1
      to paraphrase: "it's harder to write insecure code, therefore it's more secure."

      sounds like security by obscurity to me...

      that's a good thing, right?

    7. Re:C++ support in Java vs .NET by DrXym · · Score: 1

      Did I? Perhaps you need to re-read what I said.

    8. Re:C++ support in Java vs .NET by DrXym · · Score: 1
      Sorry but it's not FUD. It is true that mono are reimplementing (again) the Windows.Forms layer but that doesn't solve the problem of all the tainted code out there. To do that they either have to link to Winelib to handle the pinvokes, the COM interop and the unsafe C++ classes or they throw an exception.


      And there is lots of tainted code and therefore lots of exceptions. In fact I'd hazard to guess that the majority of non-trivial .NET applications in existence are tainted, even if its in minor ways such as calling a registry function in a certain place.


      Either Mono produces something that works with most of the tainted code, or they become a seamless and better version of .NET, or they produce a compelling open source stack, or they're dead in the water. It's as simple as that.


      I work for a large institution with various .NET projects, and I can absolutely guarantee you that Mono interoperability doesn't even appear on the radar. They're wrapping C++ left and right and consequently their .NET apps are stable as the legacy code underneath it.


      And yes Microsoft has implied Windows.Forms is portable if for no other reason than the namespace it is in - System.Windows.Forms. Why isn't it Microsoft.Windows.Forms?


      As for security. A platform which actively helps someone wrap unsafe code, invoke native methods etc. from a supposedly safe platform is clearly more unsafe than one which doesn't or makes it hard to do.

    9. Re:C++ support in Java vs .NET by julesh · · Score: 1

      Yes Java supports C++ native calls, but look at how bloody painful it is to do it. You have to define an interface, run it through a stub compiler, implement the stubs and use helpers to marshal types back and forth between C++ and their Java equivalents. It involves lots of files and lots of fiddling about.

      You seem to be confusing JNI with the old unstandardised Java 1.0 mechanism. There is no need for stub compilers and type marshalling any more. You just write your code to access the Java data directly, using the provided methods to convert strings and arrays to C++-accessible data or vice versa when you need to access or modify them.

      Having written a type library with about 10,000 lines of JNI code, I can tell you that it isn't really all that difficult.

    10. Re:C++ support in Java vs .NET by julesh · · Score: 1

      Mono demonstrates the problems faced in porting .NET to other platforms. Mono must literally pull in the whole winelib in order to cope with the number of tainted .NET apps that attempt to call out to Win32. And too bad if you're running Mono on a non-x86, non-Linux system since winelib is x86 only (for now).

      I'm not really an expert on .NET programming (I've written a couple of desktop apps and played around a little more extensively with ASP.NET), but I understood the problem to be that the Windows.Forms API was designed directly around the Win32 API and exposes some behaviours of that API that are too tricky to implement without using winelib (such as the Form.DefWndProc method, to which unprocessed events are passed in native Win32 format). No need to use unsafe code to require the use of winelib -- this is a showstopper right here, defined within the framework.

      And too bad if you're running Mono on a non-x86, non-Linux system since winelib is x86 only (for now).

      "You can also build Winelib and Winelib applications on platforms not supported by Wine, typically platforms with a non i386 processor."

      http://www.winehq.org/site/docs/winelib-user/win el ib-requirements

      Perhaps if Mono gains momentum it might put the brakes on tainted code

      As I say, nothing needs to be tainted for it to be a problem. What needs to happen is for people to stop using Windows.Forms. Entirely. I don't expect that to happen any time soon, whether mono takes off or not.

    11. Re:C++ support in Java vs .NET by DrXym · · Score: 1
      When I say stubs I'm referring to having to define a class with native methods, run that through javah and then compile against the class. Then you still have a separate .class and DLL that you must ensure are both accessible.


      I know it's greatly difficult - I've done JNI and JRI before it, but it's still fiddly and a pain compared with .NET. The mindset in Java is to write Java unless you absolutely can't.


      In .NET you can define the interface _and_ the implementation in a single file, which is itself compiled with the unsafe C++ into a single DLL. Add that DLL to your references or register it with the GAC and you're done. With the wizards its even easier.


      Sometimes pain isn't a bad thing since it can guide people along the preferred path which is to write stuff in a portable manner unless it is strictly necessary. The mindset that Microsoft seem to be promoting is that it's easy to port legacy code to .NET - just wrap and call it. Which is great if you're Microsoft, since you can expound cross-platform goodness knowing full well that very few apps will actually be so.

  43. Better colours by Anonymous Coward · · Score: 0
  44. I pity the lowly driverophobe by plinius · · Score: 1

    If you're so afraid of drivers, perhaps you should remove your keyboard driver, and save us all from your false wisdom. A poem for you: He fears heresy Would never put GUI in there Repeats tired cliches

  45. Heh by finkployd · · Score: 3, Funny

    One of the creators of SOAP is lecturing on security, that is quite a laugh. SOAP still stands as the poster child for the "design something first, try to hack on security after the fact" crowd.

    Finkployd

  46. Yah, so! by agent · · Score: 1

    http://www.cultdeadcow.com/cDc_pix/CDC003.JPG

  47. My life my agenda by agent · · Score: 1

    http://www.messyfun.com

  48. Worse: Ignorant FUD comes from Everyone by Chembryl · · Score: 1
    The alarm should really be over the 'It Just Works' features of VC++ 7 & 8. Using this you can effectively recompile any legacy VC++ (be it dangerous or not) straight into a .NET runtime callable wrapper simply by importing its header file. Its very easy to do and is one of the big selling points of .NET

    As far as I remember, JNI simply wraps a C/C++ component's function exports into a standard API whilst security permissions are implemented at component load/runtime.

    If configured correctly, .NET's security model is seems superior. Allowing you to supply policies of trust to your own wrapped code and whilst excluding anyone elses. Of course, as with all things, if you really really want to misconfigure something you *could* use this to really *uck up your employer's systems.

    Disclosure - C# & C++/CLI developer

    --
    - This and all my posts are public domain. I am a Physicist. I am not your Physicist. This is not Physically advice
  49. Re:I don't think anyone really read what Gosling s by Zeinfeld · · Score: 1
    Are we just going to have this continuing debate in which every side is inaccurately reduced to one slashdot-blurb-sized sound bite?

    But the starting point for the flamewar was Gosling doing precisely that.

    I get really tired of security being thrown around to score idiotic debating points. That is what Gosling was doing, if he had bothered to do any research on the .NET security framework he would know that the security mechanisms prevent the type of mixing he was complaining about.

    Don's description of the problem is completely straightforward. There are three possible cases and everyone agrees that Java supports two of those cases. C# adds another case because the designers did not want to have to abandon code management just to avoid the type system.

    --
    Looking for an Information Security student project suggestion?
    Try http://dotcrimeManifesto.com/
  50. Right on.. by d_jedi · · Score: 1

    Goesling's comments made me laugh. .NET can run unmanaged C/C++ code, therefore is unsecure. Well, Java can do the same thing, with JNI (and JNI is necessary in some cases.. anyone know how to read the MAC address of your NIC without it, for example?)

    Essentially, Don's comments are:
    a) .NET is as secure as Java wrt unmanaged code
    b) .NET is more convenient wrt the same

    which is completely correct, IMO.

    --
    I am the maverick of Slashdot
  51. Re:I don't think anyone really read what Gosling s by Anonymous Coward · · Score: 0

    if he had bothered to do any research on the .NET security framework he would know that the security mechanisms prevent the type of mixing he was complaining about.

    Unless your browser is tricked into saving to the local zone, where you can run 'assemblies' that use 'unmanaged' code (ie, ie). Seriously though why did they take good Java names terms like 'safe code' or 'pure java' and rename them as corporate dronespeak like 'managed code'. Yuk.

  52. y'all don't get it by tlord · · Score: 1

    It's funny how, across the aisle, the celebrity hackers in this tale are simultaneously poking fun at the willfully non-technical folks who pay them and the accidentally non-technical folks who worship them in forums like /.. Lucky them. At least they have tenure.

  53. Sun's Official Rebuttal by Anonymous Coward · · Score: 0

    Don Box sucks cocks!

    1. Re:Sun's Official Rebuttal by Anonymous Coward · · Score: 0

      Awww, he's going to be upset that not everyone loves him ... look, he'll put on a special - 'I'm up my own ass' - show for you if you like - sans clothes, in a bath tub, doing a dance - whatever ... just love him ok, coz the guy can't suck cocks if he's up his own ass (can he?)

  54. Secure Programming Class by PerryResearch · · Score: 2, Interesting

    A typesafe language is no replacement for secure programming knowledge, several vendors offer classes in that realm:

    http://www.liveammo.com/LiveAmmo_Secure_Programmin g_Training.htm

    and

    http://www.cerias.purdue.edu/secprog

    --
    ---------- http://www.LiveAmmo.com
  55. Re:It's that darn C and C++ code again.. by m50d · · Score: 1

    Bah, Intercal is easy to write. Reading and maintaining it is another matter, but you can write it no problem. Try Malbooge (sp?) for something hard to write.

    --
    I am trolling
  56. Already answered in another thread. by Concern · · Score: 1

    I don't think I missed the point at all. JNI and unmanaged code are not the same, and I think comparing them is deceptive.

    I went into some detail about this here.

    --
    Tired of Political Trolls? Opt Out!
  57. Gosling Is Right by loobs · · Score: 1
    I think alot of you dont understand what Gosling was trying to say. This whole argument of "you can do the same thing in JNI" is just not true.

    In JNI, to access Java objects, you must do so via JNI function calls. That way, to invoke a Java method, the JVM can verify that the jobject handle you supply is of the correct class and that the method does exist and is valid for that object, therefore maintaining the integrity of all JAVA objects.

    Gosling's point is that in C++, you are able to manipulate .NET objects using C++ classes, and therefore you can easily corrupt them. You can do arbitrary casting in C++. The example he used was an Image. In C++, you could theoretically cast an Image pointer to a String pointer, and start invoking String methods on it and the .NET runtime will attempt to run them, corrupting the data.

    Basically it comes down to this: even the JNI maintains type safety. But in .NET, it is possible to get around it. So his arugment is that Java is therefore a much more secure platform. Ofcourse you could call malicious native code from Java, but any data in Java objects will be safe.

    That being said, I still think .NET is a wonderful platform. It just has its flaws. As does Java. BUt Gosling is just pointing out that their decision to support legacy C++ may have affected the overall design of the platform to allow unsafe operations, just because it is allowed in C++.

    1. Re:Gosling Is Right by Anonymous Coward · · Score: 0

      Basically it comes down to this: even the JNI maintains type safety. But in .NET, it is possible to get around it. So his arugment is that Java is therefore a much more secure platform. Ofcourse you could call malicious native code from Java, but any data in Java objects will be safe.

      Nope. Simply not true.

      Native code can do absolutely anything it likes. The C++ code you call can use pointers to overwrite any bit of memory it so choses. This is the same regardless of whether you are interfacing Java or .NET code. This is precisely what is meant by unverifiable code in the first place.

    2. Re:Gosling Is Right by loobs · · Score: 1
      Yeah thats true. In theory it would be possible to write to some memory location, and maybe you'd overwrite a java object. But how? JNI does not expose direct pointers to its objects. All you get is a jobject reference, which is similar in concept to a Win32 HANDLE. Only the JVM knows how to obtain the actual memory address of the data. But with managed C++, you have a direct pointer to .NET objects. So it is very easy to misuse the pointer, and attempt to use it as one type when infact it might be something entirely different, because C++ has no runtime type checking.

      Gosling is simply suggesting that Microsoft's decision to support C++ means that they had to design the platform to make it possible for the CLR to execute code without verifying it. Whereas the JVM will ALWAYS verify that any JAVA method invokation is valid for any particular object.

      I think its a simple issue of runtime type safety. Thats all. I'd love to learn more about the internal design of the CLR... is that kind of information available?

    3. Re:Gosling Is Right by loobs · · Score: 1

      Id also love to always remember to close my italic HTML tages properly... darn it =)

  58. cliff notes by chochos · · Score: 1

    Gosling: ".NET has huge security holes"

    Box: "well, duh, guess where we copied them from! Now go fix the JVM so we copy your improvements and fix our CLR."

  59. MOD PARENT UP by sproketboy · · Score: 1

    Sheesh I wish I had mod points. :(

  60. Re:I don't think anyone really read what Gosling s by tod_miller · · Score: 1

    Gosling wasn't starting a flamewar. If someones sane ideas on forgetting that unsafe checking ever existed, to try and stop 98.9923% of all problems in the IT world (*cough* those worms that take down the internet in 5 hours).

    Do a seach for uncheck buffer, buffer overflow, and sanity check on your average security alert site.

    The simple check that stops you going from place to place in memory is available to all. If it is so slow in Microsofts impl, and they have to disable it not necessarily to do unsafe ops, but to optimize xml parsing libraries, then they have a problem.

    How do you feel installing something on your new server that has the keyword unsafe on 19 methods running on open ports on your server?

    Of course, making sure that they are safe just takes more time and diligence on the part of the programmer. But building in a few security risks always keeps the customer asking for newer versions.

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
  61. Re:I don't think anyone really read what Gosling s by Anonymous Coward · · Score: 0

    How do you feel installing something on your new server that has the keyword unsafe on 19 methods running on open ports on your server?

    And this is the truth of the matter. People not familiar with C#/.NET see the word unsafe and assume it means the code is doing something bad. It doesn't. Microsoft could've chosen any keyword for this, but they chose such an emotive term because it forces programmers to consider whether they really want to do it that way - after all would you like to call your code unsafe?

    As Don pointed out, the use of "unsafe" is predominantly for dealing with things like interfacing with the SSPI interfaces for native Windows security. To achieve the same thing with Java would involve JNI.

    Gosling really needs to go and read up on the .NET security model and the Java one for that matter, as he either has no idea of how they work or he's deliberately trying to mislead.

  62. yes, but then there is SOAP by steve_l · · Score: 1

    I reviewed two 'how to use Java Web Servies' papers last year that were due for online publication, both were vulnerable to SQL attacks.

    now, this wasnt production code, but if people showing developers how to write a fancy SOAP endpoint to existing code dont mention that there is no validation of data, do you think readers will remember to do it?