* [bluez/bluez] 616900: shared/log: Fix not checking vasprintf return
@ 2023-09-19 19:34 Arkadiusz Bokowy
0 siblings, 0 replies; only message in thread
From: Arkadiusz Bokowy @ 2023-09-19 19:34 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/master
Home: https://github.com/bluez/bluez
Commit: 6169001a2b57eab09743467b4392d554f1a26e92
https://github.com/bluez/bluez/commit/6169001a2b57eab09743467b4392d554f1a26e92
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2023-09-18 (Mon, 18 Sep 2023)
Changed paths:
M src/shared/log.c
Log Message:
-----------
shared/log: Fix not checking vasprintf return
It seems like some implementation of vasprintf set the content of the
str to NULL rather then returning -1 causing the following errors:
=================================================================
==216204==ERROR: AddressSanitizer: attempting free on address which
was not malloc()-ed: 0x55e787722cf0 in thread T0
#0 0x55e784f75872 in __interceptor_free.part.0 asan_malloc_linux.cpp.o
#1 0x55e7850e55f9 in bt_log_vprintf
/usr/src/debug/bluez-git/bluez-git/src/shared/log.c:154:2
#2 0x55e78502db18 in monitor_log
/usr/src/debug/bluez-git/bluez-git/src/log.c:40:2
#3 0x55e78502dab4 in info
/usr/src/debug/bluez-git/bluez-git/src/log.c:52:2
#4 0x55e78502e314 in __btd_log_init
/usr/src/debug/bluez-git/bluez-git/src/log.c:179:2
#5 0x55e78502aa63 in main
/usr/src/debug/bluez-git/bluez-git/src/main.c:1388:2
#6 0x7f1d5fe27ccf (/usr/lib/libc.so.6+0x27ccf) (BuildId:
316d0d3666387f0e8fb98773f51aa1801027c5ab)
#7 0x7f1d5fe27d89 in __libc_start_main
(/usr/lib/libc.so.6+0x27d89) (BuildId:
316d0d3666387f0e8fb98773f51aa1801027c5ab)
#8 0x55e784e88084 in _start
(/usr/lib/bluetooth/bluetoothd+0x36084) (BuildId:
19348ea642303b701c033d773055becb623fe79a)
Address 0x55e787722cf0 is a wild pointer inside of access range of
size 0x000000000001.
SUMMARY: AddressSanitizer: bad-free asan_malloc_linux.cpp.o in
__interceptor_free.part.0
==216204==ABORTING
сен 18 13:10:02 archlinux systemd[1]: bluetooth.service: Main process
exited, code=exited, status=1/FAILURE
Commit: eb9eaf01d1616246a261aba155d348401882184b
https://github.com/bluez/bluez/commit/eb9eaf01d1616246a261aba155d348401882184b
Author: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Date: 2023-09-19 (Tue, 19 Sep 2023)
Changed paths:
M emulator/btdev.c
Log Message:
-----------
emulator: Skip new line when using util_debug
The debug callback vhci_debug() already prints new line after each debug
string. Explicit new line in the util_debug call causes double new line
in the output.
Commit: 7f788a2c5162985eaddc8bb9377b3f1c91f2e041
https://github.com/bluez/bluez/commit/7f788a2c5162985eaddc8bb9377b3f1c91f2e041
Author: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Date: 2023-09-19 (Tue, 19 Sep 2023)
Changed paths:
M emulator/hciemu.c
M emulator/vhci.c
Log Message:
-----------
hciemu: Call btdev_receive_h4 unconditionally
Calling btdev_receive_h4 without prior logic will allow this function
to print some debug logs. E.g.: in case when the received packet type
is not supported.
> Bluetooth emulator ver 5.66
> vhci0: > ff 00 01 00 ....
> vhci0: Unsupported packet 0xff
Compare: https://github.com/bluez/bluez/compare/04e18c0dcbc1...7f788a2c5162
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-19 19:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 19:34 [bluez/bluez] 616900: shared/log: Fix not checking vasprintf return Arkadiusz Bokowy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).