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().
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49186.json"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49186.json"
[
{
"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
}
}
]