CVE-2022-50545

5.5 MEDIUM

📋 TL;DR

This is a memory leak vulnerability in the Linux kernel's r6040 network driver where phy_device objects aren't properly disconnected during error handling or device removal. It affects systems using the r6040 Ethernet driver, potentially leading to kernel memory exhaustion over time.

💻 Affected Systems

Products:
  • Linux kernel with r6040 driver
Versions: Linux kernel versions before fixes in stable releases (specific commits listed in references)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using r6040 Ethernet hardware/driver; vulnerability triggers during driver probe/remove operations.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Sustained exploitation could exhaust kernel memory, leading to system instability, crashes, or denial of service requiring reboot.

🟠

Likely Case

Gradual memory leak during driver probe/remove cycles, eventually causing performance degradation or system instability.

🟢

If Mitigated

Minimal impact with proper monitoring and patching; memory leaks would be detected and addressed before causing issues.

🌐 Internet-Facing: LOW - Requires local access or driver manipulation; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Could be triggered by local users or automated processes manipulating network interfaces.

🎯 Exploit Status

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

Requires ability to trigger driver probe/remove cycles; memory leak is gradual rather than immediate exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel stable releases containing commits: 2ce242e1b9ad31c1f68496b3548e407a8cb2c07d, 3d5f83a62e8235d235534b3dc6f197d8a822c269, 5944c25c67de54e0aa53623e1e1af3bf8b16ed44, 7e43039a49c2da45edc1d9d7c9ede4003ab45a5f, 9b5b50329e2e966831a7237dd6949e7b5362a49a

Vendor Advisory: https://git.kernel.org/stable/c/2ce242e1b9ad31c1f68496b3548e407a8cb2c07d

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing fixes. 2. Reboot system. 3. Verify kernel version and that r6040 driver loads properly.

🔧 Temporary Workarounds

Disable r6040 driver

linux

Prevent loading of vulnerable driver if not needed

echo 'blacklist r6040' >> /etc/modprobe.d/blacklist.conf
rmmod r6040

Monitor kernel memory

linux

Detect memory leaks before they cause issues

watch -n 60 'cat /proc/meminfo | grep -E "Slab|SUnreclaim"'

🧯 If You Can't Patch

  • Avoid unnecessary network interface changes that trigger driver probe/remove cycles
  • Implement aggressive kernel memory monitoring and alerting for slab memory growth

🔍 How to Verify

Check if Vulnerable:

Check if r6040 driver is loaded: lsmod | grep r6040 AND check kernel version against patched versions

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits AND test driver load/unload cycles while monitoring slab memory

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • System instability logs after network changes
  • kmemleak reports if enabled

Network Indicators:

  • None - this is a local memory issue

SIEM Query:

source="kernel" AND ("oom-killer" OR "slab" OR "memory leak")

🔗 References

📤 Share & Export