Lucene search

K
cveLinuxCVE-2022-48941
HistoryAug 22, 2024 - 4:15 a.m.

CVE-2022-48941

2024-08-2204:15:17
CWE-362
Linux
web.nvd.nist.gov
39
linux kernel
vulnerability
fix
ice driver
reset
removal
dma memory
concurrency
cfg_lock

CVSS3

4.7

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

AI Score

7.2

Confidence

High

EPSS

0

Percentile

5.0%

In the Linux kernel, the following vulnerability has been resolved:

ice: fix concurrent reset and removal of VFs

Commit c503e63200c6 (“ice: Stop processing VF messages during teardown”)
introduced a driver state flag, ICE_VF_DEINIT_IN_PROGRESS, which is
intended to prevent some issues with concurrently handling messages from
VFs while tearing down the VFs.

This change was motivated by crashes caused while tearing down and
bringing up VFs in rapid succession.

It turns out that the fix actually introduces issues with the VF driver
caused because the PF no longer responds to any messages sent by the VF
during its .remove routine. This results in the VF potentially removing
its DMA memory before the PF has shut down the device queues.

Additionally, the fix doesn’t actually resolve concurrency issues within
the ice driver. It is possible for a VF to initiate a reset just prior
to the ice driver removing VFs. This can result in the remove task
concurrently operating while the VF is being reset. This results in
similar memory corruption and panics purportedly fixed by that commit.

Fix this concurrency at its root by protecting both the reset and
removal flows using the existing VF cfg_lock. This ensures that we
cannot remove the VF while any outstanding critical tasks such as a
virtchnl message or a reset are occurring.

This locking change also fixes the root cause originally fixed by commit
c503e63200c6 (“ice: Stop processing VF messages during teardown”), so we
can simply revert it.

Note that I kept these two changes together because simply reverting the
original commit alone would leave the driver vulnerable to worse race
conditions.

Affected configurations

Nvd
Vulners
Node
linuxlinux_kernelRange<5.10.104
OR
linuxlinux_kernelRange5.115.15.26
OR
linuxlinux_kernelRange5.165.16.12
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/intel/ice/ice.h",
      "drivers/net/ethernet/intel/ice/ice_main.c",
      "drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c"
    ],
    "versions": [
      {
        "version": "c503e63200c6",
        "lessThan": "05ae1f0fe9c6",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "c503e63200c6",
        "lessThan": "3c805fce07c9",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "c503e63200c6",
        "lessThan": "2a3e61de89ba",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "c503e63200c6",
        "lessThan": "fadead80fe4c",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/intel/ice/ice.h",
      "drivers/net/ethernet/intel/ice/ice_main.c",
      "drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c"
    ],
    "versions": [
      {
        "version": "5.14",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.14",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.104",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.26",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.16.12",
        "lessThanOrEqual": "5.16.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.17",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

CVSS3

4.7

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

AI Score

7.2

Confidence

High

EPSS

0

Percentile

5.0%