CVE-2021-47002: Linux Kernel null pointer dereference in SUNRPC svc_rqst_free

CVE-2021-47002 · Severity: medium · CVSS 5.5 · Published 2024-02-28

A vulnerability exists in the Linux kernel's SUNRPC component, which is used for network-based communication between systems. Under specific memory pressure conditions, the system may crash when attempting to free resources, leading to a denial-of-service. This affects various Linux-based systems, including industrial automation hardware like the Siemens SIMATIC S7-1500.

Technologies: Linux Kernel, Siemens SIMATIC S7-1500 TM MFP. Vendors: Linux, Siemens.

Quick answers

Is CVE-2021-47002 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-47002 being exploited in the wild.
How severe is CVE-2021-47002?
Medium severity, with a CVSS score of 5.5, published 28 February 2024.
Which products and versions are affected?
Linux Kernel up to 5.10.221, 5.11 to 5.11.22, 5.12 to 5.12.5; Siemens SIMATIC S7-1500 TM MFP All versions using affected Linux subsystem.
Is there a fix for CVE-2021-47002?
A patch was published on 2021-04-23: Initial fix committed to Linux kernel mainline Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-47002 attacked?
It is attacked with local access, in an operating system.
Am I affected by CVE-2021-47002?
Check whether you run Linux Kernel or Siemens SIMATIC S7-1500 TM MFP at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A NULL pointer dereference exists in the SUNRPC subsystem of the Linux kernel within the svc_rqst_free() function. The vulnerability occurs when alloc_pages_node() fails and returns NULL in svc_rqst_alloc(), leaving the rq_scratch_page pointer uninitialized. Subsequent calls to put_page() during the cleanup process in svc_rqst_free() do not verify if the pointer is NULL before dereferencing it. A local attacker can exploit this to trigger a kernel panic (denial-of-service). The issue has been resolved in various stable kernel branches (5.10.221, 5.11.22, 5.12.5) by adding a mandatory NULL check before the put_page() call.

Affected products

  • Linux Linux Kernel up to 5.10.221, 5.11 to 5.11.22, 5.12 to 5.12.5
  • Siemens SIMATIC S7-1500 TM MFP All versions using affected Linux subsystem

Timeline

  • 2021-04-23: patched: Initial fix committed to Linux kernel mainline
  • 2024-02-28: advisory: CVE published by kernel.org
  • 2024-04-09: advisory: Siemens published advisory SSA-265688 covering affected industrial products

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.