Skip to content
Memory corruption Advisory Advanced CVE-2016-9033

Joyent SmartOS Hyprlofs FS IOCTL Native File System path Buffer Overflow Privilege Escalation Vulnerability

A buffer overflow in the Hyprlofs file system's ioctl handler allows a local attacker to write a null byte out of bounds by supplying a path length exactly equal to MAXPATHLEN. This could lead to privilege escalation or denial of service.

Tyler Bohan Follow

Originally disclosed on Cisco Talos

High 7.0 View original

An exploitable buffer overflow exists in the the Joyent SmartOS OS 20161110T013148Z Hyprlofs file system. The vulnerability is present in the Ioctl system call with the command HYPRLOFSADDENTRIES when dealing with native file systems.

Tyler Bohan, on Cisco Talos

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

Impact

This could potentially lead to privilege escalation or be used as a denial of service.

What the attacker needed

Local access to SmartOS; ability to call ioctl on Hyprlofs

How it was found

  1. Open a file descriptor to the Hyprlofs file system.
  2. Call ioctl with the HYPRLOFS_ADD_ENTRIES command and provide an entry with hle_plen equal to MAXPATHLEN.
  3. The kernel copies the path into a stack buffer and writes a null byte at index MAXPATHLEN, one byte past the buffer.

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 buffer overflow happens when a program writes more data into a fixed-size memory area than it can hold, causing data to spill into adjacent memory. Here, a length check is off by one, so a path of exactly the maximum allowed length causes a single null byte to be written just past the end of a stack buffer. This can corrupt memory and potentially let an attacker gain higher privileges or crash the system.

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.

More by Tyler Bohan

View all

84 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.