]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:03:20 +0000 (12:03 +0100)
commit82262d20d6582114297ae039fefefe2bbcf5bcf7
tree50085970b4168519ca5d98c4223fca4f3e01633e
parent7c0455bcf245f4d35ddd58f95787fbba56e4f8dc
NFSD: Add missing NFSv2 .pc_func methods

BugLink: https://bugs.launchpad.net/bugs/1904450
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
fs/nfsd/nfsproc.c