SUNRPC: stop printk reading past end of string
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 5 Sep 2020 14:03:26 +0000 (10:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 06:46:14 +0000 (08:46 +0200)
commita306c34f956ecf70bea8ccb4645fbbf375ec5956
tree68acfac6f7d054f1696513542b03c952fa137627
parent213fe77471236e3433fa14655896a2ac7155bc0f
SUNRPC: stop printk reading past end of string

[ Upstream commit 8c6b6c793ed32b8f9770ebcdf1ba99af423c303b ]

Since p points at raw xdr data, there's no guarantee that it's NULL
terminated, so we should give a length.  And probably escape any special
characters too.

Reported-by: Zhi Li <yieli@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/rpcb_clnt.c