What’s Vulnerable › Vulnerabilities
CVE-2024-42312: sysctl: always initialize i_uid/i_gid
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-08-17 · updated 2026-10-15
- Weakness: CWE-908
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.
Affected products
- Linux kernel: from 4.9.187 before 4.10; from 4.14.135 before 4.15; from 4.19.61 before 4.20; from 5.1.20 before 5.2; from 5.2.3 before 5.10.224; from 5.11 before 5.15.165 — fixed in 4.10, 4.15, 4.20, 5.10.224, 5.15.165, 5.2
How to fix
Upgrade to a fixed version: Linux kernel 4.10, 4.15, 4.20, 5.10.224. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/1deae34db9f4f8e0e03f891be2e2e15c15c8ac05
- https://git.kernel.org/stable/c/34a86adea1f2b3c3f9d864c8cce09dca644601ab
- https://git.kernel.org/stable/c/98ca62ba9e2be5863c7d069f84f7166b45a5b2f4
- https://git.kernel.org/stable/c/b2591c89a6e2858796111138c38fcb6851aa1955
- https://git.kernel.org/stable/c/c7e2f43d182f5dde473389dbb39f16c9f0d64536
- https://git.kernel.org/stable/c/ffde3af4b29bf97d62d82e1d45275587e10a991a
- https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html
Get alerted when CVE-2024-42312 or the next vulnerability affects your stack