CVE-2021-46828
📋 TL;DR
This vulnerability in libtirpc allows remote attackers to exhaust file descriptors by exploiting mishandled idle TCP connections, potentially causing denial of service through infinite loops in svc_run. It affects any system using vulnerable versions of libtirpc for RPC services. The impact is primarily on availability rather than confidentiality or integrity.
💻 Affected Systems
- libtirpc
- systems using libtirpc for RPC services
📦 What is this software?
Libtirpc by Libtirpc Project
⚠️ Risk & Real-World Impact
Worst Case
Complete denial of service for RPC-dependent services, potentially affecting authentication (NIS), file sharing (NFS), or other critical infrastructure services that rely on libtirpc.
Likely Case
Service degradation or crashes of applications using libtirpc, leading to intermittent availability issues for RPC-based services.
If Mitigated
Limited impact with proper network segmentation and connection rate limiting, though vulnerable systems remain at risk of DoS.
🎯 Exploit Status
Exploitation requires establishing TCP connections to vulnerable RPC services but doesn't require authentication. The attack is straightforward - establishing and maintaining idle connections to exhaust file descriptors.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.3.3rc1 and later
Vendor Advisory: https://lists.debian.org/debian-lts-announce/2022/08/msg00004.html
Restart Required: Yes
Instructions:
1. Update libtirpc package to version 1.3.3rc1 or later. 2. For Debian/Ubuntu: apt update && apt upgrade libtirpc. 3. For RHEL/CentOS: yum update libtirpc. 4. Restart affected services using libtirpc.
🔧 Temporary Workarounds
Connection rate limiting
linuxLimit TCP connections to RPC services using firewall rules or connection rate limiting
iptables -A INPUT -p tcp --dport [RPC_PORT] -m connlimit --connlimit-above 50 -j REJECT
File descriptor limits
linuxIncrease file descriptor limits for processes using libtirpc to delay exhaustion
ulimit -n 65535
Edit /etc/security/limits.conf to increase nofile limits
🧯 If You Can't Patch
- Implement strict network segmentation to isolate RPC services from untrusted networks
- Monitor for abnormal connection patterns to RPC services and implement automated blocking
🔍 How to Verify
Check if Vulnerable:
Check libtirpc version: dpkg -l | grep libtirpc or rpm -qa | grep libtirpc
Check Version:
dpkg -l libtirpc* 2>/dev/null || rpm -q libtirpc 2>/dev/null || pkg info libtirpc 2>/dev/null
Verify Fix Applied:
Verify version is 1.3.3rc1 or later: libtirpc --version or check package version
📡 Detection & Monitoring
Log Indicators:
- High number of TCP connections to RPC ports
- Process crashes or restarts of RPC services
- svc_run process consuming high CPU without progress
Network Indicators:
- Unusual number of idle TCP connections to RPC ports (typically 111, 2049 for NFS)
- Connection attempts from single sources maintaining many open connections
SIEM Query:
source_port=111 OR dest_port=111 OR source_port=2049 OR dest_port=2049 | stats count by src_ip | where count > 50
🔗 References
- http://git.linux-nfs.org/?p=steved/libtirpc.git%3Ba=commit%3Bh=86529758570cef4c73fb9b9c4104fdc510f701ed
- https://lists.debian.org/debian-lts-announce/2022/08/msg00004.html
- https://security.gentoo.org/glsa/202210-33
- https://security.netapp.com/advisory/ntap-20221007-0004/
- https://www.debian.org/security/2022/dsa-5200
- http://git.linux-nfs.org/?p=steved/libtirpc.git%3Ba=commit%3Bh=86529758570cef4c73fb9b9c4104fdc510f701ed
- https://lists.debian.org/debian-lts-announce/2022/08/msg00004.html
- https://security.gentoo.org/glsa/202210-33
- https://security.netapp.com/advisory/ntap-20221007-0004/
- https://www.debian.org/security/2022/dsa-5200