In the Linux kernel, the following vulnerability has been resolved:
i2c: designware: Fix handling of real but unexpected device interrupts
Commit c7b79a752871 ("mfd: intel-lpss: Add Intel Alder Lake PCH-S PCI IDs") caused a regression on certain Gigabyte motherboards for Intel Alder Lake-S where system crashes to NULL pointer dereference in i2cdwxfer_msg() when system resumes from S3 sleep state ("deep").
I was able to debug the issue on Gigabyte Z690 AORUS ELITE and made following notes:
My guess is that the firmware uses this controller to communicate with an on-board I2C device during resume but does not disable the controller before giving control to an operating system.
I was told the UEFI update fixes this but never the less it revealed the driver is not ready to handle TXEMPTY (or RXFULL) interrupt when device is supposed to be idle and state variables are not set (especially the dev->msgs pointer which may point to NULL or stale old data).
Introduce a new software status flag STATUS_ACTIVE indicating when the controller is active in driver point of view. Now treat all interrupts that occur when is not set as unexpected and mask all interrupts from the controller.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50370.json",
"cna_assigner": "Linux"
}[
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h"
},
"id": "CVE-2022-50370-21448b13",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fa5304c4b5b425d4a0b3acf10139a7f6108a85f",
"digest": {
"line_hashes": [
"142847431108705915590159071369770238748",
"63033183490355944214929398668903768965",
"237611435902271580334096736946133184914",
"255975239519183176498949935993618274182",
"132680302747988667617656587863530015515",
"251860568191781078694076200729911623568",
"17747559721587011100238673499089256892",
"162832797121859164054321122793845685549",
"247343595220200753645218768177280028049",
"161712397806407883092341024353716714222",
"312370865088923960902901928133914474368",
"29557323638030692103974673814227267359"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_enable"
},
"id": "CVE-2022-50370-2d678a4a",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fa5304c4b5b425d4a0b3acf10139a7f6108a85f",
"digest": {
"function_hash": "150053225895683387961674703193406935802",
"length": 97.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_enable"
},
"id": "CVE-2022-50370-35f66173",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa59ac81e859006d3a1df035a19b3f2089110f93",
"digest": {
"function_hash": "150053225895683387961674703193406935802",
"length": 97.0
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c"
},
"id": "CVE-2022-50370-3df9c799",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a206f7fbe9589c60fafad12884628c909ecb042f",
"digest": {
"line_hashes": [
"229510964343592007845683348061306108127",
"300844158555672178718626525706229008312",
"323757151780197774399912890452877211359",
"121449987644772762248214704280710850252"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c",
"function": "i2c_dw_irq_handler_master"
},
"id": "CVE-2022-50370-4e5df274",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@301c8f5c32c8fb79c67539bc23972dc3ef48024c",
"digest": {
"function_hash": "16721769605573504084212591526879435408",
"length": 770.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_disable_nowait"
},
"id": "CVE-2022-50370-5634a154",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a206f7fbe9589c60fafad12884628c909ecb042f",
"digest": {
"function_hash": "187217874741744647038742551661232920696",
"length": 97.0
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h"
},
"id": "CVE-2022-50370-5b774347",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa59ac81e859006d3a1df035a19b3f2089110f93",
"digest": {
"line_hashes": [
"142847431108705915590159071369770238748",
"63033183490355944214929398668903768965",
"237611435902271580334096736946133184914",
"255975239519183176498949935993618274182",
"132680302747988667617656587863530015515",
"251860568191781078694076200729911623568",
"17747559721587011100238673499089256892",
"162832797121859164054321122793845685549",
"247343595220200753645218768177280028049",
"161712397806407883092341024353716714222",
"312370865088923960902901928133914474368",
"29557323638030692103974673814227267359"
],
"threshold": 0.9
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c"
},
"id": "CVE-2022-50370-5e95d5e7",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa59ac81e859006d3a1df035a19b3f2089110f93",
"digest": {
"line_hashes": [
"229510964343592007845683348061306108127",
"300844158555672178718626525706229008312",
"323757151780197774399912890452877211359",
"121449987644772762248214704280710850252"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c",
"function": "i2c_dw_irq_handler_master"
},
"id": "CVE-2022-50370-79d86a79",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fa5304c4b5b425d4a0b3acf10139a7f6108a85f",
"digest": {
"function_hash": "329806229712681622801402150185670072445",
"length": 700.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_disable_nowait"
},
"id": "CVE-2022-50370-8104448b",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@301c8f5c32c8fb79c67539bc23972dc3ef48024c",
"digest": {
"function_hash": "187217874741744647038742551661232920696",
"length": 97.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c",
"function": "i2c_dw_irq_handler_master"
},
"id": "CVE-2022-50370-8ed60d05",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a206f7fbe9589c60fafad12884628c909ecb042f",
"digest": {
"function_hash": "16721769605573504084212591526879435408",
"length": 770.0
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c"
},
"id": "CVE-2022-50370-bdcf2a9b",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@301c8f5c32c8fb79c67539bc23972dc3ef48024c",
"digest": {
"line_hashes": [
"229510964343592007845683348061306108127",
"300844158555672178718626525706229008312",
"323757151780197774399912890452877211359",
"121449987644772762248214704280710850252"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_disable_nowait"
},
"id": "CVE-2022-50370-c37d6bbe",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa59ac81e859006d3a1df035a19b3f2089110f93",
"digest": {
"function_hash": "187217874741744647038742551661232920696",
"length": 97.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_enable"
},
"id": "CVE-2022-50370-cd314ee5",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a206f7fbe9589c60fafad12884628c909ecb042f",
"digest": {
"function_hash": "150053225895683387961674703193406935802",
"length": 97.0
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_enable"
},
"id": "CVE-2022-50370-db49066a",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@301c8f5c32c8fb79c67539bc23972dc3ef48024c",
"digest": {
"function_hash": "150053225895683387961674703193406935802",
"length": 97.0
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h"
},
"id": "CVE-2022-50370-e8bb795e",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@301c8f5c32c8fb79c67539bc23972dc3ef48024c",
"digest": {
"line_hashes": [
"142847431108705915590159071369770238748",
"63033183490355944214929398668903768965",
"237611435902271580334096736946133184914",
"255975239519183176498949935993618274182",
"132680302747988667617656587863530015515",
"251860568191781078694076200729911623568",
"17747559721587011100238673499089256892",
"162832797121859164054321122793845685549",
"247343595220200753645218768177280028049",
"161712397806407883092341024353716714222",
"312370865088923960902901928133914474368",
"29557323638030692103974673814227267359"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c",
"function": "i2c_dw_irq_handler_master"
},
"id": "CVE-2022-50370-e95880c0",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa59ac81e859006d3a1df035a19b3f2089110f93",
"digest": {
"function_hash": "16721769605573504084212591526879435408",
"length": 770.0
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-master.c"
},
"id": "CVE-2022-50370-f446d967",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fa5304c4b5b425d4a0b3acf10139a7f6108a85f",
"digest": {
"line_hashes": [
"229510964343592007845683348061306108127",
"300844158555672178718626525706229008312",
"323757151780197774399912890452877211359",
"121449987644772762248214704280710850252"
],
"threshold": 0.9
}
},
{
"signature_type": "Line",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h"
},
"id": "CVE-2022-50370-f6b2857e",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a206f7fbe9589c60fafad12884628c909ecb042f",
"digest": {
"line_hashes": [
"142847431108705915590159071369770238748",
"63033183490355944214929398668903768965",
"237611435902271580334096736946133184914",
"255975239519183176498949935993618274182",
"132680302747988667617656587863530015515",
"251860568191781078694076200729911623568",
"17747559721587011100238673499089256892",
"162832797121859164054321122793845685549",
"247343595220200753645218768177280028049",
"161712397806407883092341024353716714222",
"312370865088923960902901928133914474368",
"29557323638030692103974673814227267359"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"signature_version": "v1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-core.h",
"function": "__i2c_dw_disable_nowait"
},
"id": "CVE-2022-50370-f6ff7e48",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7fa5304c4b5b425d4a0b3acf10139a7f6108a85f",
"digest": {
"function_hash": "187217874741744647038742551661232920696",
"length": 97.0
}
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50370.json"