cbcvebase.
CVE-2014-0196
published 2014-05-07

CVE-2014-0196: The n_tty_write function in drivers/tty/n_tty.c in the Linux kernel through 3.14.3 does not properly manage tty driver access in the "LECHO & !OPOST" case…

PriorityP179medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
KEVITWEXPLOIT
CISA Known Exploited Vulnerabilitydue 2023-06-02
Exploited in the wild
EPSS
22.48%
97.4th percentile
The n_tty_write function in drivers/tty/n_tty.c in the Linux kernel through 3.14.3 does not properly manage tty driver access in the "LECHO & !OPOST" case, which allows local users to cause a denial of service (memory corruption and system crash) or gain privileges by triggering a race condition involving read and write operations with long strings.

Affected

47 ranges· showing 25
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debianlinux< linux 3.14.4-1 (bookworm)linux 3.14.4-1 (bookworm)
f5big-ip_access_policy_manager11.1.0 – 11.5.1
f5big-ip_advanced_firewall_manager11.3.0 – 11.5.1
f5big-ip_analytics11.1.0 – 11.5.1
f5big-ip_application_acceleration_manager11.4.0 – 11.5.1
f5big-ip_application_security_manager11.1.0 – 11.5.1
f5big-ip_edge_gateway11.1.0 – 11.3.0
f5big-ip_global_traffic_manager11.1.0 – 11.5.1
f5big-ip_link_controller11.1.0 – 11.5.1
f5big-ip_local_traffic_manager11.1.0 – 11.5.1
f5big-ip_policy_enforcement_manager11.3.0 – 11.5.1
f5big-ip_protocol_security_module11.1.0 – 11.4.1
f5big-ip_wan_optimization_manager11.1.0 – 11.3.0
f5big-ip_webaccelerator11.1.0 – 11.3.0
f5big-iq_application_delivery_controller
f5big-iq_centralized_management
f5big-iq_cloud4.0.0 – 4.5.0
f5big-iq_cloud_and_orchestration

Detection & IOCsextracted from sources · hover to see the quote

pathdrivers/tty/n_tty.c
path/proc/kallsyms
otherTTY_MAGIC=0x5401
otherioctl argument 0xdeadbeef
  • The exploit triggers the vulnerability specifically when TTY line discipline is configured with LECHO enabled and OPOST disabled (LECHO & !OPOST). Monitor for processes setting these termios flags (c_oflag &= ~OPOST; c_lflag |= ECHO) on PTY devices.
  • The exploit reads /proc/kallsyms to resolve kernel symbols commit_creds and prepare_kernel_cred. Unprivileged access to /proc/kallsyms (returning non-zero addresses) is a prerequisite and indicator of exploit conditions.
  • The exploit performs a large number of openpty() calls (ONEOFF_ALLOCS=200 once-off, then RUN_ALLOCS=30 per iteration) to groom kernel slab memory. Anomalous mass PTY allocation by an unprivileged process is a behavioral indicator.
  • The exploit uses a race condition between a pthread writing to the slave PTY fd and a concurrent write to the master PTY fd. Look for concurrent read/write operations on PTY devices with long strings from the same unprivileged process.
  • The exploit overwrites a tty_struct in kernel memory using a crafted header with magic value 0x5401 and a fake kref refcount of 0x1337. Memory forensics or kernel integrity checks may detect this corruption pattern.
  • The exploit issues ioctl calls with the invalid/sentinel argument 0xdeadbeef on PTY file descriptors to trigger the corrupted tty_operations function pointer table (payload). Detect ioctl syscalls with this argument value on tty/pty devices.
  • Successful exploitation results in setresuid(0,0,0) followed by execl('/bin/bash') from a previously unprivileged process. Monitor for privilege escalation events where a non-root process spawns a root shell.

CVSS provenance

nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvdv2.06.9MEDIUMAV:L/AC:M/Au:N/C:C/I:C/A:C
osv5.5MEDIUM
vulncheck5.5MEDIUM
cisa5.5MEDIUM
vendor_debian5.5MEDIUM
vendor_redhat5.5MEDIUM
vendor_ubuntu5.5MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.