News for hackers. Stuff that matters.
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by Gigachad on Thursday September 07, 2023 @05:26PM (#37425837)
Android is moving away from C and towards more secure languages. From one of their recent blog posts, the majority of code written for android is now in memory safe languages.
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by nielsbot on Thursday September 07, 2023 @05:38PM (#37425963)
Apple also has memory-safer languages it is moving to:

Swift: A memory-safer systems programming language: https://www.swift.org

Firebloom: A memory-safer C variant: https://support.apple.com/en-il/guide/security/sec30d8d9ec1/...

Not sure what the answer is for existing memory-unsafe code.

Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by ctz on Thursday September 07, 2023 @05:47PM (#37426060)
> Not sure what the answer is for existing memory-unsafe code.

It's an engineering approach that involves writing "A buffer overflow issue was addressed with improved memory handling" an awful lot. Hopefully one day they will finish improving the memory handling!

Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by saagarjha on Thursday September 07, 2023 @08:00PM (#37427414)
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by berbec on Thursday September 07, 2023 @05:38PM (#37425955)
Is the programming language likely the issue here?
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by carstenhag on Thursday September 07, 2023 @05:51PM (#37426097)
Well, theoretically all can be secure (in regards to buffer overflows etc). Some just forbid to shoot you in the arm. And head.
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by tialaramex on Thursday September 07, 2023 @06:13PM (#37426339)
Of course, it's not necessary to use a language where "Give control of your phone to remote attackers" is one of the possibilities at all.

General purpose languages, whether that's something like C or Rust or even Javascript are not the appropriate tool. Turing Completeness is a bad idea from a security point of view, not a wonderful feature.

Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by Gigachad on Thursday September 07, 2023 @06:22PM (#37426426)
Yes, almost all of these major exploits are memory safety related and would be mostly impossible in a memory safe language.
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by btilly on Thursday September 07, 2023 @06:25PM (#37426463)
That's like asking whether it is the lack of a seatbelt that was the issue after sometime died in a car crash.

Well, of course the real issue was the car crash. But wearing a seatbelt would have sure helped!

Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by tialaramex on Thursday September 07, 2023 @05:51PM (#37426099)
And for this problem specifically Android can use WUFFS. WUFFS is a special purpose language for Wrangling Untrusted File Formats Safetly. Trading away generality (the ability to write a program which say, sends email) gets them complete safety and excellent performance.

In Rust we can't trivially write a bounds miss by mistake. But in WUFFS we just can't write a bounds miss at all. Like, that's not a thing in WUFFS, it doesn't compile. You can write your own bounds checks and show WUFFS that works, or you can write code which clearly can't have a bounds miss with no checks, that works too. But you can't just "forget" or "screw up" those won't compile.

This would be frustrating in a general purpose language. WUFFS doesn't have a "Hello, World" program because it lacks both strings and the idea of outputing to the screen. But WUFFS isn't a general purpose language, however it's the correct way to write the code that takes image files we got from some dubious source and processes them.

When Apple announced they wanted to provide proper security for vulnerable iPhone users, this is what that would look like coming from a company which actually cared about security. What you got is what it looks like from a company which prioritised marketing.

Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by saagarjha on Thursday September 07, 2023 @08:02PM (#37427430)
Would any of your comment change if I told you the bug was in a Google image parser that they currently also ship to production?
Re:NSO Group iPhone Zero-Click, Zero-Day Exploit Captured in... by teaearlgraycold on Thursday September 07, 2023 @06:02PM (#37426208)
Google at large is slowly banning use of non memory safe languages. Android in particular is doing well at adopting Rust.