{"id":"CVE-2025-38485","state":"PUBLISHED","title":"iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush\n\nfxls8962af_fifo_flush() uses indio_dev->active_scan_mask (with\niio_for_each_active_channel()) without making sure the indio_dev\nstays in buffer mode.\nThere is a race if indio_dev exits buffer mode in the middle of the\ninterrupt that flushes the fifo. Fix this by calling\nsynchronize_irq() to ensure that no interrupt is currently running when\ndisabling buffer mode.\n\nUnable to handle kernel NULL pointer dereference at virtual address 00000000 when read\n[...]\n_find_first_bit_le from fxls8962af_fifo_flush+0x17c/0x290\nfxls8962af_fifo_flush from fxls8962af_interrupt+0x80/0x178\nfxls8962af_interrupt from irq_thread_fn+0x1c/0x7c\nirq_thread_fn from irq_thread+0x110/0x1f4\nirq_thread from kthread+0xe0/0xfc\nkthread from ret_from_fork+0x14/0x2c","publishedAt":"2025-07-28T11:21:49.624Z","updatedAt":"2026-08-05T12:02:17.653Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"6ecd61c201b27ad2760b3975437ad2b97d725b98","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"dda42f23a8f5439eaac9521ce0531547d880cc54","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"bfcda3e1015791b3a63fb4d3aad408da9cf76e8f","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"1803d372460aaa9ae0188a30c9421d3f157f2f04","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"1fe16dc1a2f5057772e5391ec042ed7442966c9a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/accel/fxls8962af-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"6.1.147","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.100","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.40","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/accel/fxls8962af-core.c"]}],"references":["https://git.kernel.org/stable/c/6ecd61c201b27ad2760b3975437ad2b97d725b98","https://git.kernel.org/stable/c/dda42f23a8f5439eaac9521ce0531547d880cc54","https://git.kernel.org/stable/c/bfcda3e1015791b3a63fb4d3aad408da9cf76e8f","https://git.kernel.org/stable/c/1803d372460aaa9ae0188a30c9421d3f157f2f04","https://git.kernel.org/stable/c/1fe16dc1a2f5057772e5391ec042ed7442966c9a","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38485.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38485","state":"PUBLISHED","datePublished":"2025-07-28T11:21:49.624Z","dateUpdated":"2026-08-05T12:02:17.653Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.021Z"},"containers":{"cna":{"title":"iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush\n\nfxls8962af_fifo_flush() uses indio_dev->active_scan_mask (with\niio_for_each_active_channel()) without making sure the indio_dev\nstays in buffer mode.\nThere is a race if indio_dev exits buffer mode in the middle of the\ninterrupt that flushes the fifo. Fix this by calling\nsynchronize_irq() to ensure that no interrupt is currently running when\ndisabling buffer mode.\n\nUnable to handle kernel NULL pointer dereference at virtual address 00000000 when read\n[...]\n_find_first_bit_le from fxls8962af_fifo_flush+0x17c/0x290\nfxls8962af_fifo_flush from fxls8962af_interrupt+0x80/0x178\nfxls8962af_interrupt from irq_thread_fn+0x1c/0x7c\nirq_thread_fn from irq_thread+0x110/0x1f4\nirq_thread from kthread+0xe0/0xfc\nkthread from ret_from_fork+0x14/0x2c"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"6ecd61c201b27ad2760b3975437ad2b97d725b98","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"dda42f23a8f5439eaac9521ce0531547d880cc54","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"bfcda3e1015791b3a63fb4d3aad408da9cf76e8f","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"1803d372460aaa9ae0188a30c9421d3f157f2f04","versionType":"git"},{"version":"79e3a5bdd9efbdf4e1069793d7735b432d641e7c","status":"affected","lessThan":"1fe16dc1a2f5057772e5391ec042ed7442966c9a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/accel/fxls8962af-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"6.1.147","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.100","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.40","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/accel/fxls8962af-core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6ecd61c201b27ad2760b3975437ad2b97d725b98"},{"url":"https://git.kernel.org/stable/c/dda42f23a8f5439eaac9521ce0531547d880cc54"},{"url":"https://git.kernel.org/stable/c/bfcda3e1015791b3a63fb4d3aad408da9cf76e8f"},{"url":"https://git.kernel.org/stable/c/1803d372460aaa9ae0188a30c9421d3f157f2f04"},{"url":"https://git.kernel.org/stable/c/1fe16dc1a2f5057772e5391ec042ed7442966c9a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The race is driven entirely from local userspace by toggling `/sys/bus/iio/devices/iio:deviceN/buffer/enable` and reading `/dev/iio:deviceN`; there is no network-facing path to the IIO buffer core or this accelerometer driver.\nAC:L - The attacker controls both sides — the sensor IRQ cadence via `sampling_frequency`/`hwfifo_watermark`, and the free via the buffer-disable write — and the threaded handler spends milliseconds in I2C FIFO reads inside the unprotected window, so the race is reliably hit and freely retried in a loop.\nPR:L - Only an unprivileged local account with access to the IIO sysfs/chardev nodes is required; on the Android/embedded/automotive platforms that ship FXLS8962AF/8964AF these nodes are group-owned by the sensor service, so a low-privileged process can enable and disable the hardware FIFO buffer.\nUI:N - The attacker performs every step — configure rate/watermark, enable the buffer, disable it mid-flush — with no action from any other user or administrator.\nS:U - The freed bitmap, the corrupted stack buffer and the driver private data all live in the kernel's own security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - Reading the freed, sprayable scan mask makes `bit` attacker-influenced, so `buffer[i * 3 + bit]` reads past the valid samples and off the end of the stack array, and those bytes are pushed via `iio_push_to_buffers_with_ts()` into the userspace-readable kfifo — a direct kernel memory disclosure on top of the use-after-free read itself.\nI:H - With a groomed kmalloc-8/16 replacement object the loop index `j` exceeds the 3-element `data->scan.channels[]` array, giving an out-of-bounds write into adjacent heap-resident driver state; per use-after-free scoring this is exploitable for control over kernel data.\nA:H - The reported failure mode is a kernel NULL pointer dereference oops in `_find_first_bit_le` from `fxls8962af_fifo_flush()` in the IRQ thread, and the UAF path can be re-triggered repeatedly to crash the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:02:17.653Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1.147"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.6.100"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.12.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.15.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:38:55.102Z"}}]}}}