Improper Locking Affecting kernel-tools-devel package, versions <0:4.14.296-222.539.amzn2


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.03% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2-KERNELTOOLSDEVEL-13157705
  • published30 Sept 2025
  • disclosed15 Sept 2025

Introduced: 15 Sep 2025

NewCVE-2022-50314  (opens in a new tab)
CWE-667  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2 kernel-tools-devel to version 0:4.14.296-222.539.amzn2 or higher.
This issue was patched in ALAS2-2022-1876.

NVD Description

Note: Versions mentioned in the description apply only to the upstream kernel-tools-devel package and not the kernel-tools-devel package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2 relevant fixed versions and status.

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) &lt; 0)
    return 1;
if ((fd = open(&#34;/dev/nbd0&#34;, 0)) &lt; 0)
    return 1;
if (ioctl(fd, NBD_SET_SIZE_BLOCKS, 0x81) &lt; 0)
    return 1;
if (ioctl(fd, NBD_SET_SOCK, sv[0]) &lt; 0)
    return 1;
if (ioctl(fd, NBD_DO_IT) &lt; 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().

CVSS Base Scores

version 3.1