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.
[
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc12e49f970b08d8b007b8981b97e2eb93c0e89d",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-237427fb",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5edc3a45ef428501000a7b23d0e1777a548907f6",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-24d0d9b1",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0e727707a239d5c519fc9abc2f0fd913516a7e47",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-2c95b3c6",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3ba9abfcaa9e16bb91ed7e0e2b42e94a157a953e",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-2e726a55",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b48aa991758999d4e8f9296c5bbe388f293ef465",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-3a203f52",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3ba9abfcaa9e16bb91ed7e0e2b42e94a157a953e",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-3ce3b36f",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b48aa991758999d4e8f9296c5bbe388f293ef465",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-5e0d9726",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8961b245e8f92bccbaacfbbdf69eba60e3e7c227",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-7f679430",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc12e49f970b08d8b007b8981b97e2eb93c0e89d",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-b11dfb9c",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8b09a5edc4a634373158c1a405491de3c52e58a",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-d267234a",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41cc91e3138fe52f8da92a81bebcd0e6cf488c53",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-ddd920d5",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8b09a5edc4a634373158c1a405491de3c52e58a",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-e1b6f6fc",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0e727707a239d5c519fc9abc2f0fd913516a7e47",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-e2bb9e75",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5edc3a45ef428501000a7b23d0e1777a548907f6",
"digest": {
"length": 521.0,
"function_hash": "238057437456920215118361389497468179285"
},
"id": "CVE-2024-47663-e7b814e4",
"signature_version": "v1",
"target": {
"function": "ad9834_write_frequency",
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8961b245e8f92bccbaacfbbdf69eba60e3e7c227",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-ed2192e0",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41cc91e3138fe52f8da92a81bebcd0e6cf488c53",
"digest": {
"line_hashes": [
"96902340075906807662648544801845639797",
"71781774474465080832157107430797103499",
"150429074090825587146120537325230681778",
"307764607749510832127256747781416279393"
],
"threshold": 0.9
},
"id": "CVE-2024-47663-ff948bd2",
"signature_version": "v1",
"target": {
"file": "drivers/staging/iio/frequency/ad9834.c"
}
}
]