CVE-2021-47282

7.8 HIGH

📋 TL;DR

This vulnerability in the Linux kernel's bcm2835 SPI driver allows out-of-bounds memory access when more than 3 SPI slave devices are configured using GPIO chipselects. Attackers could potentially crash the system or execute arbitrary code. Systems using Raspberry Pi hardware with Linux kernel versions containing the vulnerable driver are affected.

💻 Affected Systems

Products:
  • Linux kernel with bcm2835 SPI driver
Versions: Kernel versions containing commit 571e31fa60b3 up to fixes in stable releases
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when using more than 3 SPI slave devices with GPIO chipselects configured via device tree. Raspberry Pi systems are primarily affected.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel memory corruption leading to arbitrary code execution with kernel privileges, system crash, or data corruption.

🟠

Likely Case

System crash or kernel panic due to memory access violations, potentially causing denial of service.

🟢

If Mitigated

Limited impact if systems use 3 or fewer SPI slaves or don't use GPIO chipselects.

🌐 Internet-Facing: LOW - Requires local access or ability to modify device tree configuration.
🏢 Internal Only: MEDIUM - Local attackers or malicious processes could exploit this to crash systems or potentially escalate privileges.

🎯 Exploit Status

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

Requires ability to configure SPI devices or modify device tree, typically requiring local access or privileged execution.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in stable kernel releases containing commits 01415ff85a24, 13817d466eb8, 82a8ffba54d3, or b5502580cf95

Vendor Advisory: https://git.kernel.org/stable/c/01415ff85a24308059e06ca3e97fd7bf75648690

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix. 2. For Raspberry Pi OS: sudo apt update && sudo apt upgrade. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Limit SPI slave devices

linux

Configure system to use 3 or fewer SPI slave devices to avoid triggering the vulnerability

# Review device tree configuration for SPI nodes
# Ensure spi0/spi1 nodes have <= 3 chip-select entries

🧯 If You Can't Patch

  • Restrict access to SPI device configuration and device tree modification
  • Monitor for system crashes or kernel panics related to SPI operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if using bcm2835 SPI driver with >3 SPI slaves using GPIO chipselects: uname -r && dmesg | grep -i bcm2835-spi

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: grep -r '01415ff85a24\|13817d466eb8\|82a8ffba54d3\|b5502580cf95' /usr/src/linux/

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • SPI driver error messages in dmesg
  • Out-of-bounds access warnings

Network Indicators:

  • None - local vulnerability

SIEM Query:

source="kernel" AND ("panic" OR "oops" OR "bcm2835-spi")

🔗 References

📤 Share & Export