Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3473909imu; Sun, 11 Nov 2018 15:56:12 -0800 (PST) X-Google-Smtp-Source: AJdET5c3ZBGdPCAUvR4C55KSZErVJXyURrEhGbGODFk7lqU1KKYPxxlvqWW1zOi3NWwzE36s+CZJ X-Received: by 2002:a63:741:: with SMTP id 62mr15129237pgh.352.1541980572699; Sun, 11 Nov 2018 15:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980572; cv=none; d=google.com; s=arc-20160816; b=EF7kWHfiRl7AUKMwnrYF6hjOfBI5r0y6k1sCxpGzoWRNhzp/Uq4iY5UbBNZ58c9Od9 xoZYf0TpmeTmhA1ewYt4YyJBa8vYFecH0V4sEbupaaXCQbeVgM+MOahZ9rdjNCqvmE0+ bgF9rcFCUK58r5OxGcSeXKFSF6309Lkdn+lPvVjNiHEOMJDR22yFGypzxCV75//iLQZx UiZJPLVcllmtMeyaQhfsvFKWsWXnan1WeQ8bm8Rk5tqmHZZrurEmHX5uavVB6ORvMtMG XRs2FpLIH6ilamiSZeHA+xL3CwuGhNDl2MlRXDa3Sxp8doHudWhkDgLTjOYOtjOquY7/ UINg== 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=4dvvKzTgBsYR22yvCOL0prpVPZb0+bRaHeJ2w433RgI=; b=0sn2M1QOPSULdPdKZzaUiyXGuQ+MkIdF+idrEQjJGItyIUKFiJYL+uNAvc2S5inlZg plDFMsKvLCPoYnjkwelcydULU7q8MtQpI1dD0+fK/c3QaMSs4BJwYTUFuP1OmbCrlbOb igDfo+Qgds7zL2F/CuxFtZH26wF88B0+0TNwKwYK7ndPrmUP2Pwr1iM9lVhXxFAAJBuD kfGv20YOOYz9/MHtuh/ORTvQn/fU+FrdnZANoI/xZ60k0q6hCbMABojUyvaxi7POP/cU Trr7/4Io9LxJLcvJ14Odptqymv0AnaXC9mUHKhbo8T6Rk0d5KGHOVplDL4fxg+gLxHXN 2U+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IV2ae1xF; 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 m26-v6si16132800pfe.80.2018.11.11.15.55.57; Sun, 11 Nov 2018 15:56:12 -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=IV2ae1xF; 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 S1732742AbeKLISW (ORCPT + 99 others); Mon, 12 Nov 2018 03:18:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:37302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732717AbeKLISV (ORCPT ); Mon, 12 Nov 2018 03:18:21 -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 C651D21508; Sun, 11 Nov 2018 22:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975305; bh=stupaK6p/Lw/VVVc1hMwfL4ExSlejUzeeSyNJzihaYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IV2ae1xF5hdyH7jRMLtZAxbs0BVmFokiKQln/nB3jYRrFde16oiB17ptV0OE5HW3b uxNXBOQRqbuuXTPqeXOwlwQ+MqIAeKwy8jXp7WOSKXy08vlhon+kyyqN5HlH3q80w3 lE1ffxiWsl652eg96rjHu9CNO9rJZXxbvXNfOuRk= 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.19 274/361] lockd: fix access beyond unterminated strings in prints Date: Sun, 11 Nov 2018 14:20:21 -0800 Message-Id: <20181111221655.271753212@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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"));