CVE-2026-74751 (GCVE-0-2026-74751)

Vulnerability from cvelistv5 – Published: 2026-08-26 14:36 – Updated: 2026-08-27 05:01
VLAI
Title
riscv: lib: Fix ZBB strnlen reading past count boundary
Summary
In the Linux kernel, the following vulnerability has been resolved: riscv: lib: Fix ZBB strnlen reading past count boundary The ZBB-optimized strnlen loop loads one word ahead before checking the aligned boundary: REG_L t1, SZREG(t0) // load next word addi t0, t0, SZREG // advance orc.b t1, t1 bgeu t0, t4, 4f // boundary check AFTER load where t4 = (s + count) & -SZREG. When s is aligned and count is a multiple of SZREG, t4 equals s + count and the loop loads a full word starting at exactly s + count. If s + count falls on a page boundary with the next page unmapped, this faults. Fix by computing the aligned boundary from the last valid byte (s + count - 1) instead of s + count. This makes the loop stop at the word containing the last valid byte rather than potentially loading the word after it. The count == 0 case is already handled by the beqz early exit. Also add a pre-loop guard (bgeu t0, t4) for the case where all valid bytes fit within the first word. With the adjusted boundary, t4 can equal t0, and entering the loop with stale register state from the first-word processing would produce incorrect results. The final minu clamp ensures the result is still correct when the last loaded word extends past s + count - 1 within the same aligned word.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 5ba15d419fab848a3813eb56bbcad00e291fbc49 , < e697e30f3dd2da3a1df7dc0980546d5b53aea4b6 (git)
Affected: 5ba15d419fab848a3813eb56bbcad00e291fbc49 , < 5d588c684833e678a0008eb69c33190f01a65f4b (git)
guessed Create a notification for this product.
Linux Linux Affected: 7.1
Unaffected: 0 , < 7.1 (semver)
Unaffected: 7.1.10 , ≤ 7.1.* (semver)
Unaffected: 7.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/lib/strnlen.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e697e30f3dd2da3a1df7dc0980546d5b53aea4b6",
              "status": "affected",
              "version": "5ba15d419fab848a3813eb56bbcad00e291fbc49",
              "versionType": "git"
            },
            {
              "lessThan": "5d588c684833e678a0008eb69c33190f01a65f4b",
              "status": "affected",
              "version": "5ba15d419fab848a3813eb56bbcad00e291fbc49",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/lib/strnlen.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "7.1"
            },
            {
              "lessThan": "7.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.10",
                  "versionStartIncluding": "7.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "7.1",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: lib: Fix ZBB strnlen reading past count boundary\n\nThe ZBB-optimized strnlen loop loads one word ahead before checking the\naligned boundary:\n\n    REG_L   t1, SZREG(t0)       // load next word\n    addi    t0, t0, SZREG       // advance\n    orc.b   t1, t1\n    bgeu    t0, t4, 4f          // boundary check AFTER load\n\nwhere t4 = (s + count) \u0026 -SZREG.  When s is aligned and count is a\nmultiple of SZREG, t4 equals s + count and the loop loads a full word\nstarting at exactly s + count.  If s + count falls on a page boundary\nwith the next page unmapped, this faults.\n\nFix by computing the aligned boundary from the last valid byte\n(s + count - 1) instead of s + count.  This makes the loop stop at the\nword containing the last valid byte rather than potentially loading the\nword after it.  The count == 0 case is already handled by the beqz\nearly exit.\n\nAlso add a pre-loop guard (bgeu t0, t4) for the case where all valid\nbytes fit within the first word.  With the adjusted boundary, t4 can\nequal t0, and entering the loop with stale register state from the\nfirst-word processing would produce incorrect results.\n\nThe final minu clamp ensures the result is still correct when the last\nloaded word extends past s + count - 1 within the same aligned word."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.4,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - On RISC-V with ZBB, the flawed arch strnlen is reached from network-facing SMB paths such as ksmbd pre-auth SMB1 negotiate (strnlen on client DialectsArray in kvmalloc request_buf) and CIFS client parsing of malicious server replies (session setup, tree connect, DFS/reparse), without requiring a local syscall.\nAC:L - Remote attackers control string length/count and payload bytes in SMB packets and can repeat connections with varied PDU sizes to satisfy aligned/count-multiple-of-word preconditions; no victim-specific race or rare config beyond standard RISC-V ZBB kernels is required.\nPR:N - ksmbd SMB_COM_NEGOTIATE handling runs before authentication, so an Internet-facing ksmbd listener on RISC-V can be probed with no victim credentials; a malicious SMB server similarly needs no privileges on the CIFS client host beyond normal protocol interaction.\nUI:N - Exploitation is triggered automatically when the kernel processes inbound SMB negotiation or client response data during connection, mount, or referral/readdir handling, with no additional deliberate victim action beyond routine SMB client or server use.\nS:U - Impact is confined to kernel memory and availability on the same host running the vulnerable RISC-V kernel; it does not by itself cross VM, IOMMU, or container sandbox boundaries distinct from standard kernel compromise.\nC:H - The ZBB loop performs an out-of-bounds read of a full machine word past the caller-supplied bound when alignment conditions match, exposing adjacent kernel heap/slab or other mapped memory per CVSS guidance for out-of-bounds reads.\nI:L - Although strnlen does not write memory directly, incorrect length results and downstream kstrndup/memcpy callers on SMB paths can propagate attacker-influenced adjacent bytes into newly allocated kernel buffers, modifying data beyond the intended bounded string scope.\nA:H - When s+count sits on a page boundary with the next page unmapped, the stray load faults the kernel (oops/panic), and repeated remote triggering against ksmbd or CIFS clients can deny service on RISC-V servers and workstations."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-27T05:01:11.654Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e697e30f3dd2da3a1df7dc0980546d5b53aea4b6"
        },
        {
          "url": "https://git.kernel.org/stable/c/5d588c684833e678a0008eb69c33190f01a65f4b"
        }
      ],
      "title": "riscv: lib: Fix ZBB strnlen reading past count boundary",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-74751",
    "datePublished": "2026-08-26T14:36:58.954Z",
    "dateReserved": "2026-08-15T05:44:03.931Z",
    "dateUpdated": "2026-08-27T05:01:11.654Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-74751",
      "date": "2026-08-27",
      "epss": "0.00337",
      "percentile": "0.26303"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-74751\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-08-26T15:16:54.160\",\"lastModified\":\"2026-08-27T06:17:26.247\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nriscv: lib: Fix ZBB strnlen reading past count boundary\\n\\nThe ZBB-optimized strnlen loop loads one word ahead before checking the\\naligned boundary:\\n\\n    REG_L   t1, SZREG(t0)       // load next word\\n    addi    t0, t0, SZREG       // advance\\n    orc.b   t1, t1\\n    bgeu    t0, t4, 4f          // boundary check AFTER load\\n\\nwhere t4 = (s + count) \u0026 -SZREG.  When s is aligned and count is a\\nmultiple of SZREG, t4 equals s + count and the loop loads a full word\\nstarting at exactly s + count.  If s + count falls on a page boundary\\nwith the next page unmapped, this faults.\\n\\nFix by computing the aligned boundary from the last valid byte\\n(s + count - 1) instead of s + count.  This makes the loop stop at the\\nword containing the last valid byte rather than potentially loading the\\nword after it.  The count == 0 case is already handled by the beqz\\nearly exit.\\n\\nAlso add a pre-loop guard (bgeu t0, t4) for the case where all valid\\nbytes fit within the first word.  With the adjusted boundary, t4 can\\nequal t0, and entering the loop with stale register state from the\\nfirst-word processing would produce incorrect results.\\n\\nThe final minu clamp ensures the result is still correct when the last\\nloaded word extends past s + count - 1 within the same aligned word.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"arch/riscv/lib/strnlen.S\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5ba15d419fab848a3813eb56bbcad00e291fbc49\",\"lessThan\":\"e697e30f3dd2da3a1df7dc0980546d5b53aea4b6\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5ba15d419fab848a3813eb56bbcad00e291fbc49\",\"lessThan\":\"5d588c684833e678a0008eb69c33190f01a65f4b\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"arch/riscv/lib/strnlen.S\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"7.1\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"7.1\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.10\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H\",\"baseScore\":9.4,\"baseSeverity\":\"CRITICAL\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":5.5}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5d588c684833e678a0008eb69c33190f01a65f4b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e697e30f3dd2da3a1df7dc0980546d5b53aea4b6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-27T06:33:25+00:00",
      "cve": "CVE-2026-74751",
      "id": "CVE-2026-74751",
      "initial_release_date": "2026-08-26T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: riscv: lib: Fix ZBB strnlen reading past count boundary",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-74751.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

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…

Loading…