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.
[
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-23876f9f",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec",
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-364abe77",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@442f786c5bff8cfd756ebdeaa4aadbf05c22aa5a",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-3d71874d",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@442f786c5bff8cfd756ebdeaa4aadbf05c22aa5a",
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-622ba374",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fcd6b59f7a774558e2525251c68aa37aff748e55",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-6c11d0be",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dd9e1cf619c945f320e686dcaf13e37ef0b05fdd",
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-6c98a88d",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd301819f8f69331a55ae2336c8b111fc933f3d",
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-6cfc7d1f",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ccbc10647aafe2b7506edb4b10e19c6c2416c162",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-6f28524f",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bd301819f8f69331a55ae2336c8b111fc933f3d",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-829aff55",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-870b551d",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ccbc10647aafe2b7506edb4b10e19c6c2416c162",
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"id": "CVE-2024-50233-bce9cd48",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"227542176400346406270963104275416024139",
"14015773805316468582863401071525458399",
"182298897049487050407615921198897636395",
"294827278519753687604789101560771792551",
"185712605674975271683102394431223776127",
"229807605652575897003558375919175233887",
"45536281327250443817376262731028854228",
"140661094859649721324612555530040764016"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fcd6b59f7a774558e2525251c68aa37aff748e55",
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"id": "CVE-2024-50233-f349d7ef",
"target": {
"file": "drivers/staging/iio/frequency/ad9832.c",
"function": "ad9832_write_frequency"
},
"digest": {
"length": 843.0,
"function_hash": "329457763069407785738383090566358373799"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dd9e1cf619c945f320e686dcaf13e37ef0b05fdd",
"deprecated": false
}
]