Live data from Hacker News

Kernel RCE in iOS/macOS with ICMP

lgtm.com

41–50 of 68 posts

Re: Kernel RCE in iOS/macOS with ICMP

#41
post #4

Can someone explain to me, did I miss the description of the actual bug here? I get there’s a copy, but why is there an under-allocation to start with? Or is that alloc somehow attacker-controlled? Was part of the copy func args controllable? Or was this just an ad?

Pretty sure it was introduced here: https://github.com/apple/darwin-xnu/commit/c10988c130af09087... In this commit a bunch of code was copy-pasted from BSD into ip_icmp.c in icmp_error() to quote IP packet data in icmp error responses. Unfortunately they forgot to copy a line from the BSD source which would prevent the overflow: icmplen = min(icmplen, M_TRAILINGSPACE(m) - sizeof(struct ip) - ICMP_MINLEN); m is alloca…

> Copy-paste programming in core networking code...

There is nothing special about core networking code.

Re: Kernel RCE in iOS/macOS with ICMP

#43

Earlier quoted context omitted.

Really? I found Skia easier to compile than actually use.

It's probably gotten better lately. A few years ago it took me several days to get it built.

So it is not only me.

On my case I ended up giving up and went back to Qt.

Re: Kernel RCE in iOS/macOS with ICMP

#45

Earlier quoted context omitted.

> I find it to be an extremely sad state of affairs when it requires scouring the internet for a blog post from a Darwin engineer to build an outdated XNU :( Large projects at companies tend to be hard to build, simply because it takes a lot of effort to make the build system for something so complex easy. If community contributions aren't particularly valued (which they aren't for XNU), then it's hard to internally…

Really? I found Skia easier to compile than actually use.

One needs to duplicate Google's build infrastructure, which is quite a pain versus other open source projects that rely on more mainstream tooling.

Re: Kernel RCE in iOS/macOS with ICMP

#46

Earlier quoted context omitted.

Pretty sure it was introduced here: https://github.com/apple/darwin-xnu/commit/c10988c130af09087... In this commit a bunch of code was copy-pasted from BSD into ip_icmp.c in icmp_error() to quote IP packet data in icmp error responses. Unfortunately they forgot to copy a line from the BSD source which would prevent the overflow: icmplen = min(icmplen, M_TRAILINGSPACE(m) - sizeof(struct ip) - ICMP_MINLEN); m is alloca…

> Copy-paste programming in core networking code... There is nothing special about core networking code .

Other than being highly security sensitive, written in a language without any regard for security.

Re: Kernel RCE in iOS/macOS with ICMP

#47

How long until somebody builds a device that is basically a pwnplug, which joins wifi networks at major tech conferences, does an nmap for live IPs, and sends this to every device?

As an aside, well ran conference WiFi (and public WiFi in general) won't allow attendees to contact each other over the WiFi network - they will only allow traffic from end user devices towards the gateway, and won't allow hairpin routing on that gateway. I wish more public WiFi was well ran, as many of these same network attacks wouldn't have an opportunity to work in the first place.

Many public WiFis are managed by people buying some routers at the local store and plugging them in.

Re: Kernel RCE in iOS/macOS with ICMP

#49
post #42

Is there a fix for older OSX or should I just install Linux on my 2011 iMac? Yosemite is already quite slow. OpenSuSE 13.2 was really fast on a same generation Mac Mini.

Go ahead. After trying many options I settled on XUbuntu. But any of them will do.

To bad, I liked the older OS Xes.

Re: Kernel RCE in iOS/macOS with ICMP

#50

This looks like a mundane bug and there are countless other undiscovered bugs like this. It doesn’t deserve this huge essay IMHO.

That's the interesting thing about the approach used to find this bug (automatic variant analysis): whilst there are no doubt more bugs to find in XNU, there aren't any more bugs like this.

The article says that the problem was found by codifying the mistake that led to a previous CVE as a query in a logic language called QL, and then running that query over XNU, so if there were any more they would have been found at the same time.

(edit: corrected typography)

Post reply on HN