CVE-2022-49699

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49699
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49699.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49699
Downstream
Related
Published
2025-02-26T02:24:20Z
Modified
2025-10-13T20:20:38.652522Z
Summary
filemap: Handle sibling entries in filemap_get_read_batch()
Details

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

filemap: Handle sibling entries in filemapgetread_batch()

If a read races with an invalidation followed by another read, it is possible for a folio to be replaced with a higher-order folio. If that happens, we'll see a sibling entry for the new folio in the next iteration of the loop. This manifests as a NULL pointer dereference while holding the RCU read lock.

Handle this by simply returning. The next call will find the new folio and handle it correctly. The other ways of handling this rare race are more complex and it's just not worth it.

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
cbd59c48ae2bcadc4a7599c29cf32fd3f9b78251
Fixed
a66f131d30e53000f08301776bf85c912ef47aad
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cbd59c48ae2bcadc4a7599c29cf32fd3f9b78251
Fixed
cb995f4eeba9d268fd4b56c2423ad6c1d1ea1b82

Affected versions

v5.*

v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
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.18.1
v5.18.2
v5.18.3
v5.18.4
v5.18.5
v5.18.6
v5.18.7
v5.19-rc1
v5.19-rc2
v5.19-rc3

Database specific

{
    "vanir_signatures": [
        {
            "signature_type": "Line",
            "target": {
                "file": "mm/filemap.c"
            },
            "id": "CVE-2022-49699-1cc93c41",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "263339699948569731125902437391158900796",
                    "131961198065706821517089428011115597842",
                    "272533811852248917095476419302308300322",
                    "174089851487952564119274450727607184231"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb995f4eeba9d268fd4b56c2423ad6c1d1ea1b82",
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "signature_type": "Function",
            "target": {
                "file": "mm/filemap.c",
                "function": "filemap_get_read_batch"
            },
            "id": "CVE-2022-49699-403481af",
            "digest": {
                "length": 690.0,
                "function_hash": "119375419568115413793011752238876102330"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a66f131d30e53000f08301776bf85c912ef47aad",
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "signature_type": "Function",
            "target": {
                "file": "mm/filemap.c",
                "function": "filemap_get_read_batch"
            },
            "id": "CVE-2022-49699-99a4361d",
            "digest": {
                "length": 690.0,
                "function_hash": "119375419568115413793011752238876102330"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb995f4eeba9d268fd4b56c2423ad6c1d1ea1b82",
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "signature_type": "Line",
            "target": {
                "file": "mm/filemap.c"
            },
            "id": "CVE-2022-49699-ff037fb2",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "263339699948569731125902437391158900796",
                    "131961198065706821517089428011115597842",
                    "272533811852248917095476419302308300322",
                    "174089851487952564119274450727607184231"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a66f131d30e53000f08301776bf85c912ef47aad",
            "deprecated": false,
            "signature_version": "v1"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.12.0
Fixed
5.18.8