CVE-2022-49913

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49913
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49913.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49913
Related
Published
2025-05-01T15:16:16Z
Modified
2025-05-02T14:45:54.065253Z
Summary
[none]
Details

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

btrfs: fix inode list leak during backref walking at findparentnodes()

During backref walking, at findparentnodes(), if we are dealing with a data extent and we get an error while resolving the indirect backrefs, at resolveindirectrefs(), or in the while loop that iterates over the refs in the direct refs rbtree, we end up leaking the inode lists attached to the direct refs we have in the direct refs rbtree that were not yet added to the refs ulist passed as argument to findparentnodes(). Since they were not yet added to the refs ulist and prelim_release() does not free the lists, on error the caller can only free the lists attached to the refs that were added to the refs ulist, all the remaining refs get their inode lists never freed, therefore leaking their memory.

Fix this by having prelimrelease() always free any attached inode list to each ref found in the rbtree, and have findparentnodes() set the ref's inode list to NULL once it transfers ownership of the inode list to a ref added to the refs ulist passed to findparent_nodes().

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.158-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1~bpo10+1
5.10.120-1
5.10.127-1
5.10.127-2~bpo10+1
5.10.127-2
5.10.136-1
5.10.140-1
5.10.148-1
5.10.149-1
5.10.149-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.8-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.8-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}