All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] toshiba_acpi check kmalloc return value
Date: Mon, 11 Jul 2005 15:55:33 +0000	[thread overview]
Message-ID: <42D29675.1030203@bfs.de> (raw)
In-Reply-To: <1121044844.3554.25.camel@localhost>



Domen Puncer wrote:
> On 11/07/05 11:53 +0200, walter harms wrote:
>>tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
>>if (!tmp_buffer)
>>	return -ENOMEM;
>>
>>if ( copy_from_user(tmp_buffer, buffer, count) )
>>	result = -EFAULT;
>>
>>tmp_buffer[count] = 0;
>>result = item->write_func(tmp_buffer, count);
>>
>>
>>just for the paranoid:
>> should tmp_buffer be filled with \0 to avoid an information leak ?
>> (schroedinger bug ?)
> 
> We copy _from_ userspace.
> 

UPS, you are totaly right :)

ntl  perhaps add to the TODO list.

Check buffers that are used with copy_to_user() a really clean to avoid 
information leakage.

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2005-07-11 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11  1:20 [KJ] [PATCH] toshiba_acpi check kmalloc return value Brandon Niemczyk
2005-07-11  2:32 ` randy_dunlap
2005-07-11  3:07 ` Brandon Niemczyk
2005-07-11  9:53 ` walter harms
2005-07-11 11:24 ` Brandon Niemczyk
2005-07-11 13:01 ` Domen Puncer
2005-07-11 15:55 ` walter harms [this message]
2005-07-11 17:08 ` Domen Puncer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42D29675.1030203@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.