cve-2021-47199
Vulnerability from cvelistv5
Published
2024-04-10 18:56
Modified
2024-11-04 12:01
Severity ?
Summary
net/mlx5e: CT, Fix multiple allocations and memleak of mod acts
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:32:07.447Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/486e8de6e233ff2999493533c6259d1cb538653b"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/806401c20a0f9c51b6c8fd7035671e6ca841f6c2"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47199",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:50:01.719714Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:37.887Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c",
            "drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h",
            "drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "486e8de6e233",
              "status": "affected",
              "version": "1ef3018f5af3",
              "versionType": "git"
            },
            {
              "lessThan": "806401c20a0f",
              "status": "affected",
              "version": "1ef3018f5af3",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c",
            "drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h",
            "drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.7"
            },
            {
              "lessThan": "5.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: CT, Fix multiple allocations and memleak of mod acts\n\nCT clear action offload adds additional mod hdr actions to the\nflow\u0027s original mod actions in order to clear the registers which\nhold ct_state.\nWhen such flow also includes encap action, a neigh update event\ncan cause the driver to unoffload the flow and then reoffload it.\n\nEach time this happens, the ct clear handling adds that same set\nof mod hdr actions to reset ct_state until the max of mod hdr\nactions is reached.\n\nAlso the driver never releases the allocated mod hdr actions and\ncausing a memleak.\n\nFix above two issues by moving CT clear mod acts allocation\ninto the parsing actions phase and only use it when offloading the rule.\nThe release of mod acts will be done in the normal flow_put().\n\n backtrace:\n    [\u003c000000007316e2f3\u003e] krealloc+0x83/0xd0\n    [\u003c00000000ef157de1\u003e] mlx5e_mod_hdr_alloc+0x147/0x300 [mlx5_core]\n    [\u003c00000000970ce4ae\u003e] mlx5e_tc_match_to_reg_set_and_get_id+0xd7/0x240 [mlx5_core]\n    [\u003c0000000067c5fa17\u003e] mlx5e_tc_match_to_reg_set+0xa/0x20 [mlx5_core]\n    [\u003c00000000d032eb98\u003e] mlx5_tc_ct_entry_set_registers.isra.0+0x36/0xc0 [mlx5_core]\n    [\u003c00000000fd23b869\u003e] mlx5_tc_ct_flow_offload+0x272/0x1f10 [mlx5_core]\n    [\u003c000000004fc24acc\u003e] mlx5e_tc_offload_fdb_rules.part.0+0x150/0x620 [mlx5_core]\n    [\u003c00000000dc741c17\u003e] mlx5e_tc_encap_flows_add+0x489/0x690 [mlx5_core]\n    [\u003c00000000e92e49d7\u003e] mlx5e_rep_update_flows+0x6e4/0x9b0 [mlx5_core]\n    [\u003c00000000f60f5602\u003e] mlx5e_rep_neigh_update+0x39a/0x5d0 [mlx5_core]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T12:01:22.959Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/486e8de6e233ff2999493533c6259d1cb538653b"
        },
        {
          "url": "https://git.kernel.org/stable/c/806401c20a0f9c51b6c8fd7035671e6ca841f6c2"
        }
      ],
      "title": "net/mlx5e: CT, Fix multiple allocations and memleak of mod acts",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47199",
    "datePublished": "2024-04-10T18:56:34.529Z",
    "dateReserved": "2024-03-25T09:12:14.117Z",
    "dateUpdated": "2024-11-04T12:01:22.959Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47199\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-10T19:15:48.037\",\"lastModified\":\"2024-04-10T19:49:51.183\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet/mlx5e: CT, Fix multiple allocations and memleak of mod acts\\n\\nCT clear action offload adds additional mod hdr actions to the\\nflow\u0027s original mod actions in order to clear the registers which\\nhold ct_state.\\nWhen such flow also includes encap action, a neigh update event\\ncan cause the driver to unoffload the flow and then reoffload it.\\n\\nEach time this happens, the ct clear handling adds that same set\\nof mod hdr actions to reset ct_state until the max of mod hdr\\nactions is reached.\\n\\nAlso the driver never releases the allocated mod hdr actions and\\ncausing a memleak.\\n\\nFix above two issues by moving CT clear mod acts allocation\\ninto the parsing actions phase and only use it when offloading the rule.\\nThe release of mod acts will be done in the normal flow_put().\\n\\n backtrace:\\n    [\u003c000000007316e2f3\u003e] krealloc+0x83/0xd0\\n    [\u003c00000000ef157de1\u003e] mlx5e_mod_hdr_alloc+0x147/0x300 [mlx5_core]\\n    [\u003c00000000970ce4ae\u003e] mlx5e_tc_match_to_reg_set_and_get_id+0xd7/0x240 [mlx5_core]\\n    [\u003c0000000067c5fa17\u003e] mlx5e_tc_match_to_reg_set+0xa/0x20 [mlx5_core]\\n    [\u003c00000000d032eb98\u003e] mlx5_tc_ct_entry_set_registers.isra.0+0x36/0xc0 [mlx5_core]\\n    [\u003c00000000fd23b869\u003e] mlx5_tc_ct_flow_offload+0x272/0x1f10 [mlx5_core]\\n    [\u003c000000004fc24acc\u003e] mlx5e_tc_offload_fdb_rules.part.0+0x150/0x620 [mlx5_core]\\n    [\u003c00000000dc741c17\u003e] mlx5e_tc_encap_flows_add+0x489/0x690 [mlx5_core]\\n    [\u003c00000000e92e49d7\u003e] mlx5e_rep_update_flows+0x6e4/0x9b0 [mlx5_core]\\n    [\u003c00000000f60f5602\u003e] mlx5e_rep_neigh_update+0x39a/0x5d0 [mlx5_core]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/486e8de6e233ff2999493533c6259d1cb538653b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/806401c20a0f9c51b6c8fd7035671e6ca841f6c2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.