Skip to content

Commit 93f38b6

Browse files
amir73ilJ. Bruce Fields
authored andcommitted
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>
1 parent bb6ad55 commit 93f38b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/lockd/host.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
341341
};
342342
struct lockd_net *ln = net_generic(net, lockd_net_id);
343343

344-
dprintk("lockd: %s(host='%*s', vers=%u, proto=%s)\n", __func__,
344+
dprintk("lockd: %s(host='%.*s', vers=%u, proto=%s)\n", __func__,
345345
(int)hostname_len, hostname, rqstp->rq_vers,
346346
(rqstp->rq_prot == IPPROTO_UDP ? "udp" : "tcp"));
347347

0 commit comments

Comments
 (0)