NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds
Fix shift out-of-bounds in xprt_calc_majortimeo(). This is caused by a garbage timeout (retrans) mount option being passed to nfs mount, in this case from syzkaller.
If the protocol is XPRT_TRANSPORT_UDP, then 'retrans' is a shift value for a 64-bit long integer, so 'retrans' cannot be >= 64. If it is >= 64, fail the mount and return an error.
From the CVE record · Linux
The Linux kernel's NFS mount handling is vulnerable to a shift out-of-bounds. An attacker who can supply an NFS mount option can trigger it by setting retrans to 64 or greater when using UDP; the input does not specify authentication requirements.
Engineers running Linux kernels that support NFS mounts should check their versions against the vendor advisory; affected versions are not specified.