CVE-2025-39735 json
jfs: fix slab-out-of-bounds read in ea_get()
published 2025-04-18 18 mo ago modified 2026-08-05 3 mo ago also EUVD-2025-11818
- cvss
- 7.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 22%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.20, 5.4.292, 5.10.236, 5.15.180, 6.1.134, 6.6.87, 6.12, 6.12.23, 6.13.11, 6.14.2, 6.15
- linux Debian 12 6.1.135-1
- linux Debian 14, Debian 13 6.12.25-1
debian advisories DEBIAN-CVE-2025-39735
- linux Ubuntu 22.04 LTS 5.15.0-142.152
- linux Ubuntu 24.04 LTS 6.8.0-86.87
- linux-aws Ubuntu 22.04 LTS 5.15.0-1086.93
- linux-aws Ubuntu 24.04 LTS 6.8.0-1041.43
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1085.94
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1042.45
- linux-gke Ubuntu 22.04 LTS 5.15.0-1083.89
- linux-gke Ubuntu 24.04 LTS 6.8.0-1038.43
ubuntu advisories UBUNTU-CVE-2025-39735
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.28.coco15sp6.1
- kernel-syms-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.28.coco15sp6.1
- kernel-coco_debug SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.28.coco15sp6.1
- kernel-source-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.28.coco15sp6.1
- kernel-rt Real Time Module 15 SP7 6.4.0-150700.7.8.1
- kernel-syms-rt Real Time Module 15 SP7 6.4.0-150700.7.8.1
- kernel-source-rt Real Time Module 15 SP7 6.4.0-150700.7.8.1
- kernel-64kb SLE Module for Basesystem 15 SP7 6.4.0-150700.53.6.1
suse advisories SUSE-SU-2025:02923-1SUSE-SU-2025:02333-1SUSE-SU-2025:02307-1SUSE-SU-2025:02254-1SUSE-SU-2025:02000-1SUSE-SU-2025:20413-1
- git.kernel.org/stable/c/3d6fd5b9c6acbc005e53d0211c7381f566babec1 commit
- git.kernel.org/stable/c/50afcee7011155933d8d5e8832f52eeee018cfd3 commit
- git.kernel.org/stable/c/78c9cbde8880ec02d864c166bcb4fe989ce1d95f commit
- git.kernel.org/stable/c/46e2c031aa59ea65128991cbca474bd5c0c2ecdb commit
- git.kernel.org/stable/c/a8c31808925b11393a6601f534bb63bac5366bab commit
- git.kernel.org/stable/c/0beddc2a3f9b9cf7d8887973041e36c2d0fa3652 commit
- git.kernel.org/stable/c/16d3d36436492aa248b2d8045e75585ebcc2f34d commit
- git.kernel.org/stable/c/5263822558a8a7c0d0248d5679c2dcf4d5cda61f commit
- git.kernel.org/stable/c/fdf480da5837c23b146c4743c18de97202fcab37 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-39735 updated cvss 7.1
kernel: jfs: fix slab-out-of-bounds read in ea_get()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 13 mo ago
Exploit prediction
0.30% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| CISA ADP | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
- Technology feeds
References
-
git.kernel.org
/stable/c/3d6fd5b9c6acbc005e53d0211c7381f566babec1
patch
-
git.kernel.org
/stable/c/50afcee7011155933d8d5e8832f52eeee018cfd3
patch
-
git.kernel.org
/stable/c/78c9cbde8880ec02d864c166bcb4fe989ce1d95f
patch
-
git.kernel.org
/stable/c/46e2c031aa59ea65128991cbca474bd5c0c2ecdb
patch
-
git.kernel.org
/stable/c/a8c31808925b11393a6601f534bb63bac5366bab
patch
-
git.kernel.org
/stable/c/0beddc2a3f9b9cf7d8887973041e36c2d0fa3652
patch
-
git.kernel.org
/stable/c/16d3d36436492aa248b2d8045e75585ebcc2f34d
patch
-
git.kernel.org
/stable/c/5263822558a8a7c0d0248d5679c2dcf4d5cda61f
patch
-
git.kernel.org
/stable/c/fdf480da5837c23b146c4743c18de97202fcab37
patch
- lists.debian.org /debian-lts-announce/2025/05/msg00045.html
- lists.debian.org /debian-lts-announce/2025/05/msg00030.html
Sources
- CVE List CVE-2025-39735
- NVD CVE-2025-39735
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.