Apple macOS getsockopt Out-Of-Bounds Access Privilege Escalation Vulnerability
The getsockopt system call in Apple macOS did not check that user-supplied options were the right size, leading to an out-of-bounds access. A local attacker who could already run low-privileged code could combine this with other flaws to run code in the kernel.
This vulnerability allows local attackers to escalate privileges on vulnerable installations of Apple macOS. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the getsockopt handler trusted a user-supplied length for an option buffer without validating it against the expected size, causing an out-of-bounds access.
Impact
A local attacker with low-privileged code execution could, in combination with other vulnerabilities, execute arbitrary code in the kernel.
What the attacker needed
Ability to run low-privileged code locally
The fix
The issue was fixed in macOS High Sierra 10.13.6, iOS 11.4.1, tvOS 11.4.1 and watchOS 4.3.2.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A system call is how a normal program asks the operating system's core (the kernel) to do something, such as read network settings. Here the kernel trusted a size value from the program without checking it, so it could read or write memory outside the intended buffer. Someone who already had a small foothold on the machine could use this to gain the highest level of control.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.