CVE-2020-29660
Linux Kernel vulnerability analysis and mitigation

Overview

A locking inconsistency issue was discovered in the tty subsystem of the Linux kernel through 5.9.13. The vulnerability (CVE-2020-29660) affects drivers/tty/ttyio.c and drivers/tty/ttyjobctrl.c, which may allow a read-after-free attack against TIOCGSID. The issue was discovered by Jann Horn and disclosed in December 2020 (Kernel Commit, OSS Security).

Technical details

The vulnerability stems from inconsistent locking of the ->session field in the tty subsystem. Most places protect it using the legacy tty mutex, but certain functions like disassociatectty(), _do_SAK(), tiocspgrp() and tiocgsid() did not implement proper locking. The issue has a CVSS v3.1 Base Score of 4.4 (Medium) with vector AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N (NVD).

Impact

On systems with PREEMPT=y enabled, an unprivileged local attacker could potentially exploit this vulnerability to read 4 bytes of freed memory via TIOCGSID if tiocgsid() is preempted at the right point. This could lead to disclosure of sensitive information (kernel memory) or cause a denial of service through system crashes (Ubuntu Security).

Mitigation and workarounds

The issue was fixed by changing the locking mechanism on ->session such that ttylock() is held by all writers and ctrllock is held by all writers and readers that aren't holding tty_lock(). The fix was implemented in various Linux distributions including Ubuntu, Debian, and Fedora through their respective security updates (Debian Security, Fedora Update).

Community reactions

Multiple vendors and organizations acknowledged and responded to this vulnerability. NetApp rated it as HIGH severity with a CVSS score of 7.8 and provided fixes for affected products (NetApp Advisory). Various Linux distributions treated it as a medium priority security issue and quickly released patches.

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management