Live data from Hacker News

A new CSS-based web attack will crash and restart your iPhone

techcrunch.com

1–10 of 140 posts

Re: A new CSS-based web attack will crash and restart your iPhone

#3
The tweet announcing it: https://twitter.com/pwnsdx/status/1040944750973595649

The code that causes the crash (safe to open): https://gist.github.com/pwnsdx/ce64de2760996a6c432f06d612e33...

The demo itself (causes crash): https://cdn.rawgit.com/pwnsdx/ce64de2760996a6c432f06d612e33a...

Re: A new CSS-based web attack will crash and restart your iPhone

#4
post #2

I have always wondered why Safari crashes can reboot the entire telephone. Doesn't iOS have multiple protection rings or is Safari running at ring 0? Or is it a precaution that inhibits jailbreak research?

Safari does not run at ring zero. However, it can make system calls into the ring-zero kernel and drivers. If there's a bug in the kernel or drivers, that can cause the kernel to crash.

There are other scenarios that don't involve a ring-zero vulnerability but still result in a "reboot". Safari coordinates with other system processes, like the one that shows the home screen. If a web site can cause Safari to cause that process to crash, it would feel like a "reboot", even though no ring-zero code was attacked.

Re: A new CSS-based web attack will crash and restart your iPhone

#5
post #2

I have always wondered why Safari crashes can reboot the entire telephone. Doesn't iOS have multiple protection rings or is Safari running at ring 0? Or is it a precaution that inhibits jailbreak research?

It's prudent to reboot when a privileged component crashes, since the integrity of the code execution has been compromised. A lot of the time a DoS bug in native code is synonymous with "nobody bothered to craft a RCE".

It's unintuitive to many people how many scenarios eventually allow a RCE exploit to be crafted. Check out some null pointer deref RCE's to convince yourself.

Re: A new CSS-based web attack will crash and restart your iPhone

#6
post #5
post #2

I have always wondered why Safari crashes can reboot the entire telephone. Doesn't iOS have multiple protection rings or is Safari running at ring 0? Or is it a precaution that inhibits jailbreak research?

It's prudent to reboot when a privileged component crashes, since the integrity of the code execution has been compromised. A lot of the time a DoS bug in native code is synonymous with "nobody bothered to craft a RCE". It's unintuitive to many people how many scenarios eventually allow a RCE exploit to be crafted. Check out some null pointer deref RCE's to convince yourself.

But why is Safari a privileged component?

Re: A new CSS-based web attack will crash and restart your iPhone

#7
This is basically 3,485 nested s (balanced; same number of s) with width and height both set to 10,000px.

I have no idea is this is an internal DOM overflow or it's because of the tiled background-image. (I don't have an iPhone to test against.)

EDIT: I actually read the article properly :) all 3,485 the have a 10px backdrop-filter set on them.

> He explained that nesting a ton of elements — such as tags — inside a backdrop filter property in CSS, you can use up all of the device’s resources and cause a kernel panic

Fun trivia: ^F for on the GitHub gist page, and Chrome will inch... forward... so... very... slowly... finding... matches. You have to search the raw file if you want it to complete this century.

Re: A new CSS-based web attack will crash and restart your iPhone

#8
post #4
post #2

I have always wondered why Safari crashes can reboot the entire telephone. Doesn't iOS have multiple protection rings or is Safari running at ring 0? Or is it a precaution that inhibits jailbreak research?

Safari does not run at ring zero. However, it can make system calls into the ring-zero kernel and drivers. If there's a bug in the kernel or drivers, that can cause the kernel to crash. There are other scenarios that don't involve a ring-zero vulnerability but still result in a "reboot". Safari coordinates with other system processes, like the one that shows the home screen. If a web site can cause Safari to cause th…

This is a kernel panic, as per the twitter thread.

Re: A new CSS-based web attack will crash and restart your iPhone

#9
post #6
post #5

Earlier quoted context omitted.

It's prudent to reboot when a privileged component crashes, since the integrity of the code execution has been compromised. A lot of the time a DoS bug in native code is synonymous with "nobody bothered to craft a RCE". It's unintuitive to many people how many scenarios eventually allow a RCE exploit to be crafted. Check out some null pointer deref RCE's to convince yourself.

But why is Safari a privileged component?

Because web browsers are trying to sandbox executable code from untrusted (and frequently malicious) sources, I would guess. WebKit/Nitro are trusted to keep that executable memory under very tight control, and if they're crashing they may have failed to.

IIRC it has special privileges that allow it to run a JIT javascript engine.

Re: A new CSS-based web attack will crash and restart your iPhone

#10

The tweet announcing it: https://twitter.com/pwnsdx/status/1040944750973595649 The code that causes the crash (safe to open): https://gist.github.com/pwnsdx/ce64de2760996a6c432f06d612e33... The demo itself (causes crash): https://cdn.rawgit.com/pwnsdx/ce64de2760996a6c432f06d612e33a...

It works!
Post reply on HN