CVE-2024-35896

7.1 HIGH

📋 TL;DR

This CVE describes a kernel memory corruption vulnerability in the Linux netfilter subsystem where setsockopt() fails to validate user input length before copying data, leading to a slab-out-of-bounds read. This allows local attackers to potentially escalate privileges or crash the system. It affects Linux systems with netfilter enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Versions before the fix commits (specific versions vary by distribution, but generally Linux kernel versions before the fixes listed in references)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires netfilter/iptables functionality. Systems without netfilter or with restricted user access may be less vulnerable.

📦 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 root, kernel panic causing system crash, or information disclosure via memory leaks.

🟠

Likely Case

Kernel panic leading to denial of service, or limited information disclosure from kernel memory.

🟢

If Mitigated

No impact if proper input validation is enforced or vulnerable code is not reachable.

🌐 Internet-Facing: LOW - This is a local vulnerability requiring access to the system.
🏢 Internal Only: HIGH - Local users or compromised services can exploit this for privilege escalation.

🎯 Exploit Status

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

Exploitation requires local access and knowledge of kernel memory layout. The vulnerability was discovered through syzbot fuzzing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 0c83842df40f86e529db6842231154772c20edcc, 0f038242b77ddfc505bf4163d4904c1abd2e74d6, 18aae2cb87e5faa9c5bd865260ceadac60d5a6c5, 440e948cf0eff32cfe322dcbca3f2525354b159b, 58f2bfb789e6bd3bc24a2c9c1580f3c67aec3018

Vendor Advisory: https://git.kernel.org/stable/c/0c83842df40f86e529db6842231154772c20edcc

Restart Required: Yes

Instructions:

1. Update Linux kernel to a version containing the fix commits. 2. Check your distribution's security advisories for specific patched kernel versions. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Restrict user access to setsockopt

linux

Limit which users can call setsockopt with netfilter options through SELinux/AppArmor or user privilege restrictions.

# Example SELinux policy to restrict setsockopt (customize as needed)
# allow only specific domains to use netfilter socket options

Disable netfilter modules if not needed

linux

Unload netfilter kernel modules to prevent the vulnerable code path from being reachable.

# Unload specific netfilter modules (example)
sudo rmmod ip_tables
sudo rmmod nf_sockopt

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from executing setsockopt operations.
  • Monitor system logs for kernel panic events or unusual setsockopt usage patterns.

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched versions from your distribution. Example: uname -r and check if it's before the fix.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to a version containing the fix commits. Check distribution security advisories for confirmation.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs in /var/log/messages or journalctl
  • KASAN error reports for slab-out-of-bounds in netfilter functions

Network Indicators:

  • Not applicable - this is a local vulnerability

SIEM Query:

Example: source="kernel" AND ("KASAN" OR "slab-out-of-bounds" OR "netfilter" OR "do_ipt_set_ctl")

🔗 References

📤 Share & Export