RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 714684 - RFE: command to clear scrollback buffer in linux terminal
Summary: RFE: command to clear scrollback buffer in linux terminal
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Frantisek Hrbata
QA Contact: WANG Chao
URL: http://thread.gmane.org/gmane.linux.k...
Whiteboard:
Depends On:
Blocks: 714687 714693 806803 807369
TreeView+ depends on / blocked
 
Reported: 2011-06-20 12:47 UTC by Petr Pisar
Modified: 2015-02-08 21:42 UTC (History)
13 users (show)

Fixed In Version: kernel-2.6.32-165.el6
Doc Type: Enhancement
Doc Text:
Clone Of: 684261
: 806803 (view as bug list)
Environment:
Last Closed: 2011-12-06 13:42:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1530 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux 6 kernel security, bug fix and enhancement update 2011-12-06 01:45:35 UTC

Description Petr Pisar 2011-06-20 12:47:53 UTC
+++ This bug was initially created as a clone of Bug #684261 +++

Description of problem:
In some situations it would be good to clear the terminal's scrollback buffer, for example on new login or when the terminal is locked so someone else won't be able to see the previous content with shift-pgup. (bug #683733)

There are hacks can be used to force clearing the buffer, like switching to another console and back, or changing the size of the terminal, but all seem to have some drawbacks.

This is a request to add a new command like \E[3J which would reset the scrollback buffer and which could be added to the linux terminfo entry, either to the clear sequence or as a new string capability.

--- Additional comment from ppisar on 2011-03-23 15:47:52 GMT ---

Created attachment 487076 [details]
Proposed fix

This patch introduce new \E[J parameter 3 that allows to scramble
scroll-back buffer explicitly. Session locking programs (screen,
vlock) can use it to prevent attacker to browse locked console
history.

Tested on VGA and FB_VGA16 console in qemu.

--- Additional comment from davej on 2011-03-24 03:38:16 GMT ---

post it to linux-kernel.org

We'll pick it up when we rebase if it gets merged.

--- Additional comment from ppisar on 2011-05-24 06:57:58 GMT ---

Merged to Linus' linux-2.6:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8df13e0a901fe55631fed66562369b4dba40f8b
----

This is in Fedora Rahwide now and it will be part of Linux-3.0. Based on discussion with Steve Grubb, I propose this feature for RHEL-6.2 as an alternative to disabled scroll-back buffer. Depending utilization by user space (mingetty and screen) will be request too.

Comment 2 Aristeu Rozanski 2011-07-08 21:58:14 UTC
Patch(es) available on kernel-2.6.32-165.el6

Comment 6 errata-xmlrpc 2011-12-06 13:42:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1530.html


Note You need to log in before you can comment on or make changes to this bug.