Lucene search

K
cvelistLinuxCVELIST:CVE-2024-43863
HistoryAug 20, 2024 - 11:45 p.m.

CVE-2024-43863 drm/vmwgfx: Fix a deadlock in dma buf fence polling

2024-08-2023:45:27
Linux
www.cve.org
8
linux kernel
deadlock fix
dma buf fence
vmwgfx
fence ops
pending list
lock
poll
wait
unref
destruction
bug fix
kde stalls

EPSS

0

Percentile

5.1%

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

drm/vmwgfx: Fix a deadlock in dma buf fence polling

Introduce a version of the fence ops that on release doesn’t remove
the fence from the pending list, and thus doesn’t require a lock to
fix poll->fence wait->fence unref deadlocks.

vmwgfx overwrites the wait callback to iterate over the list of all
fences and update their status, to do that it holds a lock to prevent
the list modifcations from other threads. The fence destroy callback
both deletes the fence and removes it from the list of pending
fences, for which it holds a lock.

dma buf polling cb unrefs a fence after it’s been signaled: so the poll
calls the wait, which signals the fences, which are being destroyed.
The destruction tries to acquire the lock on the pending fences list
which it can never get because it’s held by the wait from which it
was called.

Old bug, but not a lot of userspace apps were using dma-buf polling
interfaces. Fix those, in particular this fixes KDE stalls/deadlock.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/gpu/drm/vmwgfx/vmwgfx_fence.c"
    ],
    "versions": [
      {
        "version": "2298e804e96e",
        "lessThan": "9e20d028d8d1",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "2298e804e96e",
        "lessThan": "3b933b16c996",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "2298e804e96e",
        "lessThan": "a8943969f9ea",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "2298e804e96e",
        "lessThan": "c98ab18b9f31",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "2298e804e96e",
        "lessThan": "e58337100721",
        "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/gpu/drm/vmwgfx/vmwgfx_fence.c"
    ],
    "versions": [
      {
        "version": "3.18",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "3.18",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.165",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.104",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.45",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10.4",
        "lessThanOrEqual": "6.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.11",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]