CVE-2022-49853

5.5 MEDIUM

📋 TL;DR

This is a memory leak vulnerability in the Linux kernel's macvlan driver that occurs when creating macvlan interfaces in 'source' mode. If the network device registration fails after source MAC addresses have been configured, the kernel fails to clean up allocated memory, leading to gradual memory exhaustion. This affects Linux systems using macvlan interfaces in source mode.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when macvlan interfaces are created in 'source' mode using specific ip link commands. Requires CAP_NET_ADMIN capability.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Sustained exploitation could lead to kernel memory exhaustion, causing system instability, denial of service, or potential kernel crashes.

🟠

Likely Case

Gradual memory leak over time when creating macvlan interfaces in source mode, potentially leading to system performance degradation or out-of-memory conditions.

🟢

If Mitigated

Minimal impact if systems don't use macvlan source mode or have memory monitoring in place.

🌐 Internet-Facing: LOW - Requires local access or ability to create network interfaces, typically not directly exploitable from internet.
🏢 Internal Only: MEDIUM - Could be exploited by local users or processes with CAP_NET_ADMIN capabilities to degrade system performance.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and CAP_NET_ADMIN privileges. The vulnerability is triggered by specific ip link commands with error conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 21d3a8b6a1e3, 23569b5652ee, 685e73e3f7a9, 956e0216a199, 9ea003c4671b

Vendor Advisory: https://git.kernel.org/stable/c/21d3a8b6a1e39e7529ce9de07316ee13a63f305b

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Check your distribution's security advisories for specific patched versions. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Avoid macvlan source mode

linux

Prevent creation of macvlan interfaces in source mode to avoid triggering the vulnerability

# Monitor for macvlan source mode creation
# ip link show type macvlan | grep -i source

Restrict CAP_NET_ADMIN

linux

Limit which users/processes can create network interfaces

# Use capabilities or sudo restrictions
# setcap -r /sbin/ip
# Configure sudoers to restrict ip command

🧯 If You Can't Patch

  • Monitor system memory usage and kernel logs for memory leak indicators
  • Restrict user access to ip link commands and CAP_NET_ADMIN capabilities

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if macvlan source mode interfaces exist: uname -r && ip link show type macvlan

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version contains fix commits or is newer than vulnerable versions

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • Memory allocation failures in dmesg
  • ip command errors when creating macvlan interfaces

Network Indicators:

  • Unexpected macvlan interface creation in source mode

SIEM Query:

Process execution: ip link add type macvlan mode source OR Kernel logs: 'macvlan' AND 'memory' OR 'leak'

🔗 References

📤 Share & Export