https://github.com/torvalds/linux
Revision 3321c07ae5068568cd61ac9f4ba749006a7185c9 authored by Peter Huewe on 15 September 2011, 17:47:42 UTC, committed by James Morris on 22 September 2011, 23:46:41 UTC
Since the buffer might contain security related data it might be a good idea to
zero the buffer after we have copied it to userspace.

This got assigned CVE-2011-1162.

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Cc: Stable Kernel <stable@kernel.org>
Signed-off-by: James Morris <jmorris@namei.org>
1 parent 6b07d30
Raw File
Tip revision: 3321c07ae5068568cd61ac9f4ba749006a7185c9 authored by Peter Huewe on 15 September 2011, 17:47:42 UTC
TPM: Zero buffer after copying to userspace
Tip revision: 3321c07
profile2linkerlist.pl
#!/usr/bin/perl

#
# Takes a (sorted) output of readprofile and turns it into a list suitable for
# linker scripts
#
# usage:
#	 readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
#
use strict;

while (<>) {
  my $line = $_;

  $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;

  print "*(.text.$1)\n"
      unless ($line =~ /unknown/) || ($line =~ /total/);
}
back to top