# CVE-2026-99757: btrfs: sysfs: restore NOFS context on early return in btrfs_sysfs_add_block_group_type()

- 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.18%, higher than 7% of CVEs (2026-12-02)
- Published: 2026-11-20T05:51:26.019Z
- Modified: 2026-11-23T08:18:16.080Z
- Assigned by: Linux

## Description

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

btrfs: sysfs: restore NOFS context on early return in btrfs_sysfs_add_block_group_type()

btrfs_sysfs_add_block_group_type() sets up a NOFS context with
memalloc_nofs_save() because kobject_add() performs GFP_KERNEL
allocations deep in its call chain, and the function may be called
while holding a transaction handle or a lock required for a
transaction commit, where reclaim could deadlock.

Every other return path of this function calls memalloc_nofs_restore()
except the early return taken when another thread has already created
the kobject for the same raid index (this can happen when restriping).
Taking that path leaves PF_MEMALLOC_NOFS set on the calling task, so
all subsequent memory allocations performed by that task remain
restricted to the NOFS scope, which may lead to unexpected allocation
failures or deadlocks later on.

Restore the NOFS context before returning from that path.

(As written by CVE List.)

## Affected

- Linux Linux: from 49ea112da0e6e323bb923315ec54ee920759bf19 before 0161848843c2b9c4332db8d3fda5c65e0b426884; from 49ea112da0e6e323bb923315ec54ee920759bf19 before 27e3994f00f4143b642af67edf5c7fa2a3db2915; from 49ea112da0e6e323bb923315ec54ee920759bf19 before ff30c0696ee227ada87b5aaa7c3b7758eafa9cad; from 49ea112da0e6e323bb923315ec54ee920759bf19 before f56c6e48673e3ffd7bf0485939541c028cb6c084; from 49ea112da0e6e323bb923315ec54ee920759bf19 before fa34d172c9e3ee25162f515c77e04247ea780083; from 49ea112da0e6e323bb923315ec54ee920759bf19 before b72664c8d0e6aada7f48277968266867fd127ea7; from 49ea112da0e6e323bb923315ec54ee920759bf19 before c7011ad8d6941e1a53882c486145935dc5664c6f; from 49ea112da0e6e323bb923315ec54ee920759bf19 before 4172be965c2ce887ebfb1117c634a68555be8c11; 5.10 (not affected: before 5.10; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.118 up to 6.12.*; from 6.18.64 up to 6.18.*; from 7.3.5 up to 7.3.*; from 7.4-rc2 up to *)

## References

- <https://git.kernel.org/stable/c/0161848843c2b9c4332db8d3fda5c65e0b426884>
- <https://git.kernel.org/stable/c/27e3994f00f4143b642af67edf5c7fa2a3db2915>
- <https://git.kernel.org/stable/c/ff30c0696ee227ada87b5aaa7c3b7758eafa9cad>
- <https://git.kernel.org/stable/c/f56c6e48673e3ffd7bf0485939541c028cb6c084>
- <https://git.kernel.org/stable/c/fa34d172c9e3ee25162f515c77e04247ea780083>
- <https://git.kernel.org/stable/c/b72664c8d0e6aada7f48277968266867fd127ea7>
- <https://git.kernel.org/stable/c/c7011ad8d6941e1a53882c486145935dc5664c6f>
- <https://git.kernel.org/stable/c/4172be965c2ce887ebfb1117c634a68555be8c11>

## Sources

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

---

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