diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-09-28 19:41:48 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-10-29 21:58:04 +0100 |
commit | 93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee (patch) | |
tree | a422a5a6985dfe2fe3ec75cd132eece3fd93616f /fs/lockd | |
parent | nfsd: Fix an Oops in free_session() (diff) | |
download | linux-93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee.tar.xz linux-93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee.zip |
lockd: fix access beyond unterminated strings in prints
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>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index d35cd6be0675..93fb7cf0b92b 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -341,7 +341,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")); |