CVE-2022-50040

7.8 HIGH

📋 TL;DR

This CVE describes a buffer overflow vulnerability in the Linux kernel's sja1105 DSA driver. When an error occurs during devlink region creation, the code accesses an array with a negative index, potentially causing kernel memory corruption. This affects systems using the sja1105 Ethernet switch driver in vulnerable kernel versions.

💻 Affected Systems

Products:
  • Linux kernel with sja1105 DSA driver
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when sja1105 hardware is present and the driver is loaded. Most systems won't have this specific Ethernet switch hardware.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash, potential privilege escalation to kernel mode, or arbitrary code execution in kernel context.

🟠

Likely Case

System instability or crash when configuring sja1105 switch interfaces, particularly during error conditions in devlink setup.

🟢

If Mitigated

Minor system disruption during network configuration, limited to systems using the specific sja1105 hardware.

🌐 Internet-Facing: LOW - This vulnerability requires local access to trigger and is specific to network driver configuration.
🏢 Internal Only: MEDIUM - Systems with sja1105 hardware could experience crashes during network configuration by privileged users.

🎯 Exploit Status

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

Exploitation requires local access and ability to trigger the error condition in sja1105_setup_devlink_regions().

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 7983e1e44cb3, 79f86b862416, e84c6321f357, fd8e899cdb5e

Vendor Advisory: https://git.kernel.org/stable/c/7983e1e44cb322eba6af84160b6d18df80603fb8

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Check distribution-specific security advisories. 3. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Disable sja1105 module

linux

Prevent loading of vulnerable driver if sja1105 hardware is not needed

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

🧯 If You Can't Patch

  • Ensure only trusted users have access to network configuration tools
  • Monitor systems for kernel panics or crashes during network interface changes

🔍 How to Verify

Check if Vulnerable:

Check if sja1105 module is loaded: lsmod | grep sja1105. If loaded, check kernel version against patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits or is newer than vulnerable versions. Check distribution security advisories.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Oops messages in dmesg
  • System crashes during network configuration

Network Indicators:

  • None - this is a local driver issue

SIEM Query:

Search for kernel panic or oops events in system logs, particularly around network interface changes

🔗 References

📤 Share & Export