CVE-2023-52596 sysctl: Fix out of bounds access for empty sysctl registers

Medium 5.5 Published Updated

An out-of-bounds access in the Linux kernel sysctl subsystem can lead to memory corruption, potentially causing denial of service or code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-52596?

CVE-2023-52596 is a medium-severity memory corruption vulnerability in Linux kernel, published on 6 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

sysctl: Fix out of bounds access for empty sysctl registers

When registering tables to the sysctl subsystem there is a check to see if header is a permanently empty directory (used for mounts). This check evaluates the first element of the ctl_table. This results in an out of bounds evaluation when registering empty directories.

The function register_sysctl_mount_point now passes a ctl_table of size 1 instead of size 0. It now relies solely on the type to identify a permanently empty register.

Make sure that the ctl_table has at least one element before testing for permanent emptiness.

Weakness: CWE-787

Which versions are affected by CVE-2023-52596?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52596?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-52596 being exploited?

There is no known exploitation of CVE-2023-52596 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-56819, BELL-CVE-2023-52596, DEBIAN-CVE-2023-52596, GHSA-ffqx-hmw2-p5jv, ROOT-OS-DEBIAN-11-CVE-2023-52596, ROOT-OS-DEBIAN-12-CVE-2023-52596 and 1 more.

Is CVE-2023-52596 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free