CVE-2023-52618 block/rnbd-srv: Check for unlikely string overflow

Medium 5.3 Published Updated

A potential string overflow in the Linux kernel RNBD server could lead to truncation issues, requiring a patch to ensure safe path construction.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-52618?

CVE-2023-52618 is a medium-severity vulnerability in Debian Debian Linux, published on 18 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

block/rnbd-srv: Check for unlikely string overflow

Since "dev_search_path" can technically be as large as PATH_MAX, there was a risk of truncation when copying it and a second string into "full_path" since it was also PATH_MAX sized. The W=1 builds were reporting this warning:

drivers/block/rnbd/rnbd-srv.c: In function 'process_msg_open.isra': drivers/block/rnbd/rnbd-srv.c:616:51: warning: '%s' directive output may be truncated writing up to 254 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] 616 | snprintf(full_path, PATH_MAX, "%s/%s", | ^~ In function 'rnbd_srv_get_full_path', inlined from 'process_msg_open.isra' at drivers/block/rnbd/rnbd-srv.c:721:14: drivers/block/rnbd/rnbd-srv.c:616:17: note: 'snprintf' output between 2 and 4351 bytes into a destination of size 4096 616 | snprintf(full_path, PATH_MAX, "%s/%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 617 | dev_search_path, dev_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~

To fix this, unconditionally check for truncation (as was already done for the case where "%SESSNAME%" was present).

Which versions are affected by CVE-2023-52618?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2023-52618?

Apply the vendor's patch.

Is CVE-2023-52618 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2023-52618, DEBIAN-CVE-2023-52618, GHSA-6285-w63g-86p4, UBUNTU-CVE-2023-52618.

Is CVE-2023-52618 in your software?

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

Check your SBOMs for free