Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2547392imu; Thu, 29 Nov 2018 06:43:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDUdjSjZvKy9UzPVtljkJX0QOVy2sBZ5x4wBe7YU4i6+Ja2vA61CjB1aUU8VE6FSCmiVuK X-Received: by 2002:a17:902:f091:: with SMTP id go17mr1767020plb.235.1543502580149; Thu, 29 Nov 2018 06:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502580; cv=none; d=google.com; s=arc-20160816; b=ABTyU8dQ5rJeD9V+RjAk2D9y5xHWT5L+A89gtsGD7/yu/s2+2xgBt+n6IAli9nHRCm Q+cXCfhw3K5cvoqpTZsB8VVrmLW7KvOVmJ8hF3jKxyxuk1Ryhd9z+dCrQ9a/pcYy0oZp Y32+tc/ntSVGHMWISBxzi34UcbNOEmhJ0K+t+9chcPaZb2Jnr6oF54k7RvHRjriPRXUR Z8mbHIX5JspjiJs+vcNxp31pKJPXsxJJzj4LyuZnwWZnx4eeMDytrXvPM7OwSx7ZgN95 xPJwC79qLHBN6+RFCvynB98up435u0yVeazb3RO6lqFeIujnnzLVeuPjfoh9VgSal1g4 dtrA== 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=ZCXMojZfuFVNrbZh40CMG7t5H3NKQp0hyisxy72Gxuc=; b=AiUsuC2XvFCfuH/RkoQhSh5DUbXyUHm16wNtmFHmDIuBUK9W8aHLqga4xZbD81Jml0 9onXm5gZ6UOkhjpz3U5YP8eqKTRmbEv+9lxP6LOqo/4Gl8mj5Hd7plTXj3RKRXRP9aP+ XrAxEY4b1ke7vTipE0CGkGoprh06Y+QX/fodg1NPyOBga/wlAd2EhuhFjzki9CIaJs3b aXsh6nvpP7siv/HYV89ri0jvyrfty/x1cvpcVJAKU4YnAIppTG3X+YDQpe+eAiDUfYtO m2FbmnmtS4VH7mSxiAM+eWCzVMVCemiUa1hfnN6T23ZTS/HISFtso+RGEelLSSMbOEyj kcUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="K/ySmz+2"; 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 c1si2417007pld.194.2018.11.29.06.42.44; Thu, 29 Nov 2018 06:43:00 -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="K/ySmz+2"; 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 S2388024AbeK3Bdu (ORCPT + 99 others); Thu, 29 Nov 2018 20:33:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:34680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731925AbeK3Bdu (ORCPT ); Thu, 29 Nov 2018 20:33:50 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 60BD12146D; Thu, 29 Nov 2018 14:28:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501697; bh=pG6BnRcIqDOzpYjNRatk9I4SMvpquxEvPVItHqEZqio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K/ySmz+20QBF1fulzYxzTy0M0rsk6ft6yGMFzq/0yTdQ+nE0LCTMrLhQzswhBdcpw jV3nJOaP/K3dq8aS7pycNC8KhEMZtv+j9Tn5Fjnta/zq6NgvmX7/XliAOr+Xl3AksM oqiyWR5JN+Nta+R5Nxvceja9ANrmY8c8AorqV2bY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, aszlig , Milan Broz , Daniel Zatovic , Willy Tarreau Subject: [PATCH 4.14 089/100] tty: wipe buffer. Date: Thu, 29 Nov 2018 15:12:59 +0100 Message-Id: <20181129140106.504209905@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@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: Linus Torvalds commit c9a8e5fce009e3c601a43c49ea9dbcb25d1ffac5 upstream. After we are done with the tty buffer, zero it out. Reported-by: aszlig Tested-by: Milan Broz Tested-by: Daniel Zatovic Tested-by: aszlig Cc: Willy Tarreau Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -467,11 +467,15 @@ receive_buf(struct tty_port *port, struc { unsigned char *p = char_buf_ptr(head, head->read); char *f = NULL; + int n; if (~head->flags & TTYB_NORMAL) f = flag_buf_ptr(head, head->read); - return port->client_ops->receive_buf(port, p, f, count); + n = port->client_ops->receive_buf(port, p, f, count); + if (n > 0) + memset(p, 0, n); + return n; } /**