Linux kernel memory disclosure in SUNRPC deferred call copying
Linux
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: Copy the deferred RPC Call from the head buffer
svc_defer() snapshots the RPC Call for replay once a pending cache upcall resolves. It copies the Call starting (rq_arg.len - head[0].iov_len) bytes before head[0].iov_base, a back-up that once covered a transport header. No transport has had one since commit 983084b2672c ("SUNRPC: Remove svc_rqst::rq_xprt_hlen"), so the two lengths are meant to be equal.
An RPCSEC_GSS Call breaks that assumption. Unwrapping the integrity service truncates rq_arg.len by the length of the trailing checksum, and unwrapping the privacy service leaves rq_arg.len short by an amount the client sets with trailing bytes after the wrap token. Neither adjusts head[0].iov_len. Both lengths are size_t, so the subtraction underflows and the copy starts past head[0].iov_base. Every deferred integrity Call replays a shifted snapshot.
A deferred replay skips GSS verification, so a shifted snapshot runs as an authenticated Call. With the privacy service the offset is client-chosen. A forged Call placed in that window, naming another user's GSS context handle, runs under that identity.
Copy the Call from head[0].iov_base. Refuse to defer a Call whose length runs past the head buffer, so the copy cannot read out of bounds.
From the CVE record · Linux
SUNRPC copies deferred RPCSEC_GSS calls from an incorrect buffer offset when the call length differs from the head-buffer length. A client using the privacy service can place a forged call in the shifted snapshot; if the call is deferred, it may replay under another user's GSS identity without GSS verification. Deferred integrity-service calls also replay shifted snapshots.
Engineers running Linux kernels that handle deferred RPCSEC_GSS calls should check whether their kernel is affected; affected versions were not specified.