# CVE-2024-38570: gfs2: Fix potential glock use-after-free on unmount

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/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.91%, higher than 58% of CVEs (2026-11-30)
- Published: 2024-06-19T13:35:36.274Z
- Modified: 2026-10-30T13:17:28.710Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

gfs2: Fix potential glock use-after-free on unmount

When a DLM lockspace is released and there ares still locks in that
lockspace, DLM will unlock those locks automatically.  Commit
fb6791d100d1b started exploiting this behavior to speed up filesystem
unmount: gfs2 would simply free glocks it didn't want to unlock and then
release the lockspace.  This didn't take the bast callbacks for
asynchronous lock contention notifications into account, which remain
active until until a lock is unlocked or its lockspace is released.

To prevent those callbacks from accessing deallocated objects, put the
glocks that should not be unlocked on the sd_dead_glocks list, release
the lockspace, and only then free those glocks.

As an additional measure, ignore unexpected ast and bast callbacks if
the receiving glock is dead.

(As written by CVE List.)

## Affected

- Linux Linux: from fb6791d100d1bba20b5cdbc4912e1f7086ec60f8 before 94b32a85d1a76ae4f1b42a88677fa20b20187729; from fb6791d100d1bba20b5cdbc4912e1f7086ec60f8 before 0636b34b44589b142700ac137b5f69802cfe2e37; from fb6791d100d1bba20b5cdbc4912e1f7086ec60f8 before e42e8a24d7f02d28763d16ca7ec5fc6d1f142af0; from fb6791d100d1bba20b5cdbc4912e1f7086ec60f8 before 501cd8fabf621d10bd4893e37f6ce6c20523c8ca; from fb6791d100d1bba20b5cdbc4912e1f7086ec60f8 before d98779e687726d8f8860f1c54b5687eec5f63a73; 3.8 (not affected: before 3.8; from 6.1.191 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 3.8 before 6.6.33; from 6.7 before 6.8.12; from 6.9 before 6.9.3

## Every score

- Linux: 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`
- NVD: 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`

## References

- <https://git.kernel.org/stable/c/94b32a85d1a76ae4f1b42a88677fa20b20187729>
- <https://git.kernel.org/stable/c/0636b34b44589b142700ac137b5f69802cfe2e37> (patch)
- <https://git.kernel.org/stable/c/e42e8a24d7f02d28763d16ca7ec5fc6d1f142af0> (patch)
- <https://git.kernel.org/stable/c/501cd8fabf621d10bd4893e37f6ce6c20523c8ca> (patch)
- <https://git.kernel.org/stable/c/d98779e687726d8f8860f1c54b5687eec5f63a73> (patch)

## Sources

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

---

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