CVE-2022-49515

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49515
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49515.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49515
Downstream
Related
Published
2025-02-26T02:13:43Z
Modified
2025-10-21T10:17:04.438579Z
Summary
ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
Details

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

ASoC: cs35l41: Fix an out-of-bounds access in otppackedelement_t

The CS35L41NUMOTPELEM is 100, but only 99 entries are defined in the array otpmap1/2[CS35L41NUMOTPELEM], this will trigger UBSAN to report a shift-out-of-bounds warning in the cs35l41otpunpack() since the last entry in the array will result in GENMASK(-1, 0).

UBSAN reports this problem: UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23 Hardware name: LENOVO \x02MFGINGO/\x02MFGINGO, BIOS N3GET19W (1.00 ) 03/11/2022 Call Trace: <TASK> showstack+0x52/0x58 dumpstacklvl+0x4a/0x5f dumpstack+0x10/0x12 ubsanepilogue+0x9/0x45 _ubsanhandleshiftoutofbounds.cold+0x61/0xef ? regmapunlockmutex+0xe/0x10 cs35l41otpunpack.cold+0x1c6/0x2b2 [sndsoccs35l41lib] cs35l41hdaprobe+0x24f/0x33a [sndhdascodeccs35l41] cs35l41hdai2cprobe+0x65/0x90 [sndhdascodeccs35l41i2c] ? cs35l41hdai2cremove+0x20/0x20 [sndhdascodeccs35l41i2c] i2cdevice_probe+0x252/0x2b0

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
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
dbc35268e14d5d89c7a9db72009ad4dcd9ede646
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
a59b9958416096dd21dc4f62b0c5be525d459ca8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
9f342904216f378e88008bb0ce1ae200a4b99fe8

Affected versions

v5.*

v5.15
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.17.1
v5.17.10
v5.17.11
v5.17.12
v5.17.13
v5.17.2
v5.17.3
v5.17.4
v5.17.5
v5.17.6
v5.17.7
v5.17.8
v5.17.9
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

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f342904216f378e88008bb0ce1ae200a4b99fe8",
        "signature_version": "v1",
        "deprecated": false,
        "id": "CVE-2022-49515-267ad8de",
        "target": {
            "file": "sound/soc/codecs/cs35l41-lib.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "82680383183146078872998122417961329964",
                "98058763664458263344428225776229974927",
                "94886853474756061377478661654050630134",
                "241329420694268245460754115627683015680",
                "113467859397954083543762550023722238919",
                "190357255738216900178749425296433252645",
                "177080736740188304666736409761474685112",
                "310550189838800286196721537660962388329",
                "236554653772838159093311343205964052175",
                "331303198314136516205612376578803054679",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "42125261553174527500858486401135576268",
                "29232835592335192624535034558288180011",
                "26376469657129595071082026818492871010",
                "258613945997021822879354419352127117507",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "206507050366306026442422360213644934928",
                "283043346446764497711700651948538767897",
                "181828173170062589404166813162747050402",
                "272513309743230996051514604222269085283",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "178787661448219258472331743856413882091",
                "214488294490280149715385723720208399319",
                "116987603863172350909755543114773609154",
                "179382138387428651097663331277637078332",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "31079231091409073358715205721855833308",
                "270501932314475562026344855611006949505",
                "129312984303304128985107616458234766237",
                "31563278074571982363051396576682905045",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a59b9958416096dd21dc4f62b0c5be525d459ca8",
        "signature_version": "v1",
        "deprecated": false,
        "id": "CVE-2022-49515-34f01bef",
        "target": {
            "file": "sound/soc/codecs/cs35l41-lib.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "82680383183146078872998122417961329964",
                "98058763664458263344428225776229974927",
                "94886853474756061377478661654050630134",
                "241329420694268245460754115627683015680",
                "113467859397954083543762550023722238919",
                "190357255738216900178749425296433252645",
                "177080736740188304666736409761474685112",
                "310550189838800286196721537660962388329",
                "236554653772838159093311343205964052175",
                "331303198314136516205612376578803054679",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "42125261553174527500858486401135576268",
                "29232835592335192624535034558288180011",
                "26376469657129595071082026818492871010",
                "258613945997021822879354419352127117507",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "206507050366306026442422360213644934928",
                "283043346446764497711700651948538767897",
                "181828173170062589404166813162747050402",
                "272513309743230996051514604222269085283",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "178787661448219258472331743856413882091",
                "214488294490280149715385723720208399319",
                "116987603863172350909755543114773609154",
                "179382138387428651097663331277637078332",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "31079231091409073358715205721855833308",
                "270501932314475562026344855611006949505",
                "129312984303304128985107616458234766237",
                "31563278074571982363051396576682905045",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dbc35268e14d5d89c7a9db72009ad4dcd9ede646",
        "signature_version": "v1",
        "deprecated": false,
        "id": "CVE-2022-49515-b8e1668f",
        "target": {
            "file": "sound/soc/codecs/cs35l41-lib.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "82680383183146078872998122417961329964",
                "98058763664458263344428225776229974927",
                "94886853474756061377478661654050630134",
                "241329420694268245460754115627683015680",
                "113467859397954083543762550023722238919",
                "190357255738216900178749425296433252645",
                "177080736740188304666736409761474685112",
                "310550189838800286196721537660962388329",
                "236554653772838159093311343205964052175",
                "331303198314136516205612376578803054679",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "42125261553174527500858486401135576268",
                "29232835592335192624535034558288180011",
                "26376469657129595071082026818492871010",
                "258613945997021822879354419352127117507",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "206507050366306026442422360213644934928",
                "283043346446764497711700651948538767897",
                "181828173170062589404166813162747050402",
                "272513309743230996051514604222269085283",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "178787661448219258472331743856413882091",
                "214488294490280149715385723720208399319",
                "116987603863172350909755543114773609154",
                "179382138387428651097663331277637078332",
                "225530923359865484791807859925095094273",
                "205743740223357260086360351952521871987",
                "276765870913503293406927615618034015100",
                "31079231091409073358715205721855833308",
                "270501932314475562026344855611006949505",
                "129312984303304128985107616458234766237",
                "31563278074571982363051396576682905045",
                "66204569234244489648515015510479931089",
                "205743740223357260086360351952521871987"
            ]
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.17.14
Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.18.3