[bluez/bluez] fdbfe0: monitor: Fix crash due to negative max_len

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

 



  Branch: refs/heads/master
  Home:   https://github.com/bluez/bluez
  Commit: fdbfe0018f6f216ff089c0e1db848ec8ae16585e
      https://github.com/bluez/bluez/commit/fdbfe0018f6f216ff089c0e1db848ec8ae16585e
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M monitor/packet.c

  Log Message:
  -----------
  monitor: Fix crash due to negative max_len

While calculating the max_len for printing the packet details that can
come out negative, so this discards extra text if that happens otherwise
it can cause the following error:

 Process terminating with default action of signal 6 (SIGABRT)
    at 0x4A800F4: __pthread_kill_implementation (in /usr/lib64/libc.so.6)
    by 0x4A26FDD: raise (in /usr/lib64/libc.so.6)
    by 0x4A0E941: abort (in /usr/lib64/libc.so.6)
    by 0x4A0F7A6: __libc_message_impl.cold (in /usr/lib64/libc.so.6)
    by 0x4B0E3B8: __fortify_fail (in /usr/lib64/libc.so.6)
    by 0x4B0DD53: __chk_fail (in /usr/lib64/libc.so.6)
    by 0x4B0F544: __snprintf_chk (in /usr/lib64/libc.so.6)
    by 0x11F3E6: snprintf (stdio2.h:68)


  Commit: 3c62df13abbce6551166a25c481a1cd4d2d32ce7
      https://github.com/bluez/bluez/commit/3c62df13abbce6551166a25c481a1cd4d2d32ce7
  Author: Arkadiusz Bokowy <arkadiusz.bokowy@xxxxxxxxx>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M emulator/btdev.c
    M emulator/bthost.c

  Log Message:
  -----------
  bthost: Set advertising intervals to valid value

The range for LE advertising intervals shall be in range between 20 ms
and 10,485,759.375 ms. Requesting other value should result in the
unsupported feature or parameter value error code (0x11).

After the modification in fa4d477, the btdev emulator no longer accepts
uninitialized LE advertising intervals. To fix that, set the default LE
advertising interval to the lowest possible value - 20 ms - in order to
minimize tests delay cause by device discovery.

Also, this commit fixes the detection of the high duty cycle directed
connectable advertising and sets the advertising interval to 3 ms for
such cases in order to be complaint with the spec.


Compare: https://github.com/bluez/bluez/compare/264bf951f2d6...3c62df13abbc

To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications




[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