# CVE-2026-89493: ocfs2: validate rl\_used against rl\_count in refcount block validator

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.68% (percentile 47, 2026-11-26)
- **Published:** 2026-09-11T19:43:44.803Z
- **Modified:** 2026-10-19T09:17:43.197Z

## Who should check

- Anyone running Linux \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< f882e9e32d017a6569b2996c63ba3864717788e6; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 5593b63028cb43a6cda75a65ce1db95f00ea6857; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< c8b02f4ee91e757b3fff556c7168b24b7ae55132; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 97584e93fc49a2d59252ac60467e9279f11b1b5b; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< af56e90cb546cb0c47bef059335365283f61d6a4; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 0761d2c9494424469a0d30a9da3496ca010b0b2d; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 04ead708e13ddcb9c39319cbe02a18cef99cb823; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 4ca62df6bc0708947b48da3f6a712ecb8e73929c
- Anyone running Linux 2.6.32

## Description

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: validate rl\_used against rl\_count in refcount block validator

ocfs2\_find\_refcount\_rec\_in\_rl() walks the on-disk refcount record array
with:

	for (; i \< le16\_to\_cpu(rb-\>rf\_records.rl\_used); i++) {
		rec = &rb-\>rf\_records.rl\_recs\[i\];
		...

rl\_recs\[\] lives in a single metadata block (4096 bytes on the common
configuration), so its real capacity is fixed by
ocfs2\_refcount\_recs\_per\_rb(sb) (247 records for a 4K block with the
16-byte ocfs2\_refcount\_rec).  rl\_used and rl\_count are both read directly
off disk by ocfs2\_validate\_refcount\_block() and are never checked against
that capacity, nor against each other, before any refcount/reflink/CoW
operation walks the array.

A crafted (or corrupted) refcount block with rl\_used == 0xffff makes the
loop above walk far past the end of the block, dereferencing rl\_recs\[i\]
for i up to 65534.  The resulting index is then handed to the sibling
ocfs2\_insert\_refcount\_rec(), whose insert-shift does:

	if (index \< le16\_to\_cpu(rf\_list-\>rl\_used))
		memmove(&rf\_list-\>rl\_recs\[index + 1\],
			&rf\_list-\>rl\_recs\[index\],
			(le16\_to\_cpu(rf\_list-\>rl\_used) - index) \*
			 sizeof(struct ocfs2\_refcount\_rec));

i.e.  a memmove() of up to (0xffff - index) \* 16 bytes (~1 MiB) from an
offset already past the block.  This is reachable from an ordinary reflink
(FICLONE) against a crafted/corrupted ocfs2 image: attaching an extent
whose cpos sorts past every real record in the leaf forces the lookup to
run off the end instead of returning early on a match.  The attacker model
is local: CAP\_SYS\_ADMIN mounting a crafted or corrupted ocfs2 image, or a
raw write to the block device backing an already-mounted ocfs2 filesystem.

ocfs2\_validate\_refcount\_block() already validates the block's ECC,
signature, rf\_blkno and rf\_fs\_generation, but never rl\_count/rl\_used
against the block's actual on-disk capacity.  This is the same class of
gap that ocfs2\_validate\_extent\_block() (fs/ocfs2/alloc.c) already closes
for the sibling extent-list header, which checks both the record capacity
and the "used" bound before any code walks h\_list.l\_recs\[\]:

	if (le16\_to\_cpu(eb-\>h\_list.l\_count) != ocfs2\_extent\_recs\_per\_eb(sb)) {
		rc = ocfs2\_error(...);
		goto bail;
	}

	if (le16\_to\_cpu(eb-\>h\_list.l\_next\_free\_rec) \>
	    le16\_to\_cpu(eb-\>h\_list.l\_count)) {
		rc = ocfs2\_error(...);
		goto bail;
	}

Add the equivalent pair of checks to ocfs2\_validate\_refcount\_block():
reject a refcount block whose rl\_count does not match the fixed per-block
capacity returned by ocfs2\_refcount\_recs\_per\_rb(), and reject rl\_used \>
rl\_count.  Both checks are skipped when OCFS2\_REFCOUNT\_TREE\_FL is set,
because in that case the same union bytes hold an ocfs2\_extent\_list
(rf\_list), not the refcount record list (rf\_records) -- that layout is
already validated separately by ocfs2\_validate\_extent\_block() when the
referenced extent block is read.  This mirrors the existing
"!(rb-\>rf\_flags & OCFS2\_REFCOUNT\_TREE\_FL)" guard used elsewhere in this
file (e.g.  ocfs2\_get\_refcount\_rec()) to decide whether rf\_records or
rf\_list is the live member of the union.

With this in place, a forged rl\_used/rl\_count is caught at block
validation time (ocfs2\_error()), consistent with every other corruption
check in this function, instead of driving an out-of-bounds read in
ocfs2\_find\_refcount\_rec\_in\_rl() and a subsequent out-of-bounds memmove()
in ocfs2\_insert\_refcount\_rec().

Verified against a crafted image on a v6.19 KASAN (KASAN\_GENERIC) build:
replaying the same reflink (FICLONE) reliably hit a KASAN report in
\_\_ocfs2\_increase\_refcount()/ocfs2\_insert\_refcount\_rec() before this patch,
and triggers no report once ocfs2\_validate\_refcount\_block() rejects the
forged rl\_used/rl\_count.

## Affected and fixed versions

- Linux: \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< f882e9e32d017a6569b2996c63ba3864717788e6; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 5593b63028cb43a6cda75a65ce1db95f00ea6857; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< c8b02f4ee91e757b3fff556c7168b24b7ae55132; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 97584e93fc49a2d59252ac60467e9279f11b1b5b; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< af56e90cb546cb0c47bef059335365283f61d6a4; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 0761d2c9494424469a0d30a9da3496ca010b0b2d; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 04ead708e13ddcb9c39319cbe02a18cef99cb823; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 4ca62df6bc0708947b48da3f6a712ecb8e73929c (cvelist)
- Linux: 2.6.32 (cvelist)

## Mitigation

- Upgrade Linux to 4ca62df6bc0708947b48da3f6a712ecb8e73929c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89493. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89493.md
Affected: Linux >= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, < f882e9e32d017a6569b2996c63ba3864717788e6; >= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, < 5593b63028cb43a6cda75a65ce1db95f00ea6857; >= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, < c8b02f4ee91e757b3fff556c7168b24b7ae55132; >= f2c870e3b12e38da6d9b5b1…
Fixed in: Linux 5593b63028cb43a6cda75a65ce1db95f00ea6857, Linux 97584e93fc49a2d59252ac60467e9279f11b1b5b, Linux 0761d2c9494424469a0d30a9da3496ca010b0b2d, Linux 04ead708e13ddcb9c39319cbe02a18cef99cb823, Linux 4ca62df6bc0708947b48da3f6a712ecb8e73929c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89493 being exploited?

There is no confirmed exploitation: CVE-2026-89493 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.68% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89493?

High: CVSS 8.8 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-89493?

Linux \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< f882e9e32d017a6569b2996c63ba3864717788e6; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 5593b63028cb43a6cda75a65ce1db95f00ea6857; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< c8b02f4ee91e757b3fff556c7168b24b7ae55132; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 97584e93fc49a2d59252ac60467e9279f11b1b5b; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< af56e90cb546cb0c47bef059335365283f61d6a4; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 0761d2c9494424469a0d30a9da3496ca010b0b2d; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 04ead708e13ddcb9c39319cbe02a18cef99cb823; \>= f2c870e3b12e38da6d9b5b17c4c8ae56a0ed68e4, \< 4ca62df6bc0708947b48da3f6a712ecb8e73929c; Linux 2.6.32.

### Is there a fix for CVE-2026-89493?

Yes. Fixed in Linux 5593b63028cb43a6cda75a65ce1db95f00ea6857, Linux 97584e93fc49a2d59252ac60467e9279f11b1b5b, Linux 0761d2c9494424469a0d30a9da3496ca010b0b2d, Linux 04ead708e13ddcb9c39319cbe02a18cef99cb823, Linux 4ca62df6bc0708947b48da3f6a712ecb8e73929c. Upgrade Linux to 4ca62df6bc0708947b48da3f6a712ecb8e73929c or later.

### How do I check if I'm affected by CVE-2026-89493?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/f882e9e32d017a6569b2996c63ba3864717788e6>
- other: <https://git.kernel.org/stable/c/5593b63028cb43a6cda75a65ce1db95f00ea6857>
- other: <https://git.kernel.org/stable/c/c8b02f4ee91e757b3fff556c7168b24b7ae55132>
- other: <https://git.kernel.org/stable/c/97584e93fc49a2d59252ac60467e9279f11b1b5b>
- other: <https://git.kernel.org/stable/c/af56e90cb546cb0c47bef059335365283f61d6a4>
- other: <https://git.kernel.org/stable/c/0761d2c9494424469a0d30a9da3496ca010b0b2d>
- other: <https://git.kernel.org/stable/c/04ead708e13ddcb9c39319cbe02a18cef99cb823>
- other: <https://git.kernel.org/stable/c/4ca62df6bc0708947b48da3f6a712ecb8e73929c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89493>

HTML: <https://flawdb.com/CVE-2026-89493> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89493>
