5 ms·
Java, just the language,is absolutely more secure. Just be careful what you're using in the JRE else you might negate that gained security[1]. Of course so ma
by neoCrimeLabs 11y ago
Java, just the language,is absolutely more secure.
Just be careful what you're using in the JRE else you might negate that gained security[1]. Of course so many C libraries have vulns too, just not included in one commonly used package that runs on every operating system it supports.
[1] - https://www.cvedetails.com/vulnerability-list.php?vendor_id=93&product_id=19117&version_id=&page=1&hasexp=0&opdos=0&opec=0&opov=0&opcsrf=0&opgpriv=0&opsqli=0&opxss=0&opdirt=0&opmemc=0&ophttprs=0&opbyp=0&opfileinc=0&opginf=0&cvssscoremin=7&cvssscoremax=0&year=0&month=0&cweid=0&order=1&trc=208&sha=dc2bd354d0ef968392f7bac5811742745c04e811 https://www.cvedetails.com/vulnerability-list.php?vendor_id=...
- pjmlp 11y agoAll languages allow to write code with vulnerabilities. Memory safe ones have logical programming errors and possible runtime issues, which is Java's case. C just adds memory corruption to the set of issues one has to worry about.
- nickpsecurity 11y ago"C just adds memory corruption to the set of issues one has to worry about." That's a very casual way to say that C adds an entire class of errors that lets attackers own your machine with the slightest mistake in the most common coding situations. Memory safety is such a huge increase in security over C that it isn't even funny that people use C where not necessary. Type-safety plus good type system gets a start on knocking out data and interface errors. Type systems with context, or just Design-by-Contract, can knock out more interface errors. So, a good type system, type safety, and memory safety should be the baseline for reliable or secure systems. C tosses out the whole baseline in exchange for... running a bit faster or lazy programmers? Note: I'm talking in general rather than building on existing C projects, where using C makes some sense.
- pjmlp 11y agoYeah, I should have let the "just" out. There are a whole class of errors caused by C's memory corruption "feature" that I can happily live without. C tosses safety away, because its designers were lazy to implement a proper compiler given what the computing world was doing outside AT&T. Bjarne wasn't also quite found of it, but he had to compromise to get adoption, given his employer. https://www.youtube.com/watch?v=ZO0PXYMVGSU https://www.youtube.com/watch?v=ZO0PXYMVGSU
- nickpsecurity 11y agoThanks for the link. It's all good so long as you keep countering the myth of C having good design like you did here [1] and I backed you up on here [2]. Their house of cards (i.e. ideology) will come down easier as we continue kick its foundation out from underneath. ;) Far as resource constraints, there's been interesting work along those lines, too. I mean, we have obvious Modula-2/Lilith project. However, it was cool that a recent project used ATS language to program an 8-bit microcontroller. That's on top of safe ASM, embedded DSL's like Ivory language, and stuff like Cyclone. C proponents' excuses for its design advantages are getting thin, thin, thin... [1] https://news.ycombinator.com/item?id=10268614 https://news.ycombinator.com/item?id=10268614 [2] https://news.ycombinator.com/item?id=10273656 https://news.ycombinator.com/item?id=10273656
- pjmlp 11y agoThere is some interesting content here regarding how older languages were ignored in the process. History and Spirit of C and C++ @ NDC 2015 https://vimeo.com/132192250 https://vimeo.com/132192250
- nickpsecurity 11y agoAppreciate it. Watching it now as I have some spare time. Seems good so far.
- nickpsecurity 11y agoFinished. Was a pretty good video. I did a write-up of it below on Schneier's blog to justify eliminating C because it's provably Bad by Design. All due to limitations of the PDP's and, new to me, the EDSAC. Also more of a rip-off of BCPL than I thought before. https://www.schneier.com/blog/archives/2015/10/friday_squid_bl_497.html#c6708072 https://www.schneier.com/blog/archives/2015/10/friday_squid_...