CVE-2022-49889 (GCVE-0-2022-49889)

Vulnerability from cvelistv5 – Published: 2025-05-01 14:10 – Updated: 2025-10-01 16:10
VLAI?
Title
ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()
Summary
In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters() On some machines the number of listed CPUs may be bigger than the actual CPUs that exist. The tracing subsystem allocates a per_cpu directory with access to the per CPU ring buffer via a cpuX file. But to save space, the ring buffer will only allocate buffers for online CPUs, even though the CPU array will be as big as the nr_cpu_ids. With the addition of waking waiters on the ring buffer when closing the file, the ring_buffer_wake_waiters() now needs to make sure that the buffer is allocated (with the irq_work allocated with it) before trying to wake waiters, as it will cause a NULL pointer dereference. While debugging this, I added a NULL check for the buffer itself (which is OK to do), and also NULL pointer checks against buffer->buffers (which is not fine, and will WARN) as well as making sure the CPU number passed in is within the nr_cpu_ids (which is also not fine if it isn't). Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1204705
CWE
  • CWE-476 - NULL Pointer Dereference
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 2475de2bc0de17fb1b24c5e90194f84b5ca70d3e , < b5074df412bf3df9d6ce096b6fa03eb1082d05c9 (git)
Affected: f4f15344110d0b5b8822ac97bc8200e71939c945 , < 49ca992f6e50d0f46ec9608f44e011cf3121f389 (git)
Affected: f3ddb74ad0790030c9592229fb14d8c451f4e9a8 , < 7433632c9ff68a991bd0bc38cabf354e9d2de410 (git)
Affected: 5544f411a4e8bc39e6a444badbac37dd0e0caf0a (git)
Create a notification for this product.
    Linux Linux Affected: 5.15.75 , < 5.15.78 (semver)
Affected: 6.0.3 , < 6.0.8 (semver)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2022-49889",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-10-01T16:09:57.289350Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-476",
                "description": "CWE-476 NULL Pointer Dereference",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-10-01T16:10:00.993Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ring_buffer.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b5074df412bf3df9d6ce096b6fa03eb1082d05c9",
              "status": "affected",
              "version": "2475de2bc0de17fb1b24c5e90194f84b5ca70d3e",
              "versionType": "git"
            },
            {
              "lessThan": "49ca992f6e50d0f46ec9608f44e011cf3121f389",
              "status": "affected",
              "version": "f4f15344110d0b5b8822ac97bc8200e71939c945",
              "versionType": "git"
            },
            {
              "lessThan": "7433632c9ff68a991bd0bc38cabf354e9d2de410",
              "status": "affected",
              "version": "f3ddb74ad0790030c9592229fb14d8c451f4e9a8",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "5544f411a4e8bc39e6a444badbac37dd0e0caf0a",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ring_buffer.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5.15.78",
              "status": "affected",
              "version": "5.15.75",
              "versionType": "semver"
            },
            {
              "lessThan": "6.0.8",
              "status": "affected",
              "version": "6.0.3",
              "versionType": "semver"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.78",
                  "versionStartIncluding": "5.15.75",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.8",
                  "versionStartIncluding": "6.0.3",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.19.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()\n\nOn some machines the number of listed CPUs may be bigger than the actual\nCPUs that exist. The tracing subsystem allocates a per_cpu directory with\naccess to the per CPU ring buffer via a cpuX file. But to save space, the\nring buffer will only allocate buffers for online CPUs, even though the\nCPU array will be as big as the nr_cpu_ids.\n\nWith the addition of waking waiters on the ring buffer when closing the\nfile, the ring_buffer_wake_waiters() now needs to make sure that the\nbuffer is allocated (with the irq_work allocated with it) before trying to\nwake waiters, as it will cause a NULL pointer dereference.\n\nWhile debugging this, I added a NULL check for the buffer itself (which is\nOK to do), and also NULL pointer checks against buffer-\u003ebuffers (which is\nnot fine, and will WARN) as well as making sure the CPU number passed in\nis within the nr_cpu_ids (which is also not fine if it isn\u0027t).\n\n\nBugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1204705"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T12:45:21.932Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b5074df412bf3df9d6ce096b6fa03eb1082d05c9"
        },
        {
          "url": "https://git.kernel.org/stable/c/49ca992f6e50d0f46ec9608f44e011cf3121f389"
        },
        {
          "url": "https://git.kernel.org/stable/c/7433632c9ff68a991bd0bc38cabf354e9d2de410"
        }
      ],
      "title": "ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49889",
    "datePublished": "2025-05-01T14:10:33.832Z",
    "dateReserved": "2025-05-01T14:05:17.242Z",
    "dateUpdated": "2025-10-01T16:10:00.993Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 5.5, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"NONE\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2022-49889\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-10-01T16:09:57.289350Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-476\", \"description\": \"CWE-476 NULL Pointer Dereference\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-10-01T14:24:14.607Z\"}}], \"cna\": {\"title\": \"ring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"2475de2bc0de17fb1b24c5e90194f84b5ca70d3e\", \"lessThan\": \"b5074df412bf3df9d6ce096b6fa03eb1082d05c9\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"f4f15344110d0b5b8822ac97bc8200e71939c945\", \"lessThan\": \"49ca992f6e50d0f46ec9608f44e011cf3121f389\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"f3ddb74ad0790030c9592229fb14d8c451f4e9a8\", \"lessThan\": \"7433632c9ff68a991bd0bc38cabf354e9d2de410\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"5544f411a4e8bc39e6a444badbac37dd0e0caf0a\", \"versionType\": \"git\"}], \"programFiles\": [\"kernel/trace/ring_buffer.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.15.75\", \"lessThan\": \"5.15.78\", \"versionType\": \"semver\"}, {\"status\": \"affected\", \"version\": \"6.0.3\", \"lessThan\": \"6.0.8\", \"versionType\": \"semver\"}], \"programFiles\": [\"kernel/trace/ring_buffer.c\"], \"defaultStatus\": \"unaffected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/b5074df412bf3df9d6ce096b6fa03eb1082d05c9\"}, {\"url\": \"https://git.kernel.org/stable/c/49ca992f6e50d0f46ec9608f44e011cf3121f389\"}, {\"url\": \"https://git.kernel.org/stable/c/7433632c9ff68a991bd0bc38cabf354e9d2de410\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nring-buffer: Check for NULL cpu_buffer in ring_buffer_wake_waiters()\\n\\nOn some machines the number of listed CPUs may be bigger than the actual\\nCPUs that exist. The tracing subsystem allocates a per_cpu directory with\\naccess to the per CPU ring buffer via a cpuX file. But to save space, the\\nring buffer will only allocate buffers for online CPUs, even though the\\nCPU array will be as big as the nr_cpu_ids.\\n\\nWith the addition of waking waiters on the ring buffer when closing the\\nfile, the ring_buffer_wake_waiters() now needs to make sure that the\\nbuffer is allocated (with the irq_work allocated with it) before trying to\\nwake waiters, as it will cause a NULL pointer dereference.\\n\\nWhile debugging this, I added a NULL check for the buffer itself (which is\\nOK to do), and also NULL pointer checks against buffer-\u003ebuffers (which is\\nnot fine, and will WARN) as well as making sure the CPU number passed in\\nis within the nr_cpu_ids (which is also not fine if it isn\u0027t).\\n\\n\\nBugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1204705\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.78\", \"versionStartIncluding\": \"5.15.75\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.0.8\", \"versionStartIncluding\": \"6.0.3\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionStartIncluding\": \"5.19.17\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T12:45:21.932Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-49889\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-10-01T16:10:00.993Z\", \"dateReserved\": \"2025-05-01T14:05:17.242Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-05-01T14:10:33.832Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…