mbox series

[BlueZ,0/4] Fix an allocation oversight in SDP parsing

Message ID 20231103182150.60088-1-verdre@v0yd.nl (mailing list archive)
Headers show
Series Fix an allocation oversight in SDP parsing | expand

Message

Jonas Dreßler Nov. 3, 2023, 6:21 p.m. UTC
There's fairly old oversight in the SDP parsing code where it was forgotten to
add a NULL termination byte to strings that are later handled using strlen().

This series fixes that oversight, with a few commits to better follow best
practices on top.

Found by running with address sanitizer.

Jonas Dreßler (4):
  lib/sdp: Allocate strings in sdp_data_t with NULL termination
  lib/sdp: Don't assume uint8_t has size 1
  lib/sdp: Use correct string length in sdp_copy_seq()
  lib/sdp: Pass size_t to sdp_get_string_attr()

 lib/sdp.c     | 15 ++++++++-------
 lib/sdp_lib.h | 14 +++++++-------
 2 files changed, 15 insertions(+), 14 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org Nov. 13, 2023, 7:22 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri,  3 Nov 2023 19:21:46 +0100 you wrote:
> There's fairly old oversight in the SDP parsing code where it was forgotten to
> add a NULL termination byte to strings that are later handled using strlen().
> 
> This series fixes that oversight, with a few commits to better follow best
> practices on top.
> 
> Found by running with address sanitizer.
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/4] lib/sdp: Allocate strings in sdp_data_t with NULL termination
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fdb5ba2cbff3
  - [BlueZ,2/4] lib/sdp: Don't assume uint8_t has size 1
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cfcc6346a96a
  - [BlueZ,3/4] lib/sdp: Use correct string length in sdp_copy_seq()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5afa25c95e6a
  - [BlueZ,4/4] lib/sdp: Pass size_t to sdp_get_string_attr()
    (no matching commit)

You are awesome, thank you!