]> git.ipfire.org Git - people/arne_f/kernel.git/commit
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:40:36 +0000 (12:40 +0200)
commitb85406bf1bd71850515f81b6baaa8735d684b319
treeaf50b1959dfcf5b79eec3261b89052c9fc3c3854
parent7b8fb2a4d373240d1d5f6d4d7b133e8f5ff7b10f
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