cve-2022-48884
Vulnerability from cvelistv5
Published
2024-08-21 06:10
Modified
2024-11-04 12:18
Severity ?
Summary
net/mlx5: Fix command stats access after free
Impacted products
Vendor Product Version
Linux Linux Version: 5.18
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48884",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:04:45.615051Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-12T17:32:52.151Z",
          "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/cmd.c",
            "include/linux/mlx5/driver.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ddf458641a51",
              "status": "affected",
              "version": "34f46ae0d4b3",
              "versionType": "git"
            },
            {
              "lessThan": "da2e552b469a",
              "status": "affected",
              "version": "34f46ae0d4b3",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/cmd.c",
            "include/linux/mlx5/driver.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.18"
            },
            {
              "lessThan": "5.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix command stats access after free\n\nCommand may fail while driver is reloading and can\u0027t accept FW commands\ntill command interface is reinitialized. Such command failure is being\nlogged to command stats. This results in NULL pointer access as command\nstats structure is being freed and reallocated during mlx5 devlink\nreload (see kernel log below).\n\nFix it by making command stats statically allocated on driver probe.\n\nKernel log:\n[ 2394.808802] BUG: unable to handle kernel paging request at 000000000002a9c0\n[ 2394.810610] PGD 0 P4D 0\n[ 2394.811811] Oops: 0002 [#1] SMP NOPTI\n...\n[ 2394.815482] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0\n...\n[ 2394.829505] Call Trace:\n[ 2394.830667]  _raw_spin_lock_irq+0x23/0x26\n[ 2394.831858]  cmd_status_err+0x55/0x110 [mlx5_core]\n[ 2394.833020]  mlx5_access_reg+0xe7/0x150 [mlx5_core]\n[ 2394.834175]  mlx5_query_port_ptys+0x78/0xa0 [mlx5_core]\n[ 2394.835337]  mlx5e_ethtool_get_link_ksettings+0x74/0x590 [mlx5_core]\n[ 2394.836454]  ? kmem_cache_alloc_trace+0x140/0x1c0\n[ 2394.837562]  __rh_call_get_link_ksettings+0x33/0x100\n[ 2394.838663]  ? __rtnl_unlock+0x25/0x50\n[ 2394.839755]  __ethtool_get_link_ksettings+0x72/0x150\n[ 2394.840862]  duplex_show+0x6e/0xc0\n[ 2394.841963]  dev_attr_show+0x1c/0x40\n[ 2394.843048]  sysfs_kf_seq_show+0x9b/0x100\n[ 2394.844123]  seq_read+0x153/0x410\n[ 2394.845187]  vfs_read+0x91/0x140\n[ 2394.846226]  ksys_read+0x4f/0xb0\n[ 2394.847234]  do_syscall_64+0x5b/0x1a0\n[ 2394.848228]  entry_SYSCALL_64_after_hwframe+0x65/0xca"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T12:18:28.381Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ddf458641a511e7dff19f3bf0cbbc5dd9fe08ce5"
        },
        {
          "url": "https://git.kernel.org/stable/c/da2e552b469a0cd130ff70a88ccc4139da428a65"
        }
      ],
      "title": "net/mlx5: Fix command stats access after free",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48884",
    "datePublished": "2024-08-21T06:10:15.857Z",
    "dateReserved": "2024-07-16T11:38:08.925Z",
    "dateUpdated": "2024-11-04T12:18:28.381Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-48884\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-08-21T07:15:04.987\",\"lastModified\":\"2024-08-21T12:30:33.697\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet/mlx5: Fix command stats access after free\\n\\nCommand may fail while driver is reloading and can\u0027t accept FW commands\\ntill command interface is reinitialized. Such command failure is being\\nlogged to command stats. This results in NULL pointer access as command\\nstats structure is being freed and reallocated during mlx5 devlink\\nreload (see kernel log below).\\n\\nFix it by making command stats statically allocated on driver probe.\\n\\nKernel log:\\n[ 2394.808802] BUG: unable to handle kernel paging request at 000000000002a9c0\\n[ 2394.810610] PGD 0 P4D 0\\n[ 2394.811811] Oops: 0002 [#1] SMP NOPTI\\n...\\n[ 2394.815482] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0\\n...\\n[ 2394.829505] Call Trace:\\n[ 2394.830667]  _raw_spin_lock_irq+0x23/0x26\\n[ 2394.831858]  cmd_status_err+0x55/0x110 [mlx5_core]\\n[ 2394.833020]  mlx5_access_reg+0xe7/0x150 [mlx5_core]\\n[ 2394.834175]  mlx5_query_port_ptys+0x78/0xa0 [mlx5_core]\\n[ 2394.835337]  mlx5e_ethtool_get_link_ksettings+0x74/0x590 [mlx5_core]\\n[ 2394.836454]  ? kmem_cache_alloc_trace+0x140/0x1c0\\n[ 2394.837562]  __rh_call_get_link_ksettings+0x33/0x100\\n[ 2394.838663]  ? __rtnl_unlock+0x25/0x50\\n[ 2394.839755]  __ethtool_get_link_ksettings+0x72/0x150\\n[ 2394.840862]  duplex_show+0x6e/0xc0\\n[ 2394.841963]  dev_attr_show+0x1c/0x40\\n[ 2394.843048]  sysfs_kf_seq_show+0x9b/0x100\\n[ 2394.844123]  seq_read+0x153/0x410\\n[ 2394.845187]  vfs_read+0x91/0x140\\n[ 2394.846226]  ksys_read+0x4f/0xb0\\n[ 2394.847234]  do_syscall_64+0x5b/0x1a0\\n[ 2394.848228]  entry_SYSCALL_64_after_hwframe+0x65/0xca\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: net/mlx5: corrige el acceso a las estad\u00edsticas de los comandos despu\u00e9s de liberarlos. El comando puede fallar mientras se recarga el controlador y no puede aceptar comandos de firmware hasta que se reinicialice la interfaz de comandos. Dicho error de comando se registra en las estad\u00edsticas de comando. Esto da como resultado un acceso al puntero NULL a medida que la estructura de estad\u00edsticas de comando se libera y reasigna durante la recarga de mlx5 devlink (consulte el registro del kernel a continuaci\u00f3n). Solucionelo haciendo que las estad\u00edsticas de comando se asignen est\u00e1ticamente en la sonda del controlador. Registro del kernel: [2394.808802] ERROR: no se puede manejar la solicitud de paginaci\u00f3n del kernel en 000000000002a9c0 [2394.810610] PGD 0 P4D 0 [2394.811811] Vaya: 0002 [#1] SMP NOPTI... [2394.815482] RIP: 10:native_queued_spin_lock_slowpath+0x183/0x1d0 ... [2394.829505] Seguimiento de llamadas: [2394.830667] _raw_spin_lock_irq+0x23/0x26 [2394.831858] cmd_status_err+0x55/0x110 [mlx5_core] [2394.833020] mlx5_access_reg+0xe7/0x1 50 [mlx5_core] [2394.834175] mlx5_query_port_ptys+0x78/0xa0 [mlx5_core] [2394.835337] mlx5e_ethtool_get_link_ksettings+0x74/0x590 [mlx5_core] [2394.836454]? kmem_cache_alloc_trace+0x140/0x1c0 [ 2394.837562] __rh_call_get_link_ksettings+0x33/0x100 [ 2394.838663] ? __rtnl_unlock+0x25/0x50 [ 2394.839755] __ethtool_get_link_ksettings+0x72/0x150 [ 2394.840862] duplex_show+0x6e/0xc0 [ 2394.841963] dev_attr_show+0x1c/0x40 [ 2394.8 43048] sysfs_kf_seq_show+0x9b/0x100 [ 2394.844123] seq_read+0x153/0x410 [ 2394.845187] vfs_read+ 0x91/0x140 [ 2394.846226] ksys_read+0x4f/0xb0 [ 2394.847234] do_syscall_64+0x5b/0x1a0 [ 2394.848228] entrada_SYSCALL_64_after_hwframe+0x65/0xca\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/da2e552b469a0cd130ff70a88ccc4139da428a65\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ddf458641a511e7dff19f3bf0cbbc5dd9fe08ce5\",\"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.