nfsd: fix XDR padding calculation in ff_encode_getdeviceinfo
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6372e2ee629894433fe6107d7048536a3280a284 · < 41ebca28e17f84293650598f86bd69532ec1a8e0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix XDR padding calculation in ff_encode_getdeviceinfo
nfsd4_ff_encode_getdeviceinfo() computes the da_addr_body reservation as 16 + netid_len + addr_len, but the subsequent xdr_encode_opaque() calls emit 8 + round_up(netid_len, 4) + round_up(addr_len, 4) bytes. The mismatch means the declared da_addr_body length exceeds the actual encoded data by 2-8 bytes on every flexfile GETDEVICEINFO reply, leaking stale reply-page content to the client and mis-aligning the subsequent version list decode.
Use xdr_align_size() for each string length to match what xdr_encode_opaque() actually writes.
From the CVE record · Linux
The Linux kernel's nfsd miscalculates XDR padding in flexfile GETDEVICEINFO replies. A client receiving such a reply can be exposed to stale reply-page content; the issue also misaligns decoding of the subsequent version list. Authentication requirements are not specified.
Operators running the Linux kernel with nfsd should check their installations; affected versions are not specified.