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
[
{
"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"
]
}
}
]