{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-56557",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-56557"
  ],
  "published": "2024-12-27T14:24:16Z",
  "summary": "iio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\niio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer\n\nThe AD7923 was updated to support devices with 8 channels, but the size\nof tx_buf and ring_xfer was not increased accordingly, leading to a\npotential buffer overflow in ad7923_update_scan_mode().",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.120",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-56557"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6e4d236d9c4b38571c394d3ab6e85dfb71c33ed3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/00663d3e000c31d0d49ef86a809f5c107c2d09cd"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e5cac32721997cb8bcb208a29f4598b3faf46338"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/218ecc35949129171ca39bcc0d407c8dc4cd0bbc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3a4187ec454e19903fd15f6e1825a4b84e59a4cd"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The overflow is reached only through local sysfs writes on the IIO device (`scan_elements/in_voltageN_en` then `buffer/enable`), which drive `iio_enable_buffers()` into `ad7923_update_scan_mode()`. No remote or adjacent network data reaches this code, and no physical access to the board is required.\nAC:L - The attacker fully controls the trigger \u2014 enabling five or more scan elements on an ad7908/ad7918/ad7928 and starting the buffer deterministically overflows `tx_buf` and `ring_xfer` on the first attempt, with no race to win and no state the attacker cannot set.\nPR:L - Nothing on the path checks any capability; only sysfs file permissions gate it, and on the embedded/industrial/Android systems where these SPI ADCs are deployed the IIO nodes are routinely handed to a non-root sensor or data-acquisition user or group by udev/ueventd rules. This matches the established scoring of the other IIO triggered-buffer CVEs reachable through the same interface.\nUI:N - The attacker performs the entire sequence \u2014 enabling scan elements, attaching a trigger, enabling the buffer \u2014 from their own process, and no other user needs to act.\nS:U - The corruption is confined to kernel heap memory managed by the same kernel that contains the flaw, with no crossing of a hypervisor, IOMMU, or other security-authority boundary.\nC:H - The overflow overwrites `spi_message`/`spi_transfer` fields, so `spi_sync()` walks a corrupted transfer list and honors `tx_buf`/`rx_buf`/`len` values taken from smashed memory, and the resulting heap corruption is a general primitive that can be groomed into arbitrary kernel-memory disclosure.\nI:H - This is an out-of-bounds heap write of hundreds of bytes past `ring_xfer[4]`, including pointer values, that also clobbers `ring_msg.transfers.prev` mid-construction so `list_add_tail()` writes kernel pointers through an attacker-influenced address \u2014 a classic corruption-to-control-flow path.\nA:H - The clobbered `spi_message` list is immediately traversed by `spi_sync()` in `ad7923_trigger_handler()`, dereferencing wild `transfer_list` links, and the write past the end of the `iio_priv()` allocation corrupts adjacent slab state \u2014 a repeatable kernel oops or panic."
    }
  }
}
