]> git.ipfire.org Git - thirdparty/linux.git/commit
Bluetooth: MGMT: Fix backward compatibility with userspace
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 2 Jun 2026 20:48:34 +0000 (16:48 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 3 Jun 2026 15:24:12 +0000 (11:24 -0400)
commit149324fc762c2a7acef9c26790566f81f475e51f
treeede5ce1896656f2153b969aaab4ff9f424e85af0
parent4847c5bca22227100ae69e96af86618b6fd2671f
Bluetooth: MGMT: Fix backward compatibility with userspace

bluetoothd has a bug with makes it send extra bytes as part of
MGMT_OP_ADD_EXT_ADV_DATA which are now being checked to be the
exact the expected length, relax this so only when the expected
length is greater than the data length to cause an error since
that would result in accessing invalid memory, otherwise just
ignore the extra bytes.

Link: https://lore.kernel.org/linux-bluetooth/20260602204749.210857-1-luiz.dentz@gmail.com/T/#u
Fixes: d3f7d17960ed ("Bluetooth: MGMT: validate Add Extended Advertising Data length")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c