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 10:59:51 +0000 (12:59 +0200)
commite0b6509ae4a697278a751df5afca4f8a02795679
tree1886a8b2cb73c4d7db77e23630a1d1d8e1f97496
parent7e4b9125c899c9ce555872ff2a6af065f0b2ae26
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