mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.28] bluetooth: fix leak of uninitialized data to userspace
Date: Sun, 05 Oct 2008 18:24:15 +0200	[thread overview]
Message-ID: <1223223855.11272.104.camel@violet.holtmann.net> (raw)
In-Reply-To: <20081005153836.GA15807@localhost.localdomain>

Hi Vegard,

> From 45be27894a18f87b71b855fcc4afd50f860254b4 Mon Sep 17 00:00:00 2001
> From: Vegard Nossum <vegard.nossum@gmail.com>
> Date: Sun, 5 Oct 2008 17:25:45 +0200
> Subject: [PATCH] bluetooth: fix leak of uninitialized data to userspace
> 
>     struct hci_dev_list_req {
>             __u16  dev_num;
>             struct hci_dev_req dev_req[0];  /* hci_dev_req structures */
>     };
> 
> sizeof(struct hci_dev_list_req) == 4, so the two bytes immediately
> following "dev_num" will never be initialized. When this structure
> is copied to userspace, these uninitialized bytes are leaked.
> 
> Fix by using kzalloc() instead of kmalloc(). Found using kmemcheck.

good catch. I thought we moved everything over to kzalloc, but as it
seems we forgot at least one. Applied your patch to me tree. Thanks.

Regards

Marcel



      reply	other threads:[~2008-10-05 16:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-05 15:38 Vegard Nossum
2008-10-05 16:24 ` Marcel Holtmann [this message]

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=1223223855.11272.104.camel@violet.holtmann.net \
    --to=marcel@holtmann.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=vegard.nossum@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome