]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 25 Jun 2020 15:32:34 +0000 (11:32 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 26 Jun 2020 12:45:23 +0000 (08:45 -0400)
commit7ecc2b0642019cb7860815ca3f98b7ac2a06d895
tree262957a2edb739066cd14d4894b4f091655be7dd
parent03d408abef3b1ed5a95bceba3a5755ef5f938f3d
SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()

@subbuf is an output parameter of xdr_buf_subsegment(). A survey of
call sites shows that @subbuf is always uninitialized before
xdr_buf_segment() is invoked by callers.

There are some execution paths through xdr_buf_subsegment() that do
not set all of the fields in @subbuf, leaving some pointer fields
containing garbage addresses. Subsequent processing of that buffer
then results in a page fault.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xdr.c