Re: Patch "Bluetooth: Fix invalid length check in l2cap_information_rsp()" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

<gregkh@xxxxxxxxxxxxxxxxxxx> writes:

> This is a note to let you know that I've just added the patch titled
>
>     Bluetooth: Fix invalid length check in l2cap_information_rsp()
>
> to the 3.4-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
>      bluetooth-fix-invalid-length-check-in-l2cap_information_rsp.patch
> and it can be found in the queue-3.4 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@xxxxxxxxxxxxxxx> know about it.
>
>
> From 3f6fa3d489e127ca5a5b298eabac3ff5dbe0e112 Mon Sep 17 00:00:00 2001
> From: Jaganath Kanakkassery <jaganath.k@xxxxxxxxxxx>
> Date: Fri, 21 Jun 2013 19:55:11 +0530
> Subject: Bluetooth: Fix invalid length check in l2cap_information_rsp()
>
> From: Jaganath Kanakkassery <jaganath.k@xxxxxxxxxxx>
>
> commit 3f6fa3d489e127ca5a5b298eabac3ff5dbe0e112 upstream.
>
> The length check is invalid since the length varies with type of
> info response.
>
> This was introduced by the commit cb3b3152b2f5939d67005cff841a1ca748b19888
>
> Because of this, l2cap info rsp is not handled and command reject is sent.
>
>> ACL data: handle 11 flags 0x02 dlen 16
>         L2CAP(s): Info rsp: type 2 result 0
>           Extended feature mask 0x00b8
>             Enhanced Retransmission mode
>             Streaming mode
>             FCS Option
>             Fixed Channels
> < ACL data: handle 11 flags 0x00 dlen 10
>         L2CAP(s): Command rej: reason 0
>           Command not understood
>
> Signed-off-by: Jaganath Kanakkassery <jaganath.k@xxxxxxxxxxx>
> Signed-off-by: Chan-Yeol Park <chanyeol.park@xxxxxxxxxxx>
> Acked-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> ---
>  net/bluetooth/l2cap_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -3399,7 +3399,7 @@ static inline int l2cap_move_channel_con
>  	struct l2cap_move_chan_cfm_rsp *rsp = data;
>  	u16 icid;
>  
> -	if (cmd_len != sizeof(*rsp))
> +	if (cmd_len < sizeof(*rsp))
>  		return -EPROTO;
>  
>  	icid = le16_to_cpu(rsp->icid);
>

I have doubts about the correctness of this backport: the original
commit modifies function l2cap_information_rsp(), while this backport
changes l2cap_move_channel_confirm_rsp().

Looking at mainline code, l2cap_move_channel_confirm_rsp() does not
contain the change you're introducing.  Maybe I'm misreading the code
and missing something.

Besides, the commit text claims it is fixing an issue introduced by
cb3b3152b2f5939d67005cff841a1ca748b19888, which is actually not
present in the 3.4 kernel.

Cheers,
-- 
Luis


>
> Patches currently in stable-queue which might be from
>jaganath.k@xxxxxxxxxxx are
>
> queue-3.4/bluetooth-fix-invalid-length-check-in-l2cap_information_rsp.patch
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]