CVE-2025-38133
published high CVSS 3.1 · 7.8iio: adc: ad4851: fix ad4858 chan pointer handling
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux6250803fe2ec92be32a4df1c3a39c4a460d5bd58 to < 6c3b9e1167d072ce2d01cafec7866647cf8d3616 · 6250803fe2ec92be32a4df1c3a39c4a460d5bd58 to < 499a8cee812588905cc940837e69918c1649a19e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.15 (affected) · 0 to < 6.15 (unaffected · semver) · 6.15.3 through 6.15.* (unaffected · semver) · 6.16 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: iio: adc: ad4851: fix ad4858 chan pointer handling The pointer returned from ad4851_parse_channels_common() is incremented internally as each channel is populated. In ad4858_parse_channels(), the same pointer was further incremented while setting ext_scan_type fields for each channel. This resulted in indio_dev->channels being set to a pointer past the end of the allocated array, potentially causing memory corruption or undefined behavior. Fix this by iterating over the channels using an explicit index instead of incrementing the pointer. This preserves the original base pointer and ensures all channel metadata is set correctly.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The defect is in an SPI-attached ADC driver reached at driver probe and afterwards through the device's IIO sysfs/chardev interface, both of which require local system access. There is no network or remote-peer data path into this code, and the SPI part is board-soldered rather than user-pluggable. AC:L - The past-the-end pointer is stored into indio_dev->channels unconditionally on every probe of an ad4852/4854/4856/4858 part, so the out-of-bounds condition is fully deterministic rather than dependent on any state the attacker cannot influence. Subsequent interaction with the resulting channel attributes and buffer scan elements is ordinary, reliably repeatable local activity. PR:L - The corrupted channel array is established automatically at boot with no attacker action at all, and the resulting sysfs attributes, ext_info callbacks and buffer scan-element interface are exercised by any local user holding an ordinary account with access to the IIO device (commonly group-granted by udev on the industrial/embedded systems these ADCs ship in). No CAP_SYS_ADMIN or root is needed to reach the corrupted metadata. UI:N - No victim action is required — the out-of-bounds pointer is installed during automatic driver probe, and the subsequent accesses are initiated entirely by the attacker. S:U - The out-of-bounds reads, wild pointer dereferences and downstream buffer miscomputation all occur within the kernel's own security authority. No VM, IOMMU or sandbox boundary is crossed. C:H - The IIO core reads roughly a kilobyte of adjacent heap memory as channel metadata, and that data is exposed to userspace: extend_name/datasheet_name/ext_info->name are wild pointers whose target contents become sysfs attribute names, and ext_info->read is invoked to produce attribute values. This yields disclosure of arbitrary adjacent kernel memory and of whatever the wild pointers happen to reference. I:H - Attacker-uncontrolled but corruptible metadata drives writable paths: ext_info->write is called as a function pointer sourced from out-of-bounds heap memory, giving a control-flow hijack primitive, and garbage storagebits/realbits/shift/scan_index values feed iio_compute_scan_bytes() and the demux offsets, producing out-of-bounds writes into the IIO buffer. This is exactly the "memory corruption or undefined behavior" the fix cites. A:H - Dereferencing the wild ext_info/extend_name/datasheet_name pointers during iio_device_register() readily oopses the kernel at probe, and a garbage scan_index inflates masklength so bitmap_zalloc() attempts an enormous allocation. Either outcome is a crash or denial of service on the affected device.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 6250803fe2ec92be32a4df1c3a39c4a460d5bd58 to < 6c3b9e1167d072ce2d01cafec7866647cf8d3616 (affected · git)6250803fe2ec92be32a4df1c3a39c4a460d5bd58 to < 499a8cee812588905cc940837e69918c1649a19e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.15 (affected)0 to < 6.15 (unaffected · semver)6.15.3 through 6.15.* (unaffected · semver)6.16 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
iio: adc: ad4851: fix ad4858 chan pointer handling
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 31c2e1d03b1266bddb6b9291e9e416592582541b26828396611bb152ce7b177f
- Ingested
- 23 Sep 2026, 08:46:29 UTC
- Source record
- Official CVE record