Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
NFSv4: include MAY_WRITE in open permission mask for O_TRUNC
POSIX requires write permission to truncate a file, so an open() that specifies O_TRUNC must be authorized for write access regardless of the O_ACCMODE access mode.
nfs_open_permission_mask() builds the access mask passed to nfs_may_open(), which is the local authorization gate for OPENs the client serves itself from a cached write delegation via the can_open_delegated() path in nfs4_try_open_cached(). The mask is derived from O_ACCMODE alone, so an open(O_RDONLY | O_TRUNC) against a file the caller cannot write requests only MAY_READ and passes the local check. The OPEN is then satisfied locally and the truncation is issued to the server as a SETATTR(size=0) over the delegation stateid, which the server accepts under standard write-delegation semantics. POSIX requires that this open fail with EACCES.
Include MAY_WRITE in the mask whenever O_TRUNC is set so the local check matches the access the server would have enforced.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 6 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 7 ELS , Debian 10 ELS , Debian 11 ELS , Oracle Linux 6 ELS , Oracle Linux 7 ELS , RHEL 7 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- linux @ 5.10.259 (+19 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 10 | In Rollout |
61 kernels
|
| AlmaLinux 8 | In Rollout |
129 kernels
|
| AlmaLinux 9 | Released |
128 kernels
|
| AlmaLinux 9.2 ESU | Released |
32 kernels
|
| AlmaLinux 9.6 ESU | Planned | — |
| Amazon Linux 2023 | Planned | — |
| CentOS 7 ELS | Planned | — |
| CentOS 8 | In Rollout |
33 kernels
|
| Debian 11 | In Rollout |
44 kernels
|
| Debian 11 cloud | Released |
24 kernels
|
| Debian 12 | Released |
42 kernels
|
| Oracle Linux 10 | In Rollout |
47 kernels
|
| Oracle Linux 8 | In Rollout |
148 kernels
|
| Oracle Linux 9 | Released |
127 kernels
|
| Oracle Linux 9 UEK 7 | Planned | — |
| RHEL 10 | In Rollout |
61 kernels
|
| RHEL 8 | In Rollout |
145 kernels
|
| RHEL 9 | Released |
126 kernels
|
| Rocky Linux 10 | In Rollout |
44 kernels
|
| Rocky Linux 8 | In Rollout |
107 kernels
|
| Rocky Linux 9 | Released |
103 kernels
|