# CVE-2024-36883: net: fix out-of-bounds access in ops_init

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 25% of CVEs (2026-12-01)
- Published: 2024-05-30T15:28:53.302Z
- Modified: 2026-08-05T11:31:49.005Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: fix out-of-bounds access in ops_init

net_alloc_generic is called by net_alloc, which is called without any
locking. It reads max_gen_ptrs, which is changed under pernet_ops_rwsem. It
is read twice, first to allocate an array, then to set s.len, which is
later used to limit the bounds of the array access.

It is possible that the array is allocated and another thread is
registering a new pernet ops, increments max_gen_ptrs, which is then used
to set s.len with a larger than allocated length for the variable array.

Fix it by reading max_gen_ptrs only once in net_alloc_generic. If
max_gen_ptrs is later incremented, it will be caught in net_assign_generic.

(As written by CVE List.)

## Affected

- Linux Linux: from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before 3cdc34d76c4f777579e28ad373979d36c030cfd3; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before 7b0e64583eab8c1d896b47e5dd0bf2e7d86ec41f; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before 0c3248bc708a7797be573214065cf908ff1f54c7; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before 9518b79bfd2fbf99fa9b7e8e36bcb1825e7ba030; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before 2d60ff5874aefd006717ca5e22ac1e25eac29c42; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before b6dbfd5bcc267a95a0bf1bf96af46243f96ec6cd; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before f4f94587e1bf87cb40ec33955a9d90148dd026ab; from 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 before a26ff37e624d12e28077e5b24d2b264f62764ad6; 561331eae0a03d0c4cf60f3cf485aa3e8aa5ab48; a2c82f7bee1ffa9eafa1fb0bd886a7eea8c9e497; from 3.0.19 before 3.1; from 3.2.3 before 3.3; and 1 more (not affected: before 3.3; from 4.19.314 up to 4.19.*; from 5.4.276 up to 5.4.*; from 5.10.217 up to 5.10.*; from 5.15.159 up to 5.15.*; from 6.1.91 up to 6.1.*; from 6.6.31 up to 6.6.*; from 6.8.10 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 3.0.19 before 3.1; from 3.2.3 before 3.3; from 3.3.1 before 4.19.314; from 4.20 before 5.4.276; from 5.5 before 5.10.217; from 5.11 before 5.15.159; from 5.16 before 6.1.91; from 6.2 before 6.6.31; from 6.7 before 6.8.10; 3.3; 6.9
- debian debian_linux: 10.0

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.1 High `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/3cdc34d76c4f777579e28ad373979d36c030cfd3> (patch)
- <https://git.kernel.org/stable/c/7b0e64583eab8c1d896b47e5dd0bf2e7d86ec41f> (patch)
- <https://git.kernel.org/stable/c/0c3248bc708a7797be573214065cf908ff1f54c7> (patch)
- <https://git.kernel.org/stable/c/9518b79bfd2fbf99fa9b7e8e36bcb1825e7ba030> (patch)
- <https://git.kernel.org/stable/c/2d60ff5874aefd006717ca5e22ac1e25eac29c42> (patch)
- <https://git.kernel.org/stable/c/b6dbfd5bcc267a95a0bf1bf96af46243f96ec6cd> (patch)
- <https://git.kernel.org/stable/c/f4f94587e1bf87cb40ec33955a9d90148dd026ab> (patch)
- <https://git.kernel.org/stable/c/a26ff37e624d12e28077e5b24d2b264f62764ad6> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00019.html> (third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20241018-0001/> (third-party-advisory)

## Sources

- CVE List: [CVE-2024-36883](https://www.cve.org/CVERecord?id=CVE-2024-36883), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-36883](https://nvd.nist.gov/vuln/detail/CVE-2024-36883), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-36883 · Whole record: https://cve.day/CVE-2024-36883.json · Rebuilt by cve.day 2026-11-25T22:58:41.135Z
