CVE-2024-42312
sysctl: always initialize i_uid/i_gid
Check your servers for CVE-2024-42312
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-42312 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:
sysctl: always initialize i_uid/i_gid
Always initialize i_uid/i_gid inside the sysfs core so set_ownership() can safely skip setting them.
Commit 5ec27ec735ba ("fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.") added defaults for i_uid/i_gid when set_ownership() was not implemented. It also missed adjusting net_ctl_set_ownership() to use the same default values in case the computation of a better value failed.
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.0% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 10 Sep 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
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before b2591c89a6e2858796111138c38fcb6851aa1955 affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before 34a86adea1f2b3c3f9d864c8cce09dca644601ab affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before 1deae34db9f4f8e0e03f891be2e2e15c15c8ac05 affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before ffde3af4b29bf97d62d82e1d45275587e10a991a affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before c7e2f43d182f5dde473389dbb39f16c9f0d64536 affected from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, before 98ca62ba9e2be5863c7d069f84f7166b45a5b2f4 affected e83234d7ef237931148b4b17834dadf57eb46c12 affected 2cbf2af144f0cd08a3361c6299b2e6086b7d21d9 affected 2c7b50c7b1d036f71acd9a917a8cb0f9b6e43dab affected 7eb45a94c279dd5af4cafaa738ae93737517eef4 affected 14cc90952cef94bfa89a6b4a2f55fd9a70f50a16 affected from 4.9.187, before 4.10 affected from 4.14.135, before 4.15 affected from 4.19.61, before 4.20 affected from 5.1.20, before 5.2 affected from 5.2.3, before 5.3
Other versions: unaffected
|
| Linux |
affected 5.3 unaffected before 5.3 unaffected from 5.10.224 up to and including 5.10.* unaffected from 5.15.165 up to and including 5.15.* unaffected from 6.1.104 up to and including 6.1.* unaffected from 6.6.45 up to and including 6.6.* unaffected from 6.10.3 up to and including 6.10.* unaffected 6.11 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-42312 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-42312
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-42312
trivy image --scanners vuln IMAGE | grep CVE-2024-42312
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/b2591c89a6e2858796111138c38fcb6851aa1955 git.kernel.org
- https://git.kernel.org/stable/c/34a86adea1f2b3c3f9d864c8cce09dca644601ab git.kernel.org
- https://git.kernel.org/stable/c/1deae34db9f4f8e0e03f891be2e2e15c15c8ac05 git.kernel.org
- https://git.kernel.org/stable/c/ffde3af4b29bf97d62d82e1d45275587e10a991a git.kernel.org
- https://git.kernel.org/stable/c/c7e2f43d182f5dde473389dbb39f16c9f0d64536 git.kernel.org
- https://git.kernel.org/stable/c/98ca62ba9e2be5863c7d069f84f7166b45a5b2f4 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html lists.debian.org
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html cert-portal.siemens.com
Source: the record CVE-2024-42312 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse