CVE-2022-50537

5.5 MEDIUM

📋 TL;DR

This CVE describes a memory leak vulnerability in the Raspberry Pi firmware driver within the Linux kernel. When the mbox_request_channel() function fails during device probing, the allocated firmware structure is not properly freed, leading to a memory leak. This affects Linux systems using the Raspberry Pi firmware driver, particularly those running on Raspberry Pi hardware or emulating it.

💻 Affected Systems

Products:
  • Linux kernel with Raspberry Pi firmware driver
Versions: Linux kernel versions containing the vulnerable code (specific commit range not provided in CVE)
Operating Systems: Linux distributions running on Raspberry Pi hardware or with Raspberry Pi firmware support
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where the Raspberry Pi firmware driver is loaded and mbox_request_channel() fails during device probing.

⚠️ 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

Memory leak gradually consumes kernel memory over time, potentially leading to performance degradation or system instability after repeated device probe failures.

🟢

If Mitigated

With proper kernel memory management and monitoring, impact is limited to minor resource consumption that gets cleaned up on system restart.

🌐 Internet-Facing: LOW - This vulnerability requires local access to trigger the device probe failure condition.
🏢 Internal Only: MEDIUM - Internal systems with Raspberry Pi hardware or drivers could be affected by repeated probe attempts or malicious local users.

🎯 Exploit Status

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

Exploitation requires local access and ability to trigger device probe failures. No known public exploits exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel versions with fixes from the provided git commits

Vendor Advisory: https://git.kernel.org/stable/c/62ac943eb2a9d655e431b9bc98ff6d7bd51a0e49

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. For Raspberry Pi OS: Use 'sudo apt update && sudo apt upgrade'. 3. For other distributions: Update through standard kernel update channels. 4. Reboot system after update.

🔧 Temporary Workarounds

Disable Raspberry Pi firmware module

linux

Prevent loading of the vulnerable driver if not needed

echo 'blacklist raspberrypi-firmware' | sudo tee /etc/modprobe.d/blacklist-raspberrypi-firmware.conf
sudo update-initramfs -u
sudo reboot

🧯 If You Can't Patch

  • Monitor kernel memory usage for unusual increases using tools like 'free', 'top', or 'vmstat'
  • Implement system restart schedules to clear accumulated memory leaks

🔍 How to Verify

Check if Vulnerable:

Check if Raspberry Pi firmware module is loaded: 'lsmod | grep raspberrypi_firmware'. If loaded and kernel version is unpatched, system may be vulnerable.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: 'uname -r' and check against patched versions. Confirm module loads without errors in dmesg.

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages
  • Out of memory errors in dmesg
  • Repeated 'rpi_firmware_probe' failures in kernel logs

Network Indicators:

  • None - this is a local kernel vulnerability

SIEM Query:

source="kernel" AND ("rpi_firmware" OR "out of memory" OR "kernel panic")

🔗 References

📤 Share & Export