Hi all,
Today's linux-next merge of the bluetooth tree got a conflict in:
net/bluetooth/mgmt.c
between commits:
d3f7d17960ed5 ("Bluetooth: MGMT: validate Add Extended Advertising Data length")
de23fb62259aa ("Bluetooth: MGMT: validate advertising TLV before type checks")
149324fc762c2 ("Bluetooth: MGMT: Fix backward compatibility with userspace")
from the net tree and commits:
8f5b6b4b198ed ("Bluetooth: MGMT: validate Add Extended Advertising Data length")
899a200a76486 ("Bluetooth: MGMT: validate advertising TLV before type checks")
from the bluetooth tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined net/bluetooth/mgmt.c
index f4aa814a03975,027b266ccc747..0000000000000
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@@ -9114,9 -9114,8 +9114,9 @@@ static int add_ext_adv_data(struct soc
BT_DBG("%s", hdev->name);
- expected_len = struct_size(cp, data, cp->adv_data_len + cp->scan_rsp_len);
- if (expected_len != data_len)
+ expected_len = struct_size(cp, data, cp->adv_data_len +
+ cp->scan_rsp_len);
+ if (expected_len > data_len)
return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_DATA,
MGMT_STATUS_INVALID_PARAMS);