Kernel use-after-free via tty ioctls
FreeBSD
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| FreeBSD FreeBSD |
| No fix yet |
Original description
The TIOCSCTTY ioctl handler drops the tty lock in order to acquire the process tree lock. After reacquiring the tty lock, the handler did not revalidate the state of the terminal, and could proceed to link a terminal that was concurrently being destroyed to the calling process' session.
An unprivileged local user can exploit this race condition to escalate privileges.
From the CVE record · freebsd