A heap-based buffer overflow was discovered in bluetoothd in BlueZ through 5.48. There isn't any check on whether there is enough space in the destination buffer. The function simply appends all data passed to it. The values of all attributes that are requested are appended to the output buffer. There are no size checks whatsoever, resulting in a simple heap overflow if one can craft a request where the response is large enough to overflow the preallocated buffer. This issue exists in serviceattrreq gets called by process_request (in sdpd-request.c), which also allocates the response buffer.
{ "availability": "No subscription required", "ubuntu_priority": "medium", "binaries": [ { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluetooth" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez-cups" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez-dbg" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez-hcidump" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez-obexd" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "bluez-tests" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "libbluetooth-dev" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "libbluetooth3" }, { "binary_version": "5.48-0ubuntu3.7", "binary_name": "libbluetooth3-dbg" } ] }
{ "availability": "No subscription required", "ubuntu_priority": "medium", "binaries": [ { "binary_version": "5.53-0ubuntu3", "binary_name": "bluetooth" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez-cups" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez-dbg" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez-hcidump" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez-obexd" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "bluez-tests" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "libbluetooth-dev" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "libbluetooth3" }, { "binary_version": "5.53-0ubuntu3", "binary_name": "libbluetooth3-dbg" } ] }