Live data from Hacker News

iMessage: Malformed Message Bricks iPhone

bugs.chromium.org

201–210 of 279 posts

Re: iMessage: Malformed Message Bricks iPhone

#201

Lazy developers throw exceptions, good developers return errors. Exceptions should be exceptional. I'll use URL to this bug in my next comment-holywars to prove this point. Yes, it takes much less code to throw an exception in hope some code will catch it, but while compiler (not runtime) doesn't check it - this technique is not safe. So we should return errors, check them and handle - sometimes it means returning er…

Crashing a program is often safer for unexpected conditions than hoping your error handling will recover from it? Have you tested every combination of state + error and made sure your app is robust for each situation?

1) Quite the contrary. And there is no "hope" - you either write code to recover or you throw an exception (and then there is a "hope" that some other code will catch it), it's just different approaches.

2) Yes, it's not so difficult. Writing tests, for example, also takes time - it's not a reason to don't write tests.

Re: iMessage: Malformed Message Bricks iPhone

#202

Earlier quoted context omitted.

Doesn't that date back to IRC?

irc has kicking / banning and kickbanning.. not necessarily booting (unless you used it as lingo) and certainly not HTML parsing.

IRC totally did have "booters" back in the old day, that would cause mass disconnects.

Re: iMessage: Malformed Message Bricks iPhone

#203
post #34

This brings back old memories from hardening the sms/text parsers of feature phones of yesteryear. There it wasn’t entirely uncommon that when you sent a malformed sms-deliver PDU (e.g. text message) to the phone and crashed parser that tried to decode it, it took also the phone down before it could ack the message back to SMSC. Which of course meant that as soon as phone was turned on and it registered to network, t…

Yes, Sony Ericsson A200 had a bug in SMS picture decoding (old, monochorme, pre-MMS one) which was easily craftable into an exploit if carriers were allowing multipart SMS. Guess what cell carriers did back then? Yes, they disabled multipart SMS

What else could they do?

Re: iMessage: Malformed Message Bricks iPhone

#204

Earlier quoted context omitted.

Yes, Sony Ericsson A200 had a bug in SMS picture decoding (old, monochorme, pre-MMS one) which was easily craftable into an exploit if carriers were allowing multipart SMS. Guess what cell carriers did back then? Yes, they disabled multipart SMS

What else could they do?

Filter. Spam detection wasn’t exactly a novel idea back then either.

Re: iMessage: Malformed Message Bricks iPhone

#206

Speaking as an ex-Apple employee, I'll just point out that a really malicious actor could have used this to harm some significant percentage of the installed iOS infrastructure, and done critical damage to Apple as a company with it. In fact, I don't know the percentage of users still on <12.3, but maybe they still could. A band-aid fix for this one bug should not be where they stop here.

What they should also do is block the malformed message from being sent too. Not sure how to do that, since iMessages are encrypted in transit, but I'm sure there's some way.

Re: iMessage: Malformed Message Bricks iPhone

#207

Speaking as an ex-Apple employee, I'll just point out that a really malicious actor could have used this to harm some significant percentage of the installed iOS infrastructure, and done critical damage to Apple as a company with it. In fact, I don't know the percentage of users still on <12.3, but maybe they still could. A band-aid fix for this one bug should not be where they stop here.

What they should also do is block the malformed message from being sent too. Not sure how to do that, since iMessages are encrypted in transit, but I'm sure there's some way.

Apple controls the CA; it's pretty straight forward for them to check contents.

iMessage really could have been something great (despite apple controlling CA) if they had just opened it up for more devices. Instead WhatsApp wiped the floor with them.

Re: iMessage: Malformed Message Bricks iPhone

#208

Earlier quoted context omitted.

That's not really a coupling issue, but a matter of GPU drivers not generally being hardened against shader/usage bugs. Similar issues have existed on Windows, Linux, etc. browsers with WebGL support.

> That's not really a coupling issue, but a matter of GPU drivers not generally being hardened against shader/usage bugs. You shouldn't be able to crash the whole operating system (not just the display server, display driver, etc.) with an ordinary shader, even if it crashes the shader compiler or causes the GPU not to halt. It's not as though I wrote these shaders in an attempt to crash iOS.

That's not unique to iOS, though. It seems a lot of display drivers on a lot of platforms were developed without ever considering hostile shaders coming in over the network, in an era where mostly only game developers would catch crashes during development? For example https://chromium.googlesource.com/chromium/src/gpu/+/master/...

Re: iMessage: Malformed Message Bricks iPhone

#209

Earlier quoted context omitted.

That's not really a coupling issue, but a matter of GPU drivers not generally being hardened against shader/usage bugs. Similar issues have existed on Windows, Linux, etc. browsers with WebGL support.

> That's not really a coupling issue, but a matter of GPU drivers not generally being hardened against shader/usage bugs. You shouldn't be able to crash the whole operating system (not just the display server, display driver, etc.) with an ordinary shader, even if it crashes the shader compiler or causes the GPU not to halt. It's not as though I wrote these shaders in an attempt to crash iOS.

It might very well just be the OS's recovery procedure when the display server crashes, rather than an uncontrolled crash. It's not the phone is of much use without it, so might as well have a single booting procedure rather than trying to reboot subcomponents individually.

Re: iMessage: Malformed Message Bricks iPhone

#210
post #136

Earlier quoted context omitted.

Back in the day AOL parsed HTML for it's instant messages, a would blue screen any client running windows. It was quite easy to empty chat room(s) using this.

Hahaha on Yahoo we called it booting.

MSN Messenger did a similar thing.

I learned that you could evade their swear word filters in your screen name by using ASCII codes.

So I looked up a table. Beep didn’t work, but NULL would boot everyone on your contact list out.

Post reply on HN