CVE-2024-42301

7.8 HIGH

📋 TL;DR

This CVE-2024-42301 is an array out-of-bounds vulnerability in the Linux kernel's parport (parallel port) subsystem, caused by unsafe use of sprintf() that could overflow buffers. It affects Linux systems with parallel port support enabled, potentially allowing local attackers to cause kernel panic or execute arbitrary code. The vulnerability requires local access to exploit.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Multiple versions before the fix commits (specific affected versions would need checking against kernel release timelines)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if parallel port (parport) support is compiled into the kernel or loaded as a module. Most modern systems don't use parallel ports by default.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to kernel-level code execution, leading to complete system compromise and potential persistence mechanisms.

🟠

Likely Case

Kernel panic leading to denial of service (system crash) when malicious input is passed to the parport subsystem.

🟢

If Mitigated

No impact if parport module is not loaded or parallel port functionality is disabled.

🌐 Internet-Facing: LOW - This is a local vulnerability requiring access to the system.
🏢 Internal Only: MEDIUM - Internal users with local access could exploit this to crash systems or potentially gain elevated privileges.

🎯 Exploit Status

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

Exploitation requires local access and knowledge of how to trigger the vulnerable parport functionality. The stack trace shows it was triggered by a user-space application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Multiple stable kernel versions containing the fix commits listed in references

Vendor Advisory: https://git.kernel.org/stable/c/166a0bddcc27de41fe13f861c8348e8e53e988c8

Restart Required: Yes

Instructions:

1. Update to a patched kernel version from your distribution's repositories. 2. Reboot the system to load the new kernel. 3. Verify the fix by checking kernel version and ensuring parport module is not causing crashes.

🔧 Temporary Workarounds

Disable parport module

linux

Prevent loading of the vulnerable parallel port module

echo 'blacklist parport' > /etc/modprobe.d/blacklist-parport.conf
rmmod parport
update-initramfs -u

Restrict access to parallel port devices

linux

Change permissions on parallel port device files to prevent unauthorized access

chmod 600 /dev/parport*
chown root:root /dev/parport*

🧯 If You Can't Patch

  • Disable parallel port support in kernel configuration and rebuild kernel
  • Implement strict access controls to prevent unauthorized users from accessing parallel port functionality

🔍 How to Verify

Check if Vulnerable:

Check if parport module is loaded: lsmod | grep parport. If loaded and kernel version is unpatched, system is vulnerable.

Check Version:

uname -r

Verify Fix Applied:

Check kernel version is patched: uname -r. Verify parport module loads without issues and no kernel panics occur when accessing parallel port.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning 'stack-protector' and 'parport'
  • Stack traces showing do_hardware_base_addr+0xcc/0xd0 [parport]
  • System crashes or reboots with parport-related errors

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

source="kernel" AND ("stack-protector" OR "parport" OR "do_hardware_base_addr")

🔗 References

📤 Share & Export