# CVE-2024-38541: of: module: add buffer overflow check in of_modalias()

- 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.90%, higher than 60% of CVEs (2026-12-01)
- Published: 2024-06-19T13:35:16.637Z
- Modified: 2026-08-05T11:32:39.656Z
- Weaknesses: CWE-120
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Linux

## Description

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

of: module: add buffer overflow check in of_modalias()

In of_modalias(), if the buffer happens to be too small even for the 1st
snprintf() call, the len parameter will become negative and str parameter
(if not NULL initially) will point beyond the buffer's end. Add the buffer
overflow check after the 1st snprintf() call and fix such check after the
strlen() call (accounting for the terminating NUL char).

(As written by CVE List.)

## Affected

- Linux Linux: from bc575064d688c8933a6ca51429bea9bc63628d3b before 46795440ef2b4ac919d09310a69a404c5bc90a88; from bc575064d688c8933a6ca51429bea9bc63628d3b before 733e62786bdf1b2b9dbb09ba2246313306503414; from bc575064d688c8933a6ca51429bea9bc63628d3b before c7f24b7d94549ff4623e8f41ea4d9f5319bd8ac8; from bc575064d688c8933a6ca51429bea9bc63628d3b before 5d59fd637a8af42b211a92b2edb2474325b4d488; from bc575064d688c8933a6ca51429bea9bc63628d3b before 0b0d5701a8bf02f8fee037e81aacf6746558bfd6; from bc575064d688c8933a6ca51429bea9bc63628d3b before ee332023adfd5882808f2dabf037b32d6ce36f9e; from bc575064d688c8933a6ca51429bea9bc63628d3b before e45b69360a63165377b30db4a1dfddd89ca18e9a; from bc575064d688c8933a6ca51429bea9bc63628d3b before cf7385cb26ac4f0ee6c7385960525ad534323252; 4.14 (not affected: before 4.14; from 5.4.294 up to 5.4.*; from 5.10.238 up to 5.10.*; from 5.15.182 up to 5.15.*; from 6.1.136 up to 6.1.*; from 6.6.33 up to 6.6.*; from 6.8.12 up to 6.8.*; from 6.9.3 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from bc575064d688 before 0b0d5701a8bf; from bc575064d688 before ee332023adfd; from bc575064d688 before e45b69360a63; from bc575064d688 before cf7385cb26ac; 4.14; from 4.14 before 5.4.294; from 5.5 before 5.10.238; from 5.11 before 5.15.182; from 5.16 before 6.1.136; from 6.2 before 6.6.33; from 6.7 before 6.8.12; from 6.9 before 6.9.3 (not affected: before 4.14; from 6.6.33 up to 6.7; from 6.8.12 up to 6.9; from 6.9.3 up to 6.10; 6.10-rc1)

## 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`
- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/46795440ef2b4ac919d09310a69a404c5bc90a88> (patch)
- <https://git.kernel.org/stable/c/733e62786bdf1b2b9dbb09ba2246313306503414> (patch)
- <https://git.kernel.org/stable/c/c7f24b7d94549ff4623e8f41ea4d9f5319bd8ac8> (patch)
- <https://git.kernel.org/stable/c/5d59fd637a8af42b211a92b2edb2474325b4d488> (patch)
- <https://git.kernel.org/stable/c/0b0d5701a8bf02f8fee037e81aacf6746558bfd6> (patch)
- <https://git.kernel.org/stable/c/ee332023adfd5882808f2dabf037b32d6ce36f9e> (patch)
- <https://git.kernel.org/stable/c/e45b69360a63165377b30db4a1dfddd89ca18e9a> (patch)
- <https://git.kernel.org/stable/c/cf7385cb26ac4f0ee6c7385960525ad534323252> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## Sources

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

---

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