Junglewise Threat Intelligence

CVE-2024-41006: Linux Kernel memory leak in netrom nr_heartbeat_expiry

CVE-2024-41006 · Severity: medium · CVSS 5.5 · Published 2024-07-12

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's NET/ROM protocol implementation can lead to a memory leak. This component is used for amateur radio networking. An attacker could exploit this to gradually consume system memory, potentially leading to a system crash or service instability.

Technical details

A memory leak exists in the netrom implementation within the Linux kernel. The root cause is an incorrect reference count increment (sock_hold) in the nr_heartbeat_expiry() function. Specifically, when a socket has the SOCK_DESTROY flag set, the kernel was holding a reference that would never be released because the file descriptor was already closed and nr_release() had already been called. This prevents the socket from being properly freed. The fix restricts the sock_hold() call to only occur for listening sockets. This can be triggered by a local user and results in a denial-of-service condition via memory exhaustion.

Affected products

  • Linux Linux Kernel 4.19.272 to 4.19.317, 5.4.231 to 5.4.279, 5.10.166 to 5.10.221, 5.15.91 to 5.15.162, 6.1.9 to 6.1.96, 6.2 to 6.6.36, 6.7 to 6.9.7

Timeline

  • 2024-06-17: patched: Initial fix committed to mainline kernel
  • 2024-07-12: advisory: NVD publication date

References

Related threats