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