CVE-2023-52501 (GCVE-0-2023-52501)

Vulnerability from cvelistv5 – Published: 2024-03-02 21:52 – Updated: 2025-06-19 12:56
VLAI?
Title
ring-buffer: Do not attempt to read past "commit"
Summary
In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Do not attempt to read past "commit" When iterating over the ring buffer while the ring buffer is active, the writer can corrupt the reader. There's barriers to help detect this and handle it, but that code missed the case where the last event was at the very end of the page and has only 4 bytes left. The checks to detect the corruption by the writer to reads needs to see the length of the event. If the length in the first 4 bytes is zero then the length is stored in the second 4 bytes. But if the writer is in the process of updating that code, there's a small window where the length in the first 4 bytes could be zero even though the length is only 4 bytes. That will cause rb_event_length() to read the next 4 bytes which could happen to be off the allocated page. To protect against this, fail immediately if the next event pointer is less than 8 bytes from the end of the commit (last byte of data), as all events must be a minimum of 8 bytes anyway.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 785888c544e0433f601df18ff98a3215b380b9c3 , < cee5151c5410e868826b8afecfb356f3799ebea3 (git)
Affected: 785888c544e0433f601df18ff98a3215b380b9c3 , < 344f2f3e61a90f0150c754796ec9a17fcaeec03d (git)
Affected: 785888c544e0433f601df18ff98a3215b380b9c3 , < b08a4938229dbb530a35c41b83002a1457c6ff49 (git)
Affected: 785888c544e0433f601df18ff98a3215b380b9c3 , < 75fc9e99b3a71006720ad1e029db11a4b5c32d4a (git)
Affected: 785888c544e0433f601df18ff98a3215b380b9c3 , < 95a404bd60af6c4d9d8db01ad14fe8957ece31ca (git)
Create a notification for this product.
    Linux Linux Affected: 5.7
