]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Add missing NFSv2 .pc_func methods
authorChuck Lever <chuck.lever@oracle.com>
Thu, 1 Oct 2020 22:58:56 +0000 (18:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:08:52 +0000 (11:08 +0100)
commit88401813fcec150ff179e731364fc19af1e6632f
tree7776510d993c56317dc359dd0b3637d1883ef869
parent3c040b924988be85e99819dd48c1f3130ae683cc
NFSD: Add missing NFSv2 .pc_func methods

commit 6b3dccd48de8a4c650b01499a0b09d1e2279649e upstream.

There's no protection in nfsd_dispatch() against a NULL .pc_func
helpers. A malicious NFS client can trigger a crash by invoking the
unused/unsupported NFSv2 ROOT or WRITECACHE procedures.

The current NFSD dispatcher does not support returning a void reply
to a non-NULL procedure, so the reply to both of these is wrong, for
the moment.

Cc: <stable@vger.kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfsproc.c