nfsd: validate symlink target length in NFSv4 CREATE
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 895a485cd3758031ef9993c0d53cf19ce8fb4ccc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfsd: validate symlink target length in NFSv4 CREATE
nfsd4_decode_create() accepts an unbounded cr_datalen from the wire for NF4LNK symlink targets, allowing a client to force a kmalloc of up to the maximum RPC payload size (several MiB) per COMPOUND op that persists until compound teardown. The VFS rejects oversized targets with ENAMETOOLONG, but the allocation has already occurred.
Reject cr_datalen == 0 early with nfserr_inval and cr_datalen greater than NFS4_MAXPATHLEN (PATH_MAX) with nfserr_nametoolong to bound the allocation.
From the CVE record · Linux
The Linux kernel's nfsd does not bound the symlink target length supplied by an NFSv4 client in a CREATE request. A client can trigger an allocation of several MiB per COMPOUND operation before the VFS rejects an oversized target; the allocation persists until the COMPOUND operation ends. The input does not specify whether authentication is required.
Operators running Linux kernel NFSv4 servers should check their kernel version against the vendor advisory; affected versions are not specified.