Skip to content
Heist/ feed
Back to feed
MediumFix available

staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() In the ad9832_write_frequency() function, clk_get_rate() might return 0. This can lead to a division by zero when calling ad9832_calc_freqreg(). The check if (fout > (clk_get_rate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832_write_frequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.229, 5.15.171, 5.4.285, 6.1.116, 6.11.7, 6.6.60
CVEs
CVE-2024-50233
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:59 UTC · Revision 1

Source evidence

staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()

core-osv · Original source

Published 9 Nov 2024, 10:14 UTC

In the Linux kernel, the following vulnerability has been resolved: staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() In the ad9832_write_frequency() function, clk_get_rate() might return 0. This can lead to a division by zero when calling ad9832_calc_freqreg(). The check if (fout > (clk_get_rate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832_write_frequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value.

osv:CVE-2024-50233

Kernel

Fixed versions: 5.4.285, 5.10.229, 5.15.171, 6.1.116, 6.6.60, 6.11.7

Complete source record
{
  "id": "86c476d9bae4899804ff96a75f8ac8f0211b4b42841d39552b59e69a06c43033",
  "url": "https://osv.dev/vulnerability/CVE-2024-50233",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() In the ad9832_write_frequency() function, clk_get_rate() might return 0. This can lead to a division by zero when calling ad9832_calc_freqreg(). The check if (fout > (clk_get_rate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832_write_frequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value.",
    "evidence": "osv:CVE-2024-50233",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.285",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.229",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.171",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.116",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.60",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.11.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-50233",
      "aliases": [
        "CVE-2024-50233"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ea707584bac187c9c6c64c4eacd1c09bcc08f37b"
                },
                {
                  "fixed": "fcd6b59f7a774558e2525251c68aa37aff748e55"
                },
                {
                  "fixed": "442f786c5bff8cfd756ebdeaa4aadbf05c22aa5a"
                },
                {
                  "fixed": "2f39548f45693d86e950647012a214da6917dc9f"
                },
                {
                  "fixed": "ccbc10647aafe2b7506edb4b10e19c6c2416c162"
                },
                {
                  "fixed": "adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec"
                },
                {
                  "fixed": "dd9e1cf619c945f320e686dcaf13e37ef0b05fdd"
                },
                {
                  "fixed": "6bd301819f8f69331a55ae2336c8b111fc933f3d"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50233.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.39"
                },
                {
                  "fixed": "5.4.285"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.229"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.171"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.116"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.60"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.11.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50233.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.772046373Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2f39548f45693d86e950647012a214da6917dc9f",
        "https://git.kernel.org/stable/c/442f786c5bff8cfd756ebdeaa4aadbf05c22aa5a",
        "https://git.kernel.org/stable/c/6bd301819f8f69331a55ae2336c8b111fc933f3d",
        "https://git.kernel.org/stable/c/adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec",
        "https://git.kernel.org/stable/c/ccbc10647aafe2b7506edb4b10e19c6c2416c162",
        "https://git.kernel.org/stable/c/dd9e1cf619c945f320e686dcaf13e37ef0b05fdd",
        "https://git.kernel.org/stable/c/fcd6b59f7a774558e2525251c68aa37aff748e55",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50233.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-50233",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50233.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-50233",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509289,
  "published_at": "2024-11-09T10:14:43.442+00:00"
}