# CVE-2025-40348: slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts

- Severity: not scored yet
- 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.21%, higher than 12% of CVEs (2026-12-02)
- Published: 2025-12-16T13:30:22.368Z
- Modified: 2026-10-14T13:10:00.187Z
- Assigned by: Linux

## Description

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

slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts

If two competing threads enter alloc_slab_obj_exts() and one of them
fails to allocate the object extension vector, it might override the
valid slab->obj_exts allocated by the other thread with
OBJEXTS_ALLOC_FAIL. This will cause the thread that lost this race and
expects a valid pointer to dereference a NULL pointer later on.

Update slab->obj_exts atomically using cmpxchg() to avoid
slab->obj_exts overrides by racing threads.

Thanks for Vlastimil and Suren's help with debugging.

(As written by CVE List.)

## Affected

- Linux Linux: from 715b6a5b41dae39baeaa40d3386b548bb278b9c2 before c7af5300d78460fc5037ddc77113ba3dbfe77dc0; from 07e38a54cabd9b4de7ceb7f075f29ffa463e458a before 7c34feda6a9a203c9744281f1b6671b7dad2012d; from f7381b9116407ba2a429977c80ff8df953ea9354 before 6ed8bfd24ce1cb31742b09a3eb557cd008533eec; from 6.12.54 before 6.12.56; from 6.17.4 before 6.17.6

## References

- <https://git.kernel.org/stable/c/c7af5300d78460fc5037ddc77113ba3dbfe77dc0>
- <https://git.kernel.org/stable/c/7c34feda6a9a203c9744281f1b6671b7dad2012d>
- <https://git.kernel.org/stable/c/6ed8bfd24ce1cb31742b09a3eb557cd008533eec>

## Sources

- CVE List: [CVE-2025-40348](https://www.cve.org/CVERecord?id=CVE-2025-40348), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40348](https://nvd.nist.gov/vuln/detail/CVE-2025-40348), Public domain, modified 2026-10-14

---

Page: https://cve.day/CVE-2025-40348 · Whole record: https://cve.day/CVE-2025-40348.json · Rebuilt by cve.day 2026-11-25T22:59:09.468Z
