mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
If the NFS/TCP stream is out of sync between the client and server,
and if the client (erroneously) reads the RPC length as 0 bytes, the client can loop around in the socket callback. Explicitly check for the length being 0 case and teardown/re-connect. Submitted by: Mohan Srinivasan
This commit is contained in:
parent
898b0535b7
commit
b6e223d8d4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139744
@ -836,7 +836,7 @@ nfs_clnt_tcp_soupcall(struct socket *so, void *arg, int waitflag)
|
||||
* This is SERIOUS! We are out of sync with the sender
|
||||
* and forcing a disconnect/reconnect is all I can do.
|
||||
*/
|
||||
if (len > NFS_MAXPACKET) {
|
||||
if (len > NFS_MAXPACKET || len == 0) {
|
||||
log(LOG_ERR, "%s (%d) from nfs server %s\n",
|
||||
"impossible packet length",
|
||||
len,
|
||||
|
Loading…
Reference in New Issue
Block a user