tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT
This requirement was overeagerly loosened in commit 2f83e38a095f ("tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN"), but as it turns out,
(1) the logic I implemented there was inconsistent (apologies!),
(2) TIOCL_SELMOUSEREPORT might actually be a small security risk after all, and
(3) TIOCL_SELMOUSEREPORT is only meant to be used by the mouse daemon (GPM or Consolation), which runs as CAP_SYS_ADMIN already.
In more detail:
1. The previous patch has inconsistent logic:
From the CVE record · Linux
The Linux kernel's tty handling allows TIOCL_SELMOUSEREPORT without CAP_SYS_ADMIN when no mouse-button bits are set. A local attacker with access to the same terminal could inject mouse reports that some command-line applications may misinterpret as keyboard input; no separate user interaction is described.
Engineers running Linux kernels with the affected tty behavior should check their deployments; affected versions are not specified.