diff options
author | 2021-06-09 17:07:29 -0400 | |
---|---|---|
committer | 2021-06-13 19:36:49 -0400 | |
commit | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c (patch) | |
tree | 5a22e9bd5f084e960186b8f370b8064452ca4a83 /lib/errseq.c | |
parent | NFSv4: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT (diff) | |
download | linux-dev-6d1c0f3d28f98ea2736128ed3e46821496dc3a8c.tar.xz linux-dev-6d1c0f3d28f98ea2736128ed3e46821496dc3a8c.zip |
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a point at the end of the page data and
let xdr_set_tail_base() handle setting up the buffer pointers instead.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Fixes: 8d86e373b0ef ("SUNRPC: Clean up helpers xdr_set_iov() and xdr_set_page_base()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'lib/errseq.c')
0 files changed, 0 insertions, 0 deletions