Junglewise Threat Intelligence

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

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

Executive brief

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.

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

Related threats