CVE-2026-99883: loop: check for read-write open mode on LOOP_SET_STATUS in lo_compat_ioctl()
In the Linux kernel, the following vulnerability has been resolved:
loop: check for read-write open mode on LOOPSETSTATUS in locompatioctl()
loioctl() checks for (mode & BLKOPENWRITE) || capable(CAPSYSADMIN) before allowing LOOPSETSTATUS or LOOPSETSTATUS64, but not locompatioctl(), the handler used by 32-bit user space on 64-bit kernels.
As a result, on 64-bit kernels with CONFIGCOMPAT=y, a 32-bit unprivileged user-space process holding a read-only (ORDONLY) file descriptor to an active /dev/loopN device can issue a compat LOOPSETSTATUS ioctl to modify looffset, clear losizelimit to 0 (exposing backing-file data past the configured limit), or alter loflags.
Enforce the same (mode & BLKOPENWRITE) || capable(CAPSYSADMIN) check on LOOPSETSTATUS in locompatioctl().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In lo_compat_ioctl(), enforce the `(mode & BLK_OPEN_WRITE) || capable(CAP_SYS_ADMIN)` check on LOOP_SET_STATUS.