In the Linux kernel, the following vulnerability has been resolved:
staging: iio: frequency: ad9834: Validate frequency parameter value
In ad9834writefrequency() clkgetrate() can return 0. In such case ad9834calcfreqreg() call will lead to division by zero. Checking 'if (fout > (clkfreq / 2))' doesn't protect in case of 'fout' is 0. ad9834writefrequency() is called from ad9834write(), where fout is taken from text buffer, which can contain any value.
Modify parameters checking.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[
{
"id": "CVE-2024-47663-237427fb",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c",
"function": "ad9834_write_frequency"
},
"digest": {
"function_hash": "238057437456920215118361389497468179285",
"length": 521.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc12e49f970b08d8b007b8981b97e2eb93c0e89d",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-7f679430",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c",
"function": "ad9834_write_frequency"
},
"digest": {
"function_hash": "238057437456920215118361389497468179285",
"length": 521.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8961b245e8f92bccbaacfbbdf69eba60e3e7c227",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-b11dfb9c",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc12e49f970b08d8b007b8981b97e2eb93c0e89d",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-d267234a",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8b09a5edc4a634373158c1a405491de3c52e58a",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-ddd920d5",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c",
"function": "ad9834_write_frequency"
},
"digest": {
"function_hash": "238057437456920215118361389497468179285",
"length": 521.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41cc91e3138fe52f8da92a81bebcd0e6cf488c53",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-e1b6f6fc",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c",
"function": "ad9834_write_frequency"
},
"digest": {
"function_hash": "238057437456920215118361389497468179285",
"length": 521.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8b09a5edc4a634373158c1a405491de3c52e58a",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-ed2192e0",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8961b245e8f92bccbaacfbbdf69eba60e3e7c227",
"signature_version": "v1"
},
{
"id": "CVE-2024-47663-ff948bd2",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41cc91e3138fe52f8da92a81bebcd0e6cf488c53",
"signature_version": "v1"
}
]