CVE-2025-14104

6.1 MEDIUM

📋 TL;DR

A heap buffer overread vulnerability in util-linux's setpwnam() function allows reading beyond allocated memory when processing 256-byte usernames. This affects SUID login-utils utilities that write to the password database, potentially exposing sensitive memory contents. Systems running vulnerable versions of util-linux with SUID utilities are affected.

💻 Affected Systems

Products:
  • util-linux
Versions: Specific vulnerable versions not specified in CVE, but affected versions are those before patches in RHSA-2026 advisories
Operating Systems: Linux distributions using vulnerable util-linux versions (particularly RHEL-based systems)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where SUID login-utils utilities are present and can be executed by users. The vulnerability triggers specifically with 256-byte usernames.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Information disclosure of sensitive memory contents including passwords, keys, or other credentials from adjacent memory regions, potentially leading to privilege escalation or lateral movement.

🟠

Likely Case

Information disclosure of limited memory contents, possibly causing application crashes or exposing non-critical system information.

🟢

If Mitigated

Minimal impact with proper memory protections and exploit mitigations in place, potentially causing only application instability.

🌐 Internet-Facing: LOW - This requires local access and specific SUID utility execution, making remote exploitation unlikely.
🏢 Internal Only: MEDIUM - Local attackers with user access could exploit this to read sensitive memory contents, though exploitation requires specific conditions.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM - Requires local access, specific username length, and execution of affected SUID utilities.

Exploitation requires crafting a 256-byte username and triggering the vulnerable code path through SUID utilities.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions patched in RHSA-2026:1696, RHSA-2026:1852, and RHSA-2026:1913

Vendor Advisory: https://access.redhat.com/security/cve/CVE-2025-14104

Restart Required: No

Instructions:

1. Update util-linux package using your distribution's package manager. 2. For RHEL/CentOS: 'yum update util-linux' or 'dnf update util-linux'. 3. For Debian/Ubuntu: 'apt update && apt upgrade util-linux'. 4. Verify the update completed successfully.

🔧 Temporary Workarounds

Remove SUID bits from affected utilities

linux

Temporarily remove SUID permissions from login-utils utilities to prevent exploitation while maintaining functionality for most users.

chmod u-s /usr/bin/login
chmod u-s /usr/bin/su

Restrict username lengths

linux

Implement system-wide restrictions on maximum username length to prevent triggering the 256-byte condition.

echo 'maxlen 255' >> /etc/security/limits.conf

🧯 If You Can't Patch

  • Implement strict access controls to limit who can execute SUID utilities
  • Deploy memory protection mechanisms like ASLR and stack canaries to reduce exploit effectiveness

🔍 How to Verify

Check if Vulnerable:

Check util-linux version and compare against patched versions in Red Hat advisories: 'rpm -q util-linux' or 'dpkg -l util-linux'

Check Version:

rpm -q util-linux --qf '%{VERSION}-%{RELEASE}\n'  # RHEL/CentOS  or  dpkg -l util-linux | grep ^ii  # Debian/Ubuntu

Verify Fix Applied:

Verify util-linux package version matches or exceeds versions listed in RHSA-2026:1696/1852/1913 advisories

📡 Detection & Monitoring

Log Indicators:

  • Failed authentication attempts with unusually long usernames (256 bytes)
  • Application crashes in login-utils utilities
  • System log entries showing memory access violations

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

source="auth.log" AND (username_length>=256 OR "buffer overread" OR "segmentation fault" AND process="login" OR process="su")

🔗 References

📤 Share & Export