# CVE-2025-68822: Input: alps - fix use-after-free bugs caused by dev3_register_work

> A use-after-free vulnerability in the Linux kernel ALPS touchpad driver allows local attackers to execute arbitrary code or escalate privileges via a race condition.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jan 2026
- **Updated:** 21 Oct 2026
- **Also known as:** AZL-74300, BELL-CVE-2025-68822, DEBIAN-CVE-2025-68822, GHSA-5w2m-pcx5-5834, ROOT-OS-DEBIAN-11-CVE-2025-68822, ROOT-OS-DEBIAN-12-CVE-2025-68822, ROOT-OS-UBUNTU-2204-CVE-2025-68822, ROOT-OS-UBUNTU-2404-CVE-2025-68822, UBUNTU-CVE-2025-68822

## What is CVE-2025-68822?

CVE-2025-68822 is a high-severity use after free vulnerability in Linux, published on 13 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In the Linux kernel, the following vulnerability has been resolved:

Input: alps - fix use-after-free bugs caused by dev3_register_work

The dev3_register_work delayed work item is initialized within
alps_reconnect() and scheduled upon receipt of the first bare
PS/2 packet from an external PS/2 device connected to the ALPS
touchpad. During device detachment, the original implementation
calls flush_workqueue() in psmouse_disconnect() to ensure
completion of dev3_register_work. However, the flush_workqueue()
in psmouse_disconnect() only blocks and waits for work items that
were already queued to the workqueue prior to its invocation. Any
work items submitted after flush_workqueue() is called are not
included in the set of tasks that the flush operation awaits.
This means that after flush_workqueue() has finished executing,
the dev3_register_work could still be scheduled. Although the
psmouse state is set to PSMOUSE_CMD_MODE in psmouse_disconnect(),
the scheduling of dev3_register_work remains unaffected.

The race condition can occur as follows:

CPU 0 (cleanup path)     | CPU 1 (delayed work)
psmouse_disconnect()     |
  psmouse_set_state()    |
  flush_workqueue()      | alps_report_bare_ps2_packet()
  alps_disconnect()      |   psmouse_queue_work()
    kfree(priv); // FREE | alps_register_bare_ps2_mouse()
                         |   priv = container_of(work...); // USE
                         |   priv->dev3 // USE

Add disable_delayed_work_sync() in alps_disconnect() to ensure
that dev3_register_work is properly canceled and prevented from
executing after the alps_data structure has been deallocated.

This bug is identified by static analysis.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2025-68822?


## How do I fix CVE-2025-68822?

Apply the vendor's patch.

## Is CVE-2025-68822 being exploited?

There is no known exploitation of CVE-2025-68822 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-68822 and fix it if it is affected.

What it is: CVE-2025-68822 is a high-severity use after free vulnerability in Linux, published on 13 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-68822 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-68822/ (Markdown: https://insights.sbomify.com/CVE-2025-68822/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-68822
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-68822
- OSV: https://osv.dev/vulnerability/CVE-2025-68822

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-68822/
Summaries are generated and may contain mistakes; the official description above is the record.
