bluez/monitor
ERAMOTO Masaya 9e997ed2f5 monitor: Fix buffer overflow with unix socket
If btmon uses a unix socket, which has a long pathname, then the
buffer overflow occurs as below:

 *** strcpy_chk: buffer overflow detected ***: program terminated
    at 0x4C3085C: ??? (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x4C34E46: __strcpy_chk (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x4084FE: strcpy (string3.h:110)
    by 0x4084FE: control_server (control.c:1148)
    by 0x4029E9: main (main.c:144)

This patch also gives an error and stops running when parsing command-line
arguments if the unix socket pathname is too long. And this patch adds the
redundant check in control_server() to prevent the regression when reusing
in the future.
2017-10-05 16:40:00 +03:00
..
a2dp.c monitor/a2dp: Decode LDAC capabilities 2015-12-01 10:42:30 +02:00
a2dp.h monitor/a2dp: Decode SBC capabilities 2015-12-01 10:42:29 +02:00
analyze.c monitor: Remove some dead code 2016-06-17 10:13:58 +02:00
analyze.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
avctp.c monitor/avctp: Fix reading attribute length as 1 octet 2016-12-09 16:23:04 +02:00
avctp.h monitor: Add AVCTP support to btmon 2014-07-31 15:35:04 +03:00
avdtp.c monitor/avdtp: Correct bit mask for TSEP 2017-06-10 21:18:52 +02:00
avdtp.h monitor/avdtp: Add basic decoding of AVDTP signalling 2015-12-01 10:42:25 +02:00
bnep.c monitor: Add decoding of BNEP Extension Header pkt 2015-05-11 11:09:51 +03:00
bnep.h monitor: Add initial support for BNEP 2015-04-10 17:19:57 +03:00
broadcom.c monitor: Add more Broadcom vendor decodings 2017-08-17 10:25:37 +02:00
broadcom.h monitor: Update handling for vendor commands and events 2015-10-18 21:59:53 +02:00
bt.h monitor: Add LE Set Privacy Mode decoding 2017-08-08 14:18:10 +03:00
control.c monitor: Fix buffer overflow with unix socket 2017-10-05 16:40:00 +03:00
control.h monitor: Disable decoding of control channel and not close it 2016-09-01 18:14:33 +02:00
crc.c monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
crc.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
display.c monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
display.h monitor: Add initial support for parsing new control messages 2016-08-27 20:25:23 +02:00
ellisys.c monitor: Use shared btsnoop code wherever possible 2014-02-11 11:13:59 -08:00
ellisys.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
hcidump.c monitor: Add support for handling SCM_CREDENTIALS if present 2015-10-30 04:04:16 +01:00
hcidump.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
hwdb.c monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
hwdb.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
intel.c monitor: Add support for decoding Intel buadrate command 2017-09-19 12:42:38 +02:00
intel.h monitor: Add support for handling Intel vendor commands 2015-10-18 15:20:55 +02:00
keys.c monitor/keys: use queue_find over queue_foreach 2014-12-16 10:54:32 -02:00
keys.h monitor: Add support for resolving random addresses 2014-02-17 00:23:29 -08:00
l2cap.c monitor: Add missing error code for LE Connection Response 2017-02-21 14:28:59 +01:00
l2cap.h monitor/l2cap: Add channel sequence number 2015-12-01 10:42:25 +02:00
ll.c monitor: Add link layer control PDUs for Bluetooth 5.0 2017-01-29 22:23:34 -08:00
ll.h monitor: Allow padded LL messages from diagnostic channel 2015-10-07 22:40:03 +02:00
lmp.c monitor: Add LMP PDUs for Bluetooth 5.0 2017-01-30 01:30:15 -08:00
lmp.h monitor: Allow padded LMP messages from diagnostic channel 2015-10-07 21:53:24 +02:00
main.c monitor: Fix buffer overflow with unix socket 2017-10-05 16:40:00 +03:00
packet.c monitor: Refactor print_enable function 2017-08-08 14:18:10 +03:00
packet.h monitor: Add option -A/--a2dp to dump A2DP stream data 2017-04-26 11:33:16 +03:00
rfcomm.c monitor/rfcomm: Fix a potential memory access issue for compatibility with LLVM 2016-12-22 12:42:16 +02:00
rfcomm.h monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
sdp.c monitor: Use local includes for libbluetooth headers 2015-02-12 21:52:00 +01:00
sdp.h monitor: Add mode and channel to struct l2cap_frame 2014-07-31 15:35:04 +03:00
tty.h monitor: Introduce support for extended TTY header 2016-05-04 10:35:22 +03:00
uuid.c monitor: Add decoding of GATT Mesh Services 2017-07-21 14:31:59 +03:00
uuid.h monitor/l2cap: Fix buffer overflow when printing UUIDs 2016-08-12 22:48:10 +03:00
vendor.c monitor: Update copyright and license details 2014-02-11 10:59:14 -08:00
vendor.h monitor: Add support for handling Intel vendor commands 2015-10-18 15:20:55 +02:00