CVE-2024-40902
jfs: xattr: fix buffer overflow for invalid xattr
Check your servers for CVE-2024-40902
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-40902 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
jfs: xattr: fix buffer overflow for invalid xattr
When an xattr size is not what is expected, it is printed out to the kernel log in hex format as a form of debugging. But when that xattr size is bigger than the expected size, printing it out can cause an access off the end of the buffer.
Fix this all up by properly restricting the size of the debug hex dump in the kernel log.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.32%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 26.6% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Aug 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-121 Stack-based Buffer Overflow
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before f0dedb5c511ed82cbaff4997a8decf2351ba549f affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 1e84c9b1838152a87cf453270a5fa75c5037e83a affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before fc745f6e83cb650f9a5f2c864158e3a5ea76dad0 affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 480e5bc21f2c42d90c2c16045d64d824dcdd5ec7 affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 33aecc5799c93d3ee02f853cb94e201f9731f123 affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 4598233d9748fe4db4e13b9f473588aa25e87d69 affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before b537cb2f4c4a1357479716a9c339c0bda03d873f affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 7c55b78818cfb732680c4a72ab270cc2d2ee3d0f
Other versions: unaffected
|
| Linux |
affected 2.6.12 unaffected before 2.6.12 unaffected from 4.19.317 up to and including 4.19.* unaffected from 5.4.279 up to and including 5.4.* unaffected from 5.10.221 up to and including 5.10.* unaffected from 5.15.162 up to and including 5.15.* unaffected from 6.1.95 up to and including 6.1.* unaffected from 6.6.35 up to and including 6.6.* unaffected from 6.9.6 up to and including 6.9.* unaffected 6.10 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-40902 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-40902
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-40902
trivy image --scanners vuln IMAGE | grep CVE-2024-40902
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/f0dedb5c511ed82cbaff4997a8decf2351ba549f git.kernel.org
- https://git.kernel.org/stable/c/1e84c9b1838152a87cf453270a5fa75c5037e83a git.kernel.org
- https://git.kernel.org/stable/c/fc745f6e83cb650f9a5f2c864158e3a5ea76dad0 git.kernel.org
- https://git.kernel.org/stable/c/480e5bc21f2c42d90c2c16045d64d824dcdd5ec7 git.kernel.org
- https://git.kernel.org/stable/c/33aecc5799c93d3ee02f853cb94e201f9731f123 git.kernel.org
- https://git.kernel.org/stable/c/4598233d9748fe4db4e13b9f473588aa25e87d69 git.kernel.org
- https://git.kernel.org/stable/c/b537cb2f4c4a1357479716a9c339c0bda03d873f git.kernel.org
- https://git.kernel.org/stable/c/7c55b78818cfb732680c4a72ab270cc2d2ee3d0f git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html lists.debian.org
Source: the record CVE-2024-40902 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse