From: Marcel Holtmann <marcel@holtmann.org>
To: Filip Palian <s3810@pjwstk.edu.pl>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>,
"David S. Miller" <davem@davemloft.net>,
linux-bluetooth@vger.kernel.org
Subject: Re: Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.
Date: Wed, 11 May 2011 18:30:00 -0700 [thread overview]
Message-ID: <1305163800.15916.169.camel@aeonflux> (raw)
In-Reply-To: <BANLkTik7WyQ977-+8XapTgBrVRMyexyHKg@mail.gmail.com>
Hi Filip,
> Structures "l2cap_conninfo" and "rfcomm_conninfo" have one padding
> byte each. This byte in "cinfo" is copied to userspace uninitialized.
>
> patch no.1:
> -- cut --
> --- a/net/bluetooth/l2cap_sock.c 2011-05-04 03:59:13.000000000 +0100
> +++ b/net/bluetooth/l2cap_sock.c 2011-05-08 18:57:20.000000000 +0100
> @@ -446,6 +446,7 @@ static int l2cap_sock_getsockopt_old(str
> break;
> }
>
> + memset(&cinfo, 0, sizeof(cinfo));
> cinfo.hci_handle = l2cap_pi(sk)->conn->hcon->handle;
> memcpy(cinfo.dev_class, l2cap_pi(sk)->conn->hcon->dev_class, 3);
nice catch, but please create a patch via git format-patch and don't
forget a Signed-off-by line.
Regards
Marcel
next prev parent reply other threads:[~2011-05-12 1:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 19:57 Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace Filip Palian
2011-05-09 14:31 ` [oss-security] " Vasiliy Kulikov
2011-05-12 1:30 ` Marcel Holtmann [this message]
2011-05-12 17:32 ` Filip Palian
2011-05-12 19:08 ` Marcel Holtmann
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=1305163800.15916.169.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=davem@davemloft.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=padovan@profusion.mobi \
--cc=s3810@pjwstk.edu.pl \
/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