Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3429735imu; Sun, 11 Nov 2018 14:55:41 -0800 (PST) X-Google-Smtp-Source: AJdET5cRHtIH0uDbfty99n+mPyDLCtwq91mc74jgcZSx6wZDsHIiNGmaZzcDun8RRROGlwBB2o3t X-Received: by 2002:a17:902:7882:: with SMTP id q2-v6mr17898956pll.188.1541976941231; Sun, 11 Nov 2018 14:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976941; cv=none; d=google.com; s=arc-20160816; b=zHWuOaM5XUG10GWbx9QkbxifFML0vMf78NYIPankHB5MC1JGIAhOS+cEQ4bGEl8J2o p4FW1I2LEc914kKm9gztWLQqo3lrhH++PFENxBxfO760+nzzJsdSblnSFpT93sFagRst s+qgBdscXp0+jfSwPRPrG7xPWnBGANa49GoHKteca3YPdhZjCCfMUUl0iFy9zOZw3FbE RYefQkDs34mfU6uobSAwE9u5PUSKDFZrHC9jGwzNY4St7JSQKySc67+isj5UYAN9Ja6S aHdJTD9ItfouojNIgEZBEVZlBKKxlfBmEZ1+ZqZx1iGvIkAW87Qltl4VoPVpk15JJt5c zsWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qCXWBQqhUxtcFv+rKFDoZLQ9oqAUPZ0FHX7+Kirbdlw=; b=ICvcwVY7CFVc789gI849Z4odohU9WuK8a6Zi6Yta7dHFOGq4PKjRbfVXBsm3871faA tBW5Wh/XdjIZD4gSV3BZDYSpb40BHjKJn4jcQn9ARTMR+nQYtimoUoQ30adwDkvNiUiy +Sg5OHUR7MHeip9WxLdxUDvOrtD/YX9cIeyTdXDD7wL7zpCn2cRVgHmNtNXYX3vzvZnH h5b2YmZBfE8m9s0EONtH3PBa38oKFCxewzK0qWc8DBsipbnBJd2vKTOfOAjwp1puQ/TG 4KtdmE9CFsGjMdD1tebUT3aOJSAcEV5JdV7ExKw6vt6ipkzj/fYtFBd94Cl8oUwHTg4N W1aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VcyI7zhs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13-v6si14547676pgo.128.2018.11.11.14.55.26; Sun, 11 Nov 2018 14:55:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VcyI7zhs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404142AbeKLIn5 (ORCPT + 99 others); Mon, 12 Nov 2018 03:43:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:54672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403979AbeKLIW6 (ORCPT ); Mon, 12 Nov 2018 03:22:58 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30FE8223DD; Sun, 11 Nov 2018 22:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975581; bh=oWKBxqA7h1wj2n9uPh9ZxOAHvPoDNq9TX87cMlWmB4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VcyI7zhs/us5LZIdX5RP2Bp65jSstLGHG3Rjg9xBIlIpN6CZ9n6jOfjtSL4IQj5ws qOsVpXQeM0A8wVWxIVGU4JCLD/rGQ6SBRknMFaUra0fYnisvjV7y5iM7Oa/6/JI2rS Qev0Lj439KhrgY8ybXBYnCa1YkRczemnvydTR2hc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amir Goldstein , "J. Bruce Fields" Subject: [PATCH 4.14 172/222] lockd: fix access beyond unterminated strings in prints Date: Sun, 11 Nov 2018 14:24:29 -0800 Message-Id: <20181111221702.576548291@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Amir Goldstein commit 93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee 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 Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- fs/lockd/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -341,7 +341,7 @@ struct nlm_host *nlmsvc_lookup_host(cons }; 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"));