Vulnerability · Published Apr 18, 2025 · Assigned by Linux
CVE-2025-39735jfs: fix slab-out-of-bounds read in ea_get()
High 7.1
In plain English
A high-severity out-of-bounds read in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.135-1 | DEBIAN-CVE-2025-39735 |
| Debian:13 | linux | 6.12.25-1 | DEBIAN-CVE-2025-39735 |
| Debian:14 | linux | 6.12.25-1 | DEBIAN-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux | 5.15.0-142.152 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux | 6.8.0-86.87 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1086.93 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1041.43 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1041.43~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1091.100 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1041.47 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1018.18~24.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1041.47~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1091.100.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1029.32 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1085.94 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1042.45 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1016.16~24.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1042.45~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1083.89 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1038.43 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1068.76 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1025.28 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-28.28~24.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-86.87~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1078.81 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1039.39 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1039.39~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1081.87 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1082.87 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-142.152 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-86.87.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1015.16~24.04.2 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-86.87.1~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1080.81 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1041.44 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1012.12 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1041.44~22.04.2 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1041.44.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1039.39 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1012.12 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1028.28 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1024.24 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1083.89 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1038.39 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1038.39~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1080.83 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1041.45 | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-86.87~22.04.1 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-39735 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1018.19 | UBUNTU-CVE-2025-39735 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1050.54 | UBUNTU-CVE-2025-39735 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 6e39b681d1eb16f408493bf5023788b57f68998c – before 3d6fd5b9c6acbc005e53d0211c7381f566babec1bbf3f1fd8a0ac7df1db36a9b9e923041a14369f2 – before 50afcee7011155933d8d5e8832f52eeee018cfd327a93c45e16ac25a0e2b5e5668e2d1beca56a478 – before 78c9cbde8880ec02d864c166bcb4fe989ce1d95f9c356fc32a4480a2c0e537a05f2a8617633ddad0 – before 46e2c031aa59ea65128991cbca474bd5c0c2ecdb9353cdf28d4c5c0ff19c5df7fbf81ea774de43a4 – before a8c31808925b11393a6601f534bb63bac5366bab8c505ebeed8045b488b2e60b516c752b851f8437 – before 0beddc2a3f9b9cf7d8887973041e36c2d0fa3652d9f9d96136cba8fedd647d2c024342ce090133c2 – before 16d3d36436492aa248b2d8045e75585ebcc2f34dd9f9d96136cba8fedd647d2c024342ce090133c2 – before 5263822558a8a7c0d0248d5679c2dcf4d5cda61f |
| Linux | Linux | 6.13 |
Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
References
- https://git.kernel.org/stable/c/3d6fd5b9c6acbc005e53d0211c7381f566babec1
- https://git.kernel.org/stable/c/50afcee7011155933d8d5e8832f52eeee018cfd3
- https://git.kernel.org/stable/c/78c9cbde8880ec02d864c166bcb4fe989ce1d95f
- https://git.kernel.org/stable/c/46e2c031aa59ea65128991cbca474bd5c0c2ecdb
- https://git.kernel.org/stable/c/a8c31808925b11393a6601f534bb63bac5366bab
- https://git.kernel.org/stable/c/0beddc2a3f9b9cf7d8887973041e36c2d0fa3652
- https://git.kernel.org/stable/c/16d3d36436492aa248b2d8045e75585ebcc2f34d
- https://git.kernel.org/stable/c/5263822558a8a7c0d0248d5679c2dcf4d5cda61f
- https://git.kernel.org/stable/c/fdf480da5837c23b146c4743c18de97202fcab37
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html