Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2540663imu; Thu, 29 Nov 2018 06:36:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/XP/8ElWLEfkZc7K4jG47LbWne11M/FZ5UNrAWyDrEiLF5y/Om2+r1ypxOyhaTFA93i5Y2m X-Received: by 2002:a17:902:583:: with SMTP id f3mr1768780plf.202.1543502218095; Thu, 29 Nov 2018 06:36:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502218; cv=none; d=google.com; s=arc-20160816; b=a0t4+IvagITN55LjylflEN9iczjfSXAVVQpU3EoB6HC9Utj/x9epjUoLMULNV1GCZv 2CiKIOlE7QM5eHImnwbdf1QomOktSWeyHJ0SmOswxnFhu8Q/dkZcCqrMUEO0+mO8iTE1 wZJgXgR897nmRVjNeZSczP5iNcXRlSXfgN1R+F+ksRH/iRP5l17TKnCU2Hamc4qFvkFR BCohDNMjPLdas9hPjCxaPqWa7ThSYyCPH7oahTe2jSqEbmioKz4oaapH0WtSWhDczYVm iIUJ0ljqwSQpU6gymTNzqCG8VB+LC9oO7nNvClIXV0YWJxX3PAN/uCw7KL7iy+kmjydI VKLg== 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=Y5JtCAMuexTb8B7EXEzjuAIxEM3cjmQNPmjUPAOHOWU=; b=xUKsN6bDRZEbxMaFh73UucKi7t3GgwLdk658Mk6LdjWpQJjt2y/9A9R4oXy07ZGEQl uBOy8IqfAhsdKXn6BUtSf1JmG+X3h0M3YleXSefg152yOFaPPdpq525urXs09e3D0Lmd ILv2gE9wGgZKBL8V4mJLLZC8hKl8TuVr/VsxNgE+tdQjSN3p1xkTZhtHQWcCNAd2UpKp U0HOLpcMwCdefCg3sCIy9KskAyWKAZMPgdfnzLtLe+rOqR1JaBnb1x8aoC2A9NizqWcy juboWvy2wFabdtd3lUpMpLQGKtKfX/1wo9o2oz4nLSzt7SVgIM/Y6jA3H40ZQI7ormEQ BpyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k+RpU6zV; 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 c11si2146136pgj.255.2018.11.29.06.36.42; Thu, 29 Nov 2018 06:36:58 -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+RpU6zV; 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 S2389388AbeK3Bhr (ORCPT + 99 others); Thu, 29 Nov 2018 20:37:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:40884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732374AbeK3Bhp (ORCPT ); Thu, 29 Nov 2018 20:37:45 -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 4074F2146D; Thu, 29 Nov 2018 14:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501932; bh=0wOU+lNkClp/YzxVUBS3hbEg3mAL/DQsJv2FbtZUvMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k+RpU6zVYWO5S1GJRmO6tGOKwAZOofUrD4DS1bfnjgqctWXhwNuRc6TfNUhOQQqKS MXDKn24WMVcWSrr/Zx+UlldxCS+fwlsvXqxEXgbA399tp2VR3KbKLiK1KBQMpeahRT 0DlUtSuPo90hKLdp7+63JA74uAQpYCl+wn1TeFEs= 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.19 101/110] tty: wipe buffer. Date: Thu, 29 Nov 2018 15:13:12 +0100 Message-Id: <20181129135925.328866336@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129135921.231283053@linuxfoundation.org> References: <20181129135921.231283053@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: 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 @@ -468,11 +468,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; } /**