CVE-2022-50743

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50743
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50743.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50743
Downstream
Published
2025-12-24T13:05:40.297Z
Modified
2025-12-24T20:23:42.517283Z
Summary
erofs: Fix pcluster memleak when its block address is zero
Details

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

erofs: Fix pcluster memleak when its block address is zero

syzkaller reported a memleak: https://syzkaller.appspot.com/bug?id=62f37ff612f0021641eda5b17f056f1668aa9aed

unreferenced object 0xffff88811009c7f8 (size 136): ... backtrace: [<ffffffff821db19b>] zerofsdoreadpage+0x99b/0x1740 [<ffffffff821dee9e>] zerofsreadahead+0x24e/0x580 [<ffffffff814bc0d6>] read_pages+0x86/0x3d0 ...

syzkaller constructed a case: in zerofsregisterpcluster(), ztailpacking = false and map->mpa = zero. This makes pcl->obj.index be zero although pcl is not a inline pcluster.

Then following path adds refcount for grp, but the refcount won't be put because pcl is inline.

zerofsreadahead() zerofsdoreadpage() # for another page zerofscollectorbegin() erofsfindworkgroup() erofsworkgroup_get()

Since it's illegal for the block address of a non-inlined pcluster to be zero, add check here to avoid registering the pcluster which would be leaked.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50743.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cecf864d3d76d50e3d9c58145e286a0b8c284e92
Fixed
ac54c1f7b288d83b6ba1e320efff24ecc21309cd
Fixed
618e712b99c78d1004b70a1a9ab0a4830d0b2673
Fixed
c42c0ffe81176940bd5dead474216b7198d77675

Affected versions

v5.*

v5.16
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.10
v6.0.11
v6.0.12
v6.0.13
v6.0.14
v6.0.15
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1

Database specific

source

"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50743.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
6.0.16
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.2

Database specific

source

"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50743.json"