Unaffected: 0 , < 5.7 (semver)
Unaffected: 5.10.198 , ≤ 5.10.* (semver)
Unaffected: 5.15.134 , ≤ 5.15.* (semver)
Unaffected: 6.1.56 , ≤ 6.1.* (semver)
Unaffected: 6.5.6 , ≤ 6.5.* (semver)
Unaffected: 6.6 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52501",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-03-05T15:53:20.649636Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:24:10.265Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:03:20.685Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cee5151c5410e868826b8afecfb356f3799ebea3"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/344f2f3e61a90f0150c754796ec9a17fcaeec03d"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b08a4938229dbb530a35c41b83002a1457c6ff49"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/75fc9e99b3a71006720ad1e029db11a4b5c32d4a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/95a404bd60af6c4d9d8db01ad14fe8957ece31ca"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "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": "cee5151c5410e868826b8afecfb356f3799ebea3",
              "status": "affected",
              "version": "785888c544e0433f601df18ff98a3215b380b9c3",
              "versionType": "git"
            },
            {
              "lessThan": "344f2f3e61a90f0150c754796ec9a17fcaeec03d",
              "status": "affected",
              "version": "785888c544e0433f601df18ff98a3215b380b9c3",
              "versionType": "git"
            },
            {
              "lessThan": "b08a4938229dbb530a35c41b83002a1457c6ff49",
              "status": "affected",
              "version": "785888c544e0433f601df18ff98a3215b380b9c3",
              "versionType": "git"
            },
            {
              "lessThan": "75fc9e99b3a71006720ad1e029db11a4b5c32d4a",
              "status": "affected",
              "version": "785888c544e0433f601df18ff98a3215b380b9c3",
              "versionType": "git"
            },
            {
              "lessThan": "95a404bd60af6c4d9d8db01ad14fe8957ece31ca",
              "status": "affected",
              "version": "785888c544e0433f601df18ff98a3215b380b9c3",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ring_buffer.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.7"
            },
            {
              "lessThan": "5.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.198",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.134",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.56",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.6",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.198",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.134",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.56",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5.6",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Do not attempt to read past \"commit\"\n\nWhen iterating over the ring buffer while the ring buffer is active, the\nwriter can corrupt the reader. There\u0027s barriers to help detect this and\nhandle it, but that code missed the case where the last event was at the\nvery end of the page and has only 4 bytes left.\n\nThe checks to detect the corruption by the writer to reads needs to see the\nlength of the event. If the length in the first 4 bytes is zero then the\nlength is stored in the second 4 bytes. But if the writer is in the process\nof updating that code, there\u0027s a small window where the length in the first\n4 bytes could be zero even though the length is only 4 bytes. That will\ncause rb_event_length() to read the next 4 bytes which could happen to be off the\nallocated page.\n\nTo protect against this, fail immediately if the next event pointer is\nless than 8 bytes from the end of the commit (last byte of data), as all\nevents must be a minimum of 8 bytes anyway."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-19T12:56:26.686Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/cee5151c5410e868826b8afecfb356f3799ebea3"
        },
        {
          "url": "https://git.kernel.org/stable/c/344f2f3e61a90f0150c754796ec9a17fcaeec03d"
        },
        {
          "url": "https://git.kernel.org/stable/c/b08a4938229dbb530a35c41b83002a1457c6ff49"
        },
        {
          "url": "https://git.kernel.org/stable/c/75fc9e99b3a71006720ad1e029db11a4b5c32d4a"
        },
        {
          "url": "https://git.kernel.org/stable/c/95a404bd60af6c4d9d8db01ad14fe8957ece31ca"
        }
      ],
      "title": "ring-buffer: Do not attempt to read past \"commit\"",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52501",
    "datePublished": "2024-03-02T21:52:16.556Z",
    "dateReserved": "2024-02-20T12:30:33.313Z",
    "dateUpdated": "2025-06-19T12:56:26.686Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/cee5151c5410e868826b8afecfb356f3799ebea3\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/344f2f3e61a90f0150c754796ec9a17fcaeec03d\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/b08a4938229dbb530a35c41b83002a1457c6ff49\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/75fc9e99b3a71006720ad1e029db11a4b5c32d4a\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/95a404bd60af6c4d9d8db01ad14fe8957ece31ca\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T23:03:20.685Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-52501\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-03-05T15:53:20.649636Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-23T19:01:15.036Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"ring-buffer: Do not attempt to read past \\\"commit\\\"\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"785888c544e0433f601df18ff98a3215b380b9c3\", \"lessThan\": \"cee5151c5410e868826b8afecfb356f3799ebea3\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"785888c544e0433f601df18ff98a3215b380b9c3\", \"lessThan\": \"344f2f3e61a90f0150c754796ec9a17fcaeec03d\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"785888c544e0433f601df18ff98a3215b380b9c3\", \"lessThan\": \"b08a4938229dbb530a35c41b83002a1457c6ff49\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"785888c544e0433f601df18ff98a3215b380b9c3\", \"lessThan\": \"75fc9e99b3a71006720ad1e029db11a4b5c32d4a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"785888c544e0433f601df18ff98a3215b380b9c3\", \"lessThan\": \"95a404bd60af6c4d9d8db01ad14fe8957ece31ca\", \"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.7\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.7\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.10.198\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.134\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.56\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.5.6\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.5.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"kernel/trace/ring_buffer.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/cee5151c5410e868826b8afecfb356f3799ebea3\"}, {\"url\": \"https://git.kernel.org/stable/c/344f2f3e61a90f0150c754796ec9a17fcaeec03d\"}, {\"url\": \"https://git.kernel.org/stable/c/b08a4938229dbb530a35c41b83002a1457c6ff49\"}, {\"url\": \"https://git.kernel.org/stable/c/75fc9e99b3a71006720ad1e029db11a4b5c32d4a\"}, {\"url\": \"https://git.kernel.org/stable/c/95a404bd60af6c4d9d8db01ad14fe8957ece31ca\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nring-buffer: Do not attempt to read past \\\"commit\\\"\\n\\nWhen iterating over the ring buffer while the ring buffer is active, the\\nwriter can corrupt the reader. There\u0027s barriers to help detect this and\\nhandle it, but that code missed the case where the last event was at the\\nvery end of the page and has only 4 bytes left.\\n\\nThe checks to detect the corruption by the writer to reads needs to see the\\nlength of the event. If the length in the first 4 bytes is zero then the\\nlength is stored in the second 4 bytes. But if the writer is in the process\\nof updating that code, there\u0027s a small window where the length in the first\\n4 bytes could be zero even though the length is only 4 bytes. That will\\ncause rb_event_length() to read the next 4 bytes which could happen to be off the\\nallocated page.\\n\\nTo protect against this, fail immediately if the next event pointer is\\nless than 8 bytes from the end of the commit (last byte of data), as all\\nevents must be a minimum of 8 bytes anyway.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.10.198\", \"versionStartIncluding\": \"5.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.134\", \"versionStartIncluding\": \"5.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.56\", \"versionStartIncluding\": \"5.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.5.6\", \"versionStartIncluding\": \"5.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6\", \"versionStartIncluding\": \"5.7\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-06-19T12:56:26.686Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2023-52501\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-06-19T12:56:26.686Z\", \"dateReserved\": \"2024-02-20T12:30:33.313Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-03-02T21:52:16.556Z\", \"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…