7.7high
9p: fix access mode flags being ORed instead of replaced
- Severity
- 7.7high CVSS:3.1 by Linux
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: 9p: fix access mode flags being ORed instead of replaced Since commit 1f3e4142c0eb ("9p: convert to the new mount API"), v9fs_apply_options() applies parsed mount flags with |= onto flags already set by v9fs_session_init(). For 9P2000.L, session_init sets V9FS_ACCESS_CLIENT as the default, so when the user mounts with "access=user", both bits end up set. Access mode checks compare against exact values, so having both bits set matches neither mode. This causes v9fs_fid_lookup() to fall through to the default switch case, using INVALID_UID (nobody/65534) instead of current_fsuid() for all fid lookups. Root is then unable to chown or perform other privileged operations. Fix by clearing the access mask before applying the user's choice.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from cd4cd3c40997929745abb96f92276e45463db9d9 before 31a19f4592933a511ba8434835e25040926b9e70, from 54f1f99df0bd0b78425507b293683915894a8c39 before eeadf0fd1997ccad959c84f7bacdd62352ba8497, from 1f3e4142c0eb178089ea0cbc97506a061470ad27 before b8f037e87a083291190204b959cda417aaf01058, from 1f3e4142c0eb178089ea0cbc97506a061470ad27 before da2346a48a5a1fed86c3fe3d73c0b60e7b3027c9, 6.19 Not affected: before 6.19, from 7.0.4 up to 7.0.*, from 7.1 up to * | CVE List |
| linux linux_kernel | from 6.19 before 7.0.4 | NVD |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: 9p: fix access mode flags being ORed instead of replaced Since commit 1f3e4142c0eb ("9p: convert to the new mount API"), v9fs_apply_options() applies parsed mount flags with |= onto flags already set by v9fs_session_init(). For 9P2000.L, session_init sets V9FS_ACCESS_CLIENT as the default, so when the user mounts with "access=user", both bits end up set. Access mode checks compare against exact values, so having both bits set matches neither mode. This causes v9fs_fid_lookup() to fall through to the default switch case, using INVALID_UID (nobody/65534) instead of current_fsuid() for all fid lookups. Root is then unable to chown or perform other privileged operations. Fix by clearing the access mask before applying the user's choice.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: 9p: corrige que los indicadores de modo de acceso se combinen con OR en lugar de ser reemplazados Desde el commit 1f3e4142c0eb ('9p: convertir a la nueva API de montaje'), v9fs_apply_options() aplica los indicadores de montaje analizados con |= sobre los indicadores ya establecidos por v9fs_session_init(). Para 9P2000.L, session_init establece V9FS_ACCESS_CLIENT como predeterminado, así que cuando el usuario monta con 'access=user', ambos bits terminan establecidos. Las comprobaciones de modo de acceso comparan con valores exactos, así que tener ambos bits establecidos no coincide con ninguno de los modos. Esto hace que v9fs_fid_lookup() caiga al caso predeterminado del switch, usando INVALID_UID (nobody/65534) en lugar de current_fsuid() para todas las búsquedas de fid. Root es entonces incapaz de chown o realizar otras operaciones privilegiadas. Se corrige limpiando la máscara de acceso antes de aplicar la elección del usuario.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-52906 changed 2026-11-30 | CVE Terms of Use |
| NVD | CVE-2026-52906 changed 2026-11-30 | Public domain |