From: Gustavo Padovan <gustavo@padovan.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"open list:BLUETOOTH SUBSYSTEM" <linux-bluetooth@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] Bluetooth: check for (harmless) underflow
Date: Fri, 31 May 2013 00:02:46 +0000 [thread overview]
Message-ID: <20130531000246.GC14083@joana> (raw)
In-Reply-To: <20130530080510.GD8148@debian>
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Hi Dan,
* Dan Carpenter <dan.carpenter@oracle.com> [2013-05-30 11:05:10 +0300]:
> "len" can be negative here. It's harmless but pretty subtle and
> scary looking so lets add a check for it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index a1b7a02..438f39e 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -4069,6 +4069,9 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,
> BT_DBG("scid 0x%4.4x flags 0x%2.2x result 0x%2.2x len %d", scid, flags,
> result, len);
>
> + if (len < 0)
> + return -EINVAL;
> +
> chan = l2cap_get_chan_by_scid(conn, scid);
> if (!chan)
> return 0;
We already pushed to bluetooth.git a more comprehensive patch to fix this
issue and others over the code. Thanks anyway for sending this.
Gustavo
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Gustavo Padovan <gustavo@padovan.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"open list:BLUETOOTH SUBSYSTEM" <linux-bluetooth@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] Bluetooth: check for (harmless) underflow
Date: Thu, 30 May 2013 21:02:46 -0300 [thread overview]
Message-ID: <20130531000246.GC14083@joana> (raw)
In-Reply-To: <20130530080510.GD8148@debian>
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Hi Dan,
* Dan Carpenter <dan.carpenter@oracle.com> [2013-05-30 11:05:10 +0300]:
> "len" can be negative here. It's harmless but pretty subtle and
> scary looking so lets add a check for it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index a1b7a02..438f39e 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -4069,6 +4069,9 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,
> BT_DBG("scid 0x%4.4x flags 0x%2.2x result 0x%2.2x len %d", scid, flags,
> result, len);
>
> + if (len < 0)
> + return -EINVAL;
> +
> chan = l2cap_get_chan_by_scid(conn, scid);
> if (!chan)
> return 0;
We already pushed to bluetooth.git a more comprehensive patch to fix this
issue and others over the code. Thanks anyway for sending this.
Gustavo
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-05-31 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 8:05 [patch] Bluetooth: check for (harmless) underflow Dan Carpenter
2013-05-30 8:05 ` Dan Carpenter
2013-05-31 0:02 ` Gustavo Padovan [this message]
2013-05-31 0:02 ` Gustavo Padovan
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=20130531000246.GC14083@joana \
--to=gustavo@padovan.org \
--cc=dan.carpenter@oracle.com \
--cc=johan.hedberg@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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.