CVE-2022-50314 nbd: Fix hung when signal interrupts nbd_start_device_ioctl()

Medium 5.5 Published Updated

A local attacker can cause a system hang in the Linux kernel NBD driver by interrupting a specific ioctl call with a signal.

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-2022-50314?

CVE-2022-50314 is a medium-severity denial of service vulnerability in Linux kernel, published on 15 Sep 2025. 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:

nbd: Fix hung when signal interrupts nbd_start_device_ioctl()

syzbot reported hung task [1]. The following program is a simplified version of the reproducer:

int main(void) { int sv[2], fd;

if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) < 0) return 1; if ((fd = open("/dev/nbd0", 0)) < 0) return 1; if (ioctl(fd, NBD_SET_SIZE_BLOCKS, 0x81) < 0) return 1; if (ioctl(fd, NBD_SET_SOCK, sv[0]) < 0) return 1; if (ioctl(fd, NBD_DO_IT) < 0) return 1; return 0; }

When signal interrupt nbd_start_device_ioctl() waiting the condition atomic_read(&config->recv_threads) == 0, the task can hung because it waits the completion of the inflight IOs.

This patch fixes the issue by clearing queue, not just shutdown, when signal interrupt nbd_start_device_ioctl().

Which versions are affected by CVE-2022-50314?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50314?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-50314 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50314, GHSA-x3q5-jcq9-7rv7, UBUNTU-CVE-2022-50314.

Is CVE-2022-50314 in your software?

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

Check your SBOMs for free