# CVE-2024-27058: tmpfs: fix race on handling dquot rbtree

- 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.39%, higher than 35% of CVEs (2026-12-01)
- Published: 2024-05-01T13:00:06.852Z
- Modified: 2026-08-05T11:29:17.454Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

tmpfs: fix race on handling dquot rbtree

A syzkaller reproducer found a race while attempting to remove dquot
information from the rb tree.

Fetching the rb_tree root node must also be protected by the
dqopt->dqio_sem, otherwise, giving the right timing, shmem_release_dquot()
will trigger a warning because it couldn't find a node in the tree, when
the real reason was the root node changing before the search starts:

Thread 1				Thread 2
- shmem_release_dquot()			- shmem_{acquire,release}_dquot()

- fetch ROOT				- Fetch ROOT

					- acquire dqio_sem
- wait dqio_sem

					- do something, triger a tree rebalance
					- release dqio_sem

- acquire dqio_sem
- start searching for the node, but
  from the wrong location, missing
  the node, and triggering a warning.

(As written by CVE List.)

## Affected

- Linux Linux: from eafc474e202978ac735c551d5ee1eb8c02e2be54 before c7077f43f30d817d10a9f8245e51576ac114b2f0; from eafc474e202978ac735c551d5ee1eb8c02e2be54 before 617d55b90e73c7b4aa2733ca6cc3f9b72d1124bb; from eafc474e202978ac735c551d5ee1eb8c02e2be54 before f82f184874d2761ebaa60dccf577921a0dbb3810; from eafc474e202978ac735c551d5ee1eb8c02e2be54 before 0a69b6b3a026543bc215ccc866d0aea5579e6ce2; 6.6 (not affected: before 6.6; from 6.6.24 up to 6.6.*; from 6.7.12 up to 6.7.*; from 6.8.3 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 6.6 before 6.6.24; from 6.7 before 6.7.12; from 6.8 before 6.8.3; 6.9

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

## References

- <https://git.kernel.org/stable/c/c7077f43f30d817d10a9f8245e51576ac114b2f0> (patch)
- <https://git.kernel.org/stable/c/617d55b90e73c7b4aa2733ca6cc3f9b72d1124bb> (patch)
- <https://git.kernel.org/stable/c/f82f184874d2761ebaa60dccf577921a0dbb3810> (patch)
- <https://git.kernel.org/stable/c/0a69b6b3a026543bc215ccc866d0aea5579e6ce2> (patch)

## Sources

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

---

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