CVE-2022-49186

Source
https://cve.org/CVERecord?id=CVE-2022-49186
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49186.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49186
Downstream
Published
2025-02-26T01:55:35.590Z
Modified
2025-11-28T12:59:31.651479Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
clk: visconti: prevent array overflow in visconti_clk_register_gates()
Details

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

clk: visconti: prevent array overflow in visconticlkregister_gates()

This code was using -1 to represent that there was no reset function. Unfortunately, the -1 was stored in u8 so the if (clks[i].rsid >= 0) condition was always true. This lead to an out of bounds access in visconticlkregistergates().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49186.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
b4cbe606dc3674b25cb661e7cd1a1c6ddaaafaaa
Fixed
2723543c1d60278d5aef1c4ad732dbad24b84a81
Fixed
c5601e0720ce1a3ad895f94a5838530edde01ed3

Affected versions

v5.*

v5.16
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.17.1

Database specific

source

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

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2723543c1d60278d5aef1c4ad732dbad24b84a81",
        "id": "CVE-2022-49186-0bc7d08e",
        "signature_type": "Function",
        "signature_version": "v1",
        "target": {
            "file": "drivers/clk/visconti/clkc.c",
            "function": "visconti_clk_register_gates"
        },
        "deprecated": false,
        "digest": {
            "function_hash": "48154347795811169965938832319215955183",
            "length": 1187.0
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2723543c1d60278d5aef1c4ad732dbad24b84a81",
        "id": "CVE-2022-49186-661afd8c",
        "signature_type": "Line",
        "signature_version": "v1",
        "target": {
            "file": "drivers/clk/visconti/clkc-tmpv770x.c"
        },
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "127280258424311924129927536830206697273",
                "18024761510003019991597757879965657208",
                "225398454593933647133674725594525842914",
                "733237327905814679277528467763367572"
            ],
            "threshold": 0.9
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2723543c1d60278d5aef1c4ad732dbad24b84a81",
        "id": "CVE-2022-49186-8d7661ca",
        "signature_type": "Line",
        "signature_version": "v1",
        "target": {
            "file": "drivers/clk/visconti/clkc.c"
        },
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "113781075975743305947543979960448008978",
                "274613603491395290679882417756106733592",
                "30117486478480498350047576974859386287",
                "209713340870923724684525868320250501624"
            ],
            "threshold": 0.9
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
5.17.2

Database specific

source

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