CVE-2026-74751 (GCVE-0-2026-74751)
Vulnerability from cvelistv5
Published
2026-08-26 14:36
Modified
2026-08-27 05:01
Severity ?
VLAI Severity ?
EPSS score ?
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.
References
Impacted products
{
"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"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…