# CVE-2022-49761: btrfs: always report error in run\_one\_delayed\_ref()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-03-27T16:43:07.633Z
- **Modified:** 2026-06-17T05:19:04.920Z

## Who should check

- Anyone running Linux \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 18bd1c9c02e64a3567f90c83c2c8b855531c8098; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< fdb4a70bb768d2a87890409597529ad81cb3de8a; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 853ffa1511b058c79a4c9bb1407b3b20ce311792; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92
- Anyone running Linux 3.4

## Description

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

btrfs: always report error in run\_one\_delayed\_ref()

Currently we have a btrfs\_debug() for run\_one\_delayed\_ref() failure, but
if end users hit such problem, there will be no chance that
btrfs\_debug() is enabled.  This can lead to very little useful info for
debugging.

This patch will:

- Add extra info for error reporting
  Including:
  \* logical bytenr
  \* num\_bytes
  \* type
  \* action
  \* ref\_mod

- Replace the btrfs\_debug() with btrfs\_err()

- Move the error reporting into run\_one\_delayed\_ref()
  This is to avoid use-after-free, the @node can be freed in the caller.

This error should only be triggered at most once.

As if run\_one\_delayed\_ref() failed, we trigger the error message, then
causing the call chain to error out:

btrfs\_run\_delayed\_refs()
\`- btrfs\_run\_delayed\_refs()
   \`- btrfs\_run\_delayed\_refs\_for\_head()
      \`- run\_one\_delayed\_ref()

And we will abort the current transaction in btrfs\_run\_delayed\_refs().
If we have to run delayed refs for the abort transaction,
run\_one\_delayed\_ref() will just cleanup the refs and do nothing, thus no
new error messages would be output.

## Affected and fixed versions

- Linux: \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 18bd1c9c02e64a3567f90c83c2c8b855531c8098; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< fdb4a70bb768d2a87890409597529ad81cb3de8a; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 853ffa1511b058c79a4c9bb1407b3b20ce311792; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92 (cvelist)
- Linux: 3.4 (cvelist)

## Mitigation

- Upgrade Linux to 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49761. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49761.md
Affected: Linux >= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, < 18bd1c9c02e64a3567f90c83c2c8b855531c8098; >= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, < fdb4a70bb768d2a87890409597529ad81cb3de8a; >= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, < 853ffa1511b058c79a4c9bb1407b3b20ce311792; >= 79787eaab46121d4713ed03…
Fixed in: Linux 18bd1c9c02e64a3567f90c83c2c8b855531c8098, Linux 853ffa1511b058c79a4c9bb1407b3b20ce311792, Linux 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49761 being exploited?

There is no confirmed exploitation: CVE-2022-49761 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49761?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49761?

Linux \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 18bd1c9c02e64a3567f90c83c2c8b855531c8098; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< fdb4a70bb768d2a87890409597529ad81cb3de8a; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 853ffa1511b058c79a4c9bb1407b3b20ce311792; \>= 79787eaab46121d4713ed03c8fc63b9ec3eaec76, \< 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92; Linux 3.4.

### Is there a fix for CVE-2022-49761?

Yes. Fixed in Linux 18bd1c9c02e64a3567f90c83c2c8b855531c8098, Linux 853ffa1511b058c79a4c9bb1407b3b20ce311792, Linux 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92. Upgrade Linux to 39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92 or later.

### How do I check if I'm affected by CVE-2022-49761?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/18bd1c9c02e64a3567f90c83c2c8b855531c8098>
- patch: <https://git.kernel.org/stable/c/fdb4a70bb768d2a87890409597529ad81cb3de8a>
- patch: <https://git.kernel.org/stable/c/853ffa1511b058c79a4c9bb1407b3b20ce311792>
- patch: <https://git.kernel.org/stable/c/39f501d68ec1ed5cd5c66ac6ec2a7131c517bb92>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49761>

HTML: <https://flawdb.com/CVE-2022-49761> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49761>
