CVE-2026-64498: iio: buffer: hw-consumer: free scan_mask on buffer release
Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:51:55 +0200
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026072552-CVE-2026-64498-aa0a@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: iio: buffer: hw-consumer: free scan_mask on buffer release The scan_mask lifetime changed in commit 9a2e1233d38c ("iio: buffer: hw-consumer: remove redundant scan_mask flexible array"). Before that change, the scan mask storage was embedded in struct hw_consumer_buffer, so iio_hw_buf_release() could free the whole allocation with a single kfree(hw_buf). That commit moved the scan mask to a separate bitmap_zalloc() allocation stored in buffer.scan_mask, but left iio_hw_buf_release() unchanged. Free the scan mask in iio_hw_buf_release() before freeing the buffer wrapper. The Linux kernel CVE team has assigned CVE-2026-64498 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit 9a2e1233d38c460ad07f36901931f3674a32d1ed and fixed in 7.1.4 with commit fb8e18f8ca724bd4de4643cad5b7c7230b9a5a71 Issue introduced in 7.1 with commit 9a2e1233d38c460ad07f36901931f3674a32d1ed and fixed in 7.2-rc1 with commit 6325d6e2204327965b849c0a16efb6ac9202e5a8 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-64498 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/iio/buffer/industrialio-hw-consumer.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/fb8e18f8ca724bd4de4643cad5b7c7230b9a5a71 https://git.kernel.org/stable/c/6325d6e2204327965b849c0a16efb6ac9202e5a8