In the Linux kernel, the following vulnerability has been resolved:
staging: iio: frequency: ad9832: fix division by zero in ad9832calcfreqreg()
In the ad9832writefrequency() function, clkgetrate() might return 0. This can lead to a division by zero when calling ad9832calcfreqreg(). The check if (fout > (clkgetrate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832writefrequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50233.json"
}[
{
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2024-50233-23876f9f",
"target": {
"function": "ad9832_write_frequency",
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2024-50233-829aff55",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50233.json"