CVE-2025-39735: jfs: fix slab-out-of-bounds read in ea_get()
In the Linux kernel, the following vulnerability has been resolved:
jfs: fix slab-out-of-bounds read in ea_get()
During the "size_check" label in ea_get(), the code checks if the extended
attribute list (xattr) size matches ea_size. If not, it logs
"ea_get: invalid extended attribute" and calls print_hex_dump().
Here, EALIST_SIZE(ea_buf->xattr) returns 4110417968, which exceeds
INT_MAX (2,147,483,647). Then ea_size is clamped:
int size = clamp_t(int, ea_size, 0, EALIST_SIZE(ea_buf->xattr));
Although clamp_t aims to bound ea_size between 0 and 4110417968, the upper
limit is treated as an int, causing an overflow above 2^31 - 1. This leads
"size" to wrap around and become negative (-184549328).
The "size" is then passed to print_hex_dump() (called "len" in
print_hex_dump()), it is passed as type size_t (an unsigned
type), this is then stored inside a variable called
"int remaining", which is then assigned to "int linelen" which
is then passed to hex_dump_to_buffer(). In print_hex_dump()
the for loop, iterates through 0 to len-1, where len is
18446744073525002176, calling hex_dump_to_buffer()
on each iteration:
for (i = 0; i < len; i += rowsize) {
linelen = min(remaining, rowsize);
remaining -= rowsize;
hex_dump_to_buffer(ptr + i, linelen, rowsize, groupsize,
linebuf, sizeof(linebuf), ascii);
...
}
The expected stopping condition (i < len) is effectively broken
since len is corrupted and very large. This eventually leads to
the "ptr+i" being passed to hex_dump_to_buffer() to get closer
to the end of the actual bounds of "ptr", eventually an out of
bounds access is done in hex_dump_to_buffer() in the following
for loop:
for (j = 0; j < len; j++) {
if (linebuflen < lx + 2)
goto overflow2;
ch = ptr[j];
...
}
To fix this we should validate "EALIST_SIZE(ea_buf->xattr)"
before it is utilised.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel flaw in JFS extended-attribute handling. A local, low-privileged user could trigger an out-of-bounds kernel read, potentially exposing sensitive memory or causing a crash. It is not described as remotely exploitable, and the bundle does not show active exploitation.
Executive priority
Treat as a high-priority kernel maintenance issue for multi-user Linux and shared workload environments. It is not an internet-facing emergency based on the supplied evidence, but delayed patching leaves local privilege boundaries exposed to memory disclosure or kernel instability.
Technical view
In jfs ea_get(), an unchecked EALIST_SIZE value can exceed INT_MAX. clamp_t(int, ...) can overflow to a negative size that later becomes a very large size_t passed into print_hex_dump(), allowing slab out-of-bounds reads in hex_dump_to_buffer().
Likely exposure
Exposure is most likely on Linux systems running affected kernels where JFS is available and local users or processes can interact with JFS extended attributes. Validate through kernel package versions and vendor advisories; the bundle does not identify specific distributions beyond Debian LTS references.
Exploitation context
The CVSS vector is local, low-complexity, low-privilege, and no user interaction. KEV is false in the bundle, so there is no cited evidence of known active exploitation. Practical impact centers on confidentiality and availability, not integrity.
Researcher notes
The root issue is signed integer overflow during size validation before diagnostic hex dumping. Source evidence supports CWE-125 and CVSS 7.1. Version data in the bundle is mechanically flattened, so use kernel commits and downstream advisories for precise affected and fixed package mapping.
Mitigation direction
Apply vendor kernel updates that include the referenced Linux stable fixes.
Review Debian LTS advisories if managing Debian-based systems.
Prioritize systems allowing local users, containers, or untrusted workloads.
Avoid mounting untrusted JFS file systems until patched.
Check kernel vendor guidance for supported fixed versions.
Validation and detection
Inventory Linux kernel versions across servers and endpoints.
Identify systems with JFS support enabled or JFS file systems mounted.
Compare installed kernels with vendor fixed-version advisories.
Confirm Debian LTS systems include the referenced DLA kernel updates.
Record compensating controls where patching is delayed.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-125: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
2ADP providers
12Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-125 · source CWE mapping
Out-of-bounds Read
Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.