{"api_version":"1","generated_at":"2026-08-28T17:12:34+00:00","cve":"CVE-2026-74751","urls":{"html":"https://cve.report/CVE-2026-74751","api":"https://cve.report/api/cve/CVE-2026-74751.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-74751","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-74751"},"summary":{"title":"riscv: lib: Fix ZBB strnlen reading past count boundary","description":"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) & -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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-08-26 15:16:54","updated_at":"2026-08-27 06:17:26"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"9.4","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H","data":{"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"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"9.4","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H","data":{"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"}}],"references":[{"url":"https://git.kernel.org/stable/c/5d588c684833e678a0008eb69c33190f01a65f4b","name":"https://git.kernel.org/stable/c/5d588c684833e678a0008eb69c33190f01a65f4b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e697e30f3dd2da3a1df7dc0980546d5b53aea4b6","name":"https://git.kernel.org/stable/c/e697e30f3dd2da3a1df7dc0980546d5b53aea4b6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-74751","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74751","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5ba15d419fab848a3813eb56bbcad00e291fbc49 e697e30f3dd2da3a1df7dc0980546d5b53aea4b6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5ba15d419fab848a3813eb56bbcad00e291fbc49 5d588c684833e678a0008eb69c33190f01a65f4b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.10 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"74751","cve":"CVE-2026-74751","epss":"0.003370000","percentile":"0.263030000","score_date":"2026-08-27","updated_at":"2026-08-28 00:03:39"},"legacy_qids":[]},"source_records":{"cve_program":{"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) & -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"},"nvd":{"publishedDate":"2026-08-26 15:16:54","lastModifiedDate":"2026-08-27 06:17:26","problem_types":[],"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}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"74751","Ordinal":"1","Title":"riscv: lib: Fix ZBB strnlen reading past count boundary","CVE":"CVE-2026-74751","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"74751","Ordinal":"1","NoteData":"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) & -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.","Type":"Description","Title":"riscv: lib: Fix ZBB strnlen reading past count boundary"}]}}}