In the Linux kernel, the following vulnerability has been resolved:
i2c: designware: use casting of u64 in clock multiplication to avoid overflow
In functions i2cdwscllcnt() and i2cdwsclhcnt() may have overflow by depending on the values of the given parameters including the icclk. For example in our use case where icclk is larger than one million, multiplication of ic_clk * 4700 will result in 32 bit overflow.
Add cast of u64 to the calculation to avoid multiplication overflow, and use the corresponding define for divide.
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f36aae9e80e79b7a6d62227eaa96935166be9fe",
"id": "CVE-2022-49749-02e8f109",
"target": {
"function": "i2c_dw_scl_lcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 144.0,
"function_hash": "283370322171801417381529519558196975613"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8c37bc514514999e62a17e95160ed9ebf75ca8d",
"id": "CVE-2022-49749-0f29b49b",
"target": {
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"169143760841647102378393727882283441241",
"190680443123812930960536612338057631590",
"44601721575985520005416669106148430365",
"324785313376432604853210090483701431015",
"257319952035969059259261531785344989831",
"281044120654078271735219893326359531419",
"293214209776778195550621473861323382425",
"141552483637340219702520693681491121043",
"82377070076660012003741942059943420943",
"23007198987594728761038680166558438959"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f29d780bd691d20e89e5b35d5e6568607115e94",
"id": "CVE-2022-49749-2392b4c1",
"target": {
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"169143760841647102378393727882283441241",
"190680443123812930960536612338057631590",
"44601721575985520005416669106148430365",
"324785313376432604853210090483701431015",
"257319952035969059259261531785344989831",
"281044120654078271735219893326359531419",
"293214209776778195550621473861323382425",
"141552483637340219702520693681491121043",
"82377070076660012003741942059943420943",
"23007198987594728761038680166558438959"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8c37bc514514999e62a17e95160ed9ebf75ca8d",
"id": "CVE-2022-49749-5bde34f1",
"target": {
"function": "i2c_dw_scl_lcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 144.0,
"function_hash": "283370322171801417381529519558196975613"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f29d780bd691d20e89e5b35d5e6568607115e94",
"id": "CVE-2022-49749-5f179381",
"target": {
"function": "i2c_dw_scl_hcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 232.0,
"function_hash": "217674695790494320087706092314314323061"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ed173f77fd28a3e4fffc13b3f28687b9eba61157",
"id": "CVE-2022-49749-7897db5c",
"target": {
"function": "i2c_dw_scl_hcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 232.0,
"function_hash": "217674695790494320087706092314314323061"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f29d780bd691d20e89e5b35d5e6568607115e94",
"id": "CVE-2022-49749-b334f0c3",
"target": {
"function": "i2c_dw_scl_lcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 144.0,
"function_hash": "283370322171801417381529519558196975613"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f36aae9e80e79b7a6d62227eaa96935166be9fe",
"id": "CVE-2022-49749-c76bb22e",
"target": {
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"169143760841647102378393727882283441241",
"190680443123812930960536612338057631590",
"44601721575985520005416669106148430365",
"324785313376432604853210090483701431015",
"257319952035969059259261531785344989831",
"281044120654078271735219893326359531419",
"293214209776778195550621473861323382425",
"141552483637340219702520693681491121043",
"82377070076660012003741942059943420943",
"23007198987594728761038680166558438959"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ed173f77fd28a3e4fffc13b3f28687b9eba61157",
"id": "CVE-2022-49749-cfebbbc4",
"target": {
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"169143760841647102378393727882283441241",
"190680443123812930960536612338057631590",
"44601721575985520005416669106148430365",
"324785313376432604853210090483701431015",
"257319952035969059259261531785344989831",
"281044120654078271735219893326359531419",
"293214209776778195550621473861323382425",
"141552483637340219702520693681491121043",
"82377070076660012003741942059943420943",
"23007198987594728761038680166558438959"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f36aae9e80e79b7a6d62227eaa96935166be9fe",
"id": "CVE-2022-49749-da21d35a",
"target": {
"function": "i2c_dw_scl_hcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 232.0,
"function_hash": "217674695790494320087706092314314323061"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8c37bc514514999e62a17e95160ed9ebf75ca8d",
"id": "CVE-2022-49749-dd5d24af",
"target": {
"function": "i2c_dw_scl_hcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 232.0,
"function_hash": "217674695790494320087706092314314323061"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ed173f77fd28a3e4fffc13b3f28687b9eba61157",
"id": "CVE-2022-49749-f19e77d7",
"target": {
"function": "i2c_dw_scl_lcnt",
"file": "drivers/i2c/busses/i2c-designware-common.c"
},
"deprecated": false,
"digest": {
"length": 144.0,
"function_hash": "283370322171801417381529519558196975613"
},
"signature_type": "Function"
}
]