]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: stricter decoding of write-like NFSv2/v3 ops
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 21 Apr 2017 19:26:30 +0000 (15:26 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 06:06:55 +0000 (23:06 -0700)
commit389ce21256f915108f17a3ed73306965ae0951d2
tree402380e65d8b609567ee963c4bcc7c7be4943a7f
parentcc090307633578c137d7905e64abd07820d7b6e8
nfsd: stricter decoding of write-like NFSv2/v3 ops

Orabug: 25974739
CVE: CVE-2017-7895

The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer.  This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could be negative.  Add
checks to catch these.

Reported-by: Tuomas Haanpää <thaan@synopsys.com>
Reported-by: Ari Kauppi <ari@synopsys.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
(cherry picked from commit 13bf9fbff0e5e099e2b6f003a0ab8ae145436309)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: John Haxby <john.haxby@oracle.com>
Conflicts:
fs/nfsd/nfsxdr.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfsxdr.c