Live data from Hacker News

I think I found a Mac kernel bug (2018)

jvns.ca

11–20 of 71 posts

Re: I think I found a Mac kernel bug (2018)

#11
post #7
post #6

Coincidentally, I also stumbled upon a way to make the kernel of Apple Silicon Macs panic and restart while developing the https://lowtechguys.com website. I distilled the problem in a repo so it can be reproduced with a single command: https://github.com/alin23/m1-panic I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura. NOTE: Don't try it without saving…

Do you know what the underlying problematic instruction sequence is? Or the precise location where it halts?

I have no idea how I could find that, given that the system freezes completely.

Maybe tracing the CPU instructions using LLDB might be possible, but the bug is most likely in the kernel code so this would not help much.

Re: I think I found a Mac kernel bug (2018)

#12
post #8
post #6

Coincidentally, I also stumbled upon a way to make the kernel of Apple Silicon Macs panic and restart while developing the https://lowtechguys.com website. I distilled the problem in a repo so it can be reproduced with a single command: https://github.com/alin23/m1-panic I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura. NOTE: Don't try it without saving…

Can you put the panic log text into the repo as well?

Sure, added here: https://github.com/alin23/m1-panic#panic-crash-report-after-...

Re: I think I found a Mac kernel bug (2018)

#13
post #10

Not surprised. I wrote some kqueue code in C once that not only froze the Mac Kernel. It caused the entire computer to crash. I reported the issue to Apple, and never really heard back. They don't really care, as long as all the mac store apps work, in my experience. This was one call to kqueue with incorrect (but not particularly malicious, just normal C silliness) arguments, and boom!

Is it still reproducible?

Re: I think I found a Mac kernel bug (2018)

#14
post #10

Not surprised. I wrote some kqueue code in C once that not only froze the Mac Kernel. It caused the entire computer to crash. I reported the issue to Apple, and never really heard back. They don't really care, as long as all the mac store apps work, in my experience. This was one call to kqueue with incorrect (but not particularly malicious, just normal C silliness) arguments, and boom!

Bugs do get fixed (eventually; they're not always timely about it depending on severity), but Apple's feedback systems are and always have been a black hole. Basically, as a reporter, the only time you hear anything back from Apple about a bug report is if they need additional information; nothing else in their process is visible externally (until you go back and retest a few macOS releases later and your bug is or isn't fixed).

Re: I think I found a Mac kernel bug (2018)

#16
post #10

Not surprised. I wrote some kqueue code in C once that not only froze the Mac Kernel. It caused the entire computer to crash. I reported the issue to Apple, and never really heard back. They don't really care, as long as all the mac store apps work, in my experience. This was one call to kqueue with incorrect (but not particularly malicious, just normal C silliness) arguments, and boom!

Is it still reproducible?

I haven't had a mac in years. This was ~2010.

Re: I think I found a Mac kernel bug (2018)

#18
post #11
post #7

Earlier quoted context omitted.

Do you know what the underlying problematic instruction sequence is? Or the precise location where it halts?

I have no idea how I could find that, given that the system freezes completely. Maybe tracing the CPU instructions using LLDB might be possible, but the bug is most likely in the kernel code so this would not help much.

You can debug the kernel remotely over Ethernet: https://developer.apple.com/documentation/apple-silicon/debu...

If that still fails, virtualization tools provide debugging interfaces you can use to step the execution of the virtualized CPU; e.g. VMware’s “debugStub” feature.

Re: I think I found a Mac kernel bug (2018)

#19
post #6

Coincidentally, I also stumbled upon a way to make the kernel of Apple Silicon Macs panic and restart while developing the https://lowtechguys.com website. I distilled the problem in a repo so it can be reproduced with a single command: https://github.com/alin23/m1-panic I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura. NOTE: Don't try it without saving…

What’s the feedback ID #?

Re: I think I found a Mac kernel bug (2018)

#20
post #6

Coincidentally, I also stumbled upon a way to make the kernel of Apple Silicon Macs panic and restart while developing the https://lowtechguys.com website. I distilled the problem in a repo so it can be reproduced with a single command: https://github.com/alin23/m1-panic I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura. NOTE: Don't try it without saving…

Might have been better to report it to the security people. This sort of thing can be exploitable.
Post reply on HN