Re: [PATCH] Bluetooth: Fix BR/EDR-only address checks for remote OOB data

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

 



Hy Szymon,

On Mon, Nov 17, 2014, Szymon Janc wrote:
> On Monday 17 of November 2014 18:49:25 Johan Hedberg wrote:
> > From: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> > 
> > For now the mgmt commands dealing with remote OOB data are strictly
> > BR/EDR-only. This patch fixes missing checks for the passed address type
> > so that any non-BR/EDR value triggers the appropriate error response.
> > 
> > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> > ---
> >  net/bluetooth/mgmt.c | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index b84c0923ec62..aaaa605f48b0 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -3589,6 +3589,13 @@ static int add_remote_oob_data(struct sock *sk,
> > struct hci_dev *hdev, struct mgmt_cp_add_remote_oob_data *cp = data;
> >  		u8 status;
> > 
> > +		if (cp->addr.type != BDADDR_BREDR) {
> > +			err = cmd_status(sk, hdev->id,
> > +					 MGMT_OP_ADD_REMOTE_OOB_DATA,
> > +					 MGMT_STATUS_INVALID_PARAMS);
> > +			goto unlock;
> > +		}
> 
> This should generate command complete event.
> (it looks like there is also similar bug in 'else' case in the code)

Good point! v2 coming in a minute (also resending my other patch to
avoid conflicts).

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux