mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
lockd: fix access beyond unterminated strings in prints
commit 93f38b6fae
upstream.
printk format used %*s instead of %.*s, so hostname_len does not limit
the number of bytes accessed from hostname.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5727dbcd26
commit
5c22b67bc2
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
|
|||
};
|
||||
struct lockd_net *ln = net_generic(net, lockd_net_id);
|
||||
|
||||
dprintk("lockd: %s(host='%*s', vers=%u, proto=%s)\n", __func__,
|
||||
dprintk("lockd: %s(host='%.*s', vers=%u, proto=%s)\n", __func__,
|
||||
(int)hostname_len, hostname, rqstp->rq_vers,
|
||||
(rqstp->rq_prot == IPPROTO_UDP ? "udp" : "tcp"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue