NULL Pointer Dereference Affecting tensorflow-gpu package, versions [,2.7.2) [2.8.0,2.8.1) [2.9.0,2.9.1)


0.0
medium

Snyk CVSS

    Attack Complexity Low
    Privileges Required High
    Availability High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.08% (35th percentile)
Expand this section
NVD
7.5 high

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 ID SNYK-PYTHON-TENSORFLOWGPU-3026961
  • published 18 Sep 2022
  • disclosed 16 Sep 2022
  • credit Unknown

How to fix?

Upgrade tensorflow-gpu to version 2.7.2, 2.8.1, 2.9.1 or higher.

Overview

tensorflow-gpu is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference when mlir::tfg::ConvertGenericFunctionToFunctionDef is given empty function attributes.

PoC

// Import the function attributes with a `tf.` prefix to match the current
// infrastructure expectations.
for (const auto& namedAttr : func.attr()) {
  const std::string& name = "tf." + namedAttr.first;
  const AttrValue& tf_attr = namedAttr.second;
  TF_ASSIGN_OR_RETURN(Attribute attr,
                      ConvertAttributeValue(tf_attr, builder, tfgDialect));
  attrs.append(name, attr);
}