News for hackers. Stuff that matters.
Re:Why Is C Faster Than Java (2009) by lelanthran on Monday December 27, 2021 @01:41AM (#29700076)
> Which had nothing to do with Java or how it manages memory. You could have the same vuln in NodeJS or Python.

I think parent was pointing out that the biggest and costliest security exploit ever found had nothing to do with buffer overflows, memory management, etc.

Re:Why Is C Faster Than Java (2009) by sgift on Monday December 27, 2021 @02:08AM (#29700208)
It seems almost impossible to say if log4shell was bigger or more costly than Heartbleed or the Debian OpenSSL bug (there are probably still keys out there made with the damaged randomness). Log4shell is just in recent memory.
Re:Why Is C Faster Than Java (2009) by lelanthran on Monday December 27, 2021 @02:41AM (#29700378)
> It seems almost impossible to say if log4shell was bigger or more costly than Heartbleed or the Debian OpenSSL bug (there are probably still keys out there made with the damaged randomness). Log4shell is just in recent memory.

Seems pretty clear to me - Heartbleed (and all the other serious memory exploits) required a great deal of skill and a lot of luck to exploit, and in return you either don't get a remote execution, or you get a very tiny chance of a remote execution.

In comparison, log4j is about as easy to exploit into an RCE as it is to use curl.

Log4j is a guaranteed remote-execution exploit just by filling in a user facing form with the correct URL, while memory exploits are not guaranteed to result in an RCE, requires more skill than simply typing into an input box or an email.

Re:Why Is C Faster Than Java (2009) by brabel on Monday December 27, 2021 @04:06AM (#29700825)
> Log4j is a guaranteed remote-execution exploit just by filling in a user facing form with the correct URL

This is only true of systems that were using very outdated JVM versions... on the newer ones (we're talking 2016 or newer JDK releases, not like last month), you would need to pull off a serialization exploit to indirectly get RCE, which is quite a bit harder than sending a HTTP request.

Re:Why Is C Faster Than Java (2009) by srfilipek on Monday December 27, 2021 @08:43AM (#29702441)
> Heartbleed (and all the other serious memory exploits) required a great deal of skill and a lot of luck to exploit, and in return you either don't get a remote execution, or you get a very tiny chance of a remote execution.

Heartbleed wasn't about RCE at all. It was about memory disclosure -- memory that contained secret signing keys. The fallout was that keys needed to be revoked and rotated.

Reading out memory and extracting the secret keys was actually pretty simple. There were multiple POCs available.

Re:Why Is C Faster Than Java (2009) by bajsejohannes on Monday December 27, 2021 @03:56AM (#29700769)
Spectre and Meltdown too. How much performance loss did we have to make up for because of that?
Re:Why Is C Faster Than Java (2009) by bruce343434 on Monday December 27, 2021 @04:31AM (#29700957)
That's to do with CPU speculative execution, not C or Java
Re:Why Is C Faster Than Java (2009) by tored on Monday December 27, 2021 @06:54AM (#29701728)
Actually it does

https://queue.acm.org/detail.cfm?id=3212479

"The root cause of the Spectre and Meltdown vulnerabilities was that processor architects were trying to build not just fast processors, but fast processors that expose the same abstract machine as a PDP-11. This is essential because it allows C programmers to continue in the belief that their language is close to the underlying hardware."

Re:Why Is C Faster Than Java (2009) by bruce343434 on Monday December 27, 2021 @08:13AM (#29702215)
Just because an academicist has an opinion does not make it fact. That quote reads like a blogpost and with its lack of citation it might as well be. Yes, it sounds plausible. but well.

Let's assume it's true: your argument would be "intel made a mistake, but since they would have only made that mistake when doing stuff that appeases C programmers (would they have?), it's actually because of C."

Now, I think this is a bit of a stretch.

ETA: or did you mean that it has to do with C for that reason? in which case, ok, I see how you mean.

Re:Why Is C Faster Than Java (2009) by verall on Monday December 27, 2021 @10:44AM (#29703373)
Oh yea, if not for emulating the PDP-11, processor designers would have no interest in instruction level parallelism.

This article is pretty funny actually:

> On a modern high-end core, the register rename engine is one of the largest consumers of die area and power. To make matters worse, it cannot be turned off or power gated while any instructions are running

Yea, let's just gate off the RAT. What's it for again?

Re:Why Is C Faster Than Java (2009) by will4274 on Monday December 27, 2021 @08:25PM (#29709227)
Java exposed the same abstract machine as a PDP-11 too. The key "PDP-11" thing is that all memory is treated as equally accessible, rather than the reality - i.e. that some memory is in caches on certain cores only and can therefore be accessed more efficiently on those cores.
Re:Why Is C Faster Than Java (2009) by kaba0 on Monday December 27, 2021 @04:12AM (#29700850)
How is it the biggest and costliest security exploit ever? With even the most basic of firewalls a server should absolutely have it is not really exploitable. I’m not trying to downplay it, but I really don’t see how is it even remotely close to some ssh bugs.
Re:Why Is C Faster Than Java (2009) by vbezhenar on Monday December 27, 2021 @04:56AM (#29701095)
Basic firewall allows outgoing connections, so it wouldn't help.
Re:Why Is C Faster Than Java (2009) by Traubenfuchs on Monday December 27, 2021 @05:08AM (#29701154)
I‘d argue that not allowing your servers to make outgoing calls to non whitelisted targets is very basic security.
Re:Why Is C Faster Than Java (2009) by vbezhenar on Monday December 27, 2021 @07:03AM (#29701784)
No, it's not. I can easily configure open ports using firewall-cmd. That is basic security. And there's no dedicated options to configure outgoing calls, there's no sane defaults to start with (I have no idea which targets should be whitelisted: ntp? update servers? anything else?), there's no system-wide integration, like my dnf can choose different mirror every time it runs.

Of course it makes sense to configure outbound white list, but there's no infrastructure in RHEL or Ubuntu and nobody's going to bother with custom scripts for that.

Re:Why Is C Faster Than Java (2009) by varjag on Monday December 27, 2021 @05:35AM (#29701283)
Are we still talking about the bug that relies on poorly chosen defaults?
Re:Why Is C Faster Than Java (2009) by formerly_proven on Monday December 27, 2021 @09:30AM (#29702736)
Do you disable DNS on your servers as well or use a restricted internal-only resolver?