{
  "cveId": "CVE-2022-49607",
  "url": "https://patchblox.com/security/cve/CVE-2022-49607",
  "summary": "CVE-2022-49607 is fixed in linux on 1 platform, first by DEBIAN-CVE-2022-49607, released February 26, 2025. It is not reported as exploited. Patch Radar priority: Routine.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  perf/core: Fix data race between perf_event_set_...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  perf/core: Fix data race between perf_event_set_output() and perf_mmap_close()  Yang Jihing reported a race between perf_event_set_output() and perf_mmap_close():  \tCPU1\t\t\t\t\tCPU2  \tperf_mmap_close(e2) \t  if (atomic_dec_and_test(\u0026e2-\u003Erb-\u003Emmap_count)) // 1 - \u003E 0 \t    detach_rest = true  \t\t\t\t\t\tioctl(e1, IOC_SET_OUTPUT, e2) \t\t\t\t\t\t  perf_event_set_output(e1, e2)  \t  ... \t  list_for_each_entry_rcu(e, \u0026e2-\u003Erb-\u003Eevent_list, rb_entry) \t    ring_buffer_attach(e, NULL); \t    // e1 isn\u0027t yet added and \t    // therefore not detached  \t\t\t\t\t\t    ring_buffer_attach(e1, e2-\u003Erb) \t\t\t\t\t\t      list_add_rcu(\u0026e1-\u003Erb_entry, \t\t\t\t\t\t\t\t   \u0026e2-\u003Erb-\u003Eevent_list)  After this; e1 is attached to an unmapped rb and a subsequent perf_mmap() will loop forever more:  \tagain: \t\tmutex_lock(\u0026e-\u003Emmap_mutex); \t\tif (event-\u003Erb) { \t\t\t... \t\t\tif (!atomic_inc_not_zero(\u0026e-\u003Erb-\u003Emmap_count)) { \t\t\t\t... \t\t\t\tmutex_unlock(\u0026e-\u003Emmap_mutex); \t\t\t\tgoto again; \t\t\t} \t\t}  The loop in perf_mmap_close() holds e2-\u003Emmap_mutex, while the attach in perf_event_set_output() holds e1-\u003Emmap_mutex. As such there is no serialization to avoid this race.  Change perf_event_set_output() to take both e1-\u003Emmap_mutex and e2-\u003Emmap_mutex to alleviate that problem. Additionally, have the loop in perf_mmap() detach the rb directly, this avoids having to wait for the concurrent perf_mmap_close() to get around to doing it to make progress.",
  "published": "2025-02-26T07:01:36Z",
  "severity": "medium",
  "cvss": 4.7,
  "cvssVector": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
  "epss": 0.00186,
  "epssPercentile": 0.08281,
  "priority": "Routine",
  "priorityTier": 4,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 12.15 (bookworm)",
      "fixedVersion": "5.18.16-1",
      "fix": "DEBIAN-CVE-2022-49607",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49607",
      "released": "2025-02-26T07:01:36Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "5.18.16-1",
      "fix": "DEBIAN-CVE-2022-49607",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49607",
      "released": "2025-02-26T07:01:36Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "5.18.16-1",
      "fix": "DEBIAN-CVE-2022-49607",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49607",
      "released": "2025-02-26T07:01:36Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T06:59:42Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}