bearer: Fix auto-connect handling of LE Connect and Disconnect
cover bearer: Fix auto-connect handling of LE Connect and Disconnect
org.bluez.Bearer.LE1.Disconnect is documented, like org.bluez.Device1.Disconnect, to disable incoming connections of a device that is not trusted until Connect is called again. Device1 does this by taking the device out of the auto-connect list, but the LE bearer does not: a paired HID device that is not trusted and keeps advertising is connected back right after Bearer.LE1.Disconnect.
Bearer.LE1.Connect does not put a device back in the list either, unlike Device1.Connect, so a device taken out of it by Device1.Disconnect is not reconnected after it loses the connection.
The first patch moves what Device1 does into two functions, and the second one calls them from the LE bearer. The BR/EDR bearer is left as it is, as auto-connect is only done over LE.
I reproduced this with a functional test using the HID device of test_hog.py, on master and bluetooth-next 3f425f95ba39:
Disconnect, untrusted master with the series Device1.Disconnect stays disconnected stays disconnected Bearer.LE1.Disconnect connected back stays disconnected
Connect, then the HID device drops the link
Device1.Connect reconnected reconnected Bearer.LE1.Connect not reconnected reconnected
A trusted device is connected back after Device1.Disconnect in both, as expected. make check and the functional tests using the bearers, HoG, btmgmt, bluetoothctl or the agent pass as before.
I have the test as two test cases for test_bearer.py, documented in doc/functional-bearer.rst, and can send them as a third patch if you want them.
Kevin Dewald (2):
device: Add functions to pause and resume auto-connect
bearer: Fix LE Connect and Disconnect ignoring auto-connect
src/bearer.c | 5 +++++ src/device.c | 42 +++++++++++++++++++++++++----------------- src/device.h | 2 ++ 3 files changed, 32 insertions(+), 17 deletions(-)
base-commit: a8067198717b38391ca183ed7f41a69ec4b81b6e
Signature · 1 line
2.54.0 (Apple Git-157)
PATCH 1/2 device: Add functions to pause and resume auto-connect
Device1.Disconnect takes a device that is not trusted out of the auto-connect list, and Device1.Connect and Device1.Pair put it back. This moves both into functions, so that the LE bearer can do the same.
--- src/device.c | 42 +++++++++++++++++++++++++----------------- src/device.h | 2 ++ 2 files changed, 27 insertions(+), 17 deletions(-)
src/device.c +25 -17
@@ -2369,19 +2369,34 @@ static void device_set_auto_connect(struct btd_device *device, gboolean enable)adapter_connect_list_add (device->adapter, device); } +/* +* If device is not trusted disable connections through passive scanning +* until Connect is called +*/ +void device_pause_auto_connect (struct btd_device *device) +{ +if (!device->auto_connect || device->trusted) +return ; + + device->disable_auto_connect = TRUE; +device_set_auto_connect (device, FALSE); +} + +void device_resume_auto_connect (struct btd_device *device) +{ +if (!device->disable_auto_connect) +return ; + + device->disable_auto_connect = FALSE; +device_set_auto_connect (device, TRUE); +} +static DBusMessage *dev_disconnect (DBusConnection *conn,DBusMessage *msg,void *user_data) {struct btd_device *device = user_data; -/* -* If device is not trusted disable connections through passive -* scanning until Device1.Connect is called -*/ -if (device->auto_connect && !device->trusted) { - device->disable_auto_connect = TRUE; -device_set_auto_connect (device, FALSE); - } +device_pause_auto_connect (device);device_request_disconnect (device, msg);
@@ -2926,11 +2941,7 @@ static DBusMessage *dev_connect(DBusConnection *conn, DBusMessage *msg,return dbus_message_new_method_return (msg);btd_device_set_temporary (dev, false); - -if (dev->disable_auto_connect) { - dev->disable_auto_connect = FALSE; -device_set_auto_connect (dev, TRUE); - } +device_resume_auto_connect (dev); err =device_connect_le (dev);if (err <0 )
@@ -3480,10 +3491,7 @@ static DBusMessage *pair_device(DBusConnection *conn, DBusMessage *msg,* this in the ATT connect callback) */ if (bdaddr_type !=BDADDR_BREDR ) { -if (device->disable_auto_connect) { - device->disable_auto_connect = FALSE; -device_set_auto_connect (device, TRUE); - } +device_resume_auto_connect (device);if (!state->connected &&btd_le_connect_before_pairing ()) err =device_connect_le (device);
src/device.h +2 -0
@@ -206,6 +206,8 @@ void btd_device_set_pnpid(struct btd_device *device, uint16_t source, uint16_t vendor, uint16_t product, uint16_t version);int device_connect_le (struct btd_device *dev); +void device_pause_auto_connect (struct btd_device *device); +void device_resume_auto_connect (struct btd_device *device);DBusMessage *device_connect_profiles (struct btd_device *dev,uint8_t bdaddr_type,DBusMessage *msg,const char *uuid);
Signature · 1 line
2.54.0 (Apple Git-157)
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1204681/
---Test result---
Test Summary:
CheckPatch PASS 0.92 seconds GitLint PASS 0.60 seconds BuildEll PASS 17.83 seconds BluezMake PASS 262.46 seconds CheckSmatch PASS 232.68 seconds bluezmakeextell PASS 89.84 seconds TestFunctional FAIL 1064.00 seconds IncrementalBuild PASS 268.59 seconds ScanBuild PASS 927.35 seconds
Details
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bearer::test_bearer_le_conn_update[hosts14-vm2]: failed on teardown with "pytest_bluezenv.plugin.CoredumpWarning: Core dump: test-bluezenv-hosts14.1-bluetoothd-1794039609-189.core
/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.
[New LWP 189]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/runner/work/bluez/bluez/src/src/src/bluetoothd --nodetach -f /run/bluetoo'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
Thread 1 (Thread 0x7f040e130900 (LWP 189)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {0}}
ret = <optimized out>
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
No locals.
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
No locals.
#3 0x00007f040e88bb7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#4 0x00007f040e86e8ec in __GI_abort () at ./stdlib/abort.c:77
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x0}
#5 0x00007f040f496a0f in __sanitizer::Abort () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp:165
No locals.
#6 0x00007f040f5bcc2d in __sanitizer::Die () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:58
No locals.
#7 0x00007f040f59193c in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0x7fffaa3f9566) at ../../../../src/libsanitizer/asan/asan_report.cpp:221
buffer_copy = {buffer_ = {<__sanitizer::InternalMmapVectorNoCtor<char, false>> = {data_ = 0x7b04083f5000 '=' <repeats 65 times>, "\n==189==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c140d5e1720 at pc 0x555ee2d4dbcd bp 0x7fffaa3fa1e0 sp 0x7fffaa3fa1d0"..., capacity_bytes_ = 8192, size_ = 4349}, <No data fields>}}
buffer_copy = <optimized out>
l = <optimized out>
#8 0x00007f040f590e02 in __asan::ReportGenericError (pc=93866020887501, bp=140736049684960, sp=sp@entry=140736049684944, addr=136425565460256, is_write=is_write@entry=false, access_size=8, fatal=true, exp=<optimized out>) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = {error_report_lock_ = {<No data fields>}, static current_error_ = {kind = __asan::kErrorKindGeneric, {Base = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, DeadlySignal = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, signal = {siginfo = 0x7f0400000002, context = 0x7c140d5e1720, addr = 0, pc = 0, sp = 6150393168328, bp = 136425565460256, is_memory_access = 96, write_flag = __sanitizer::SignalContext::Unknown, is_true_faulting_addr = 192}}, DoubleFree = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, second_free_stack = 0x7f0400000002, addr_description = {addr = 136425565460256, alloc_tid = 0, free_tid = 0, alloc_stack_id = 456, free_stack_id = 1432, chunk_access = {bad_addr = 136425565460256, offset = 96, chunk_begin = 136425565460160, chunk_size = 232, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}}, NewDeleteTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, free_stack = 0x7f0400000002, addr_description = {addr = 136425565460256, alloc_tid = 0, free_tid = 0, alloc_stack_id = 456, free_stack_id = 1432, chunk_access = {bad_addr = 136425565460256, offset = 96, chunk_begin = 136425565460160, chunk_size = 232, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, delete_size = 0, delete_alignment = 140736049682992}, FreeNotMalloced = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, free_stack = 0x7f0400000002, addr_description = {data = {kind = 224270112, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 6150393168328, alloc_stack_id = 224270112, free_stack_id = 31764, chunk_access = {bad_addr = 96, offset = 136425565460160, chunk_begin = 232, chunk_size = 139655156621320, user_requested_alignment = 0, access_type = 0, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 6150393168328, frame_pc = 136425565460256, access_size = 96, frame_descr = 0x7c140d5e16c0 "\230\005"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 6150393168328, size_with_redzone = 136425565460256, name = 0x60 <error: Cannot access memory at address 0x60>, module_name = 0x7c140d5e16c0 "\230\005", has_dynamic_init = 232, gcc_location = 0x7f0400006008, odr_indicator = 0}, {beg = 140736049682992, size = 139655414227250, size_with_redzone = 140736049683072, name = 0x2 <error: Cannot access memory at address 0x2>, module_name = 0x7f0400000000 "", has_dynamic_init = 139655418443684, gcc_location = 0x7fff0000059c, odr_indicator = 139655386257856}, {beg = 140736049683120, size = 2, size_with_redzone = 139655414755264, name = 0x7be40d5e0b90 "\003\021", module_name = 0x7fffaa3f9a80 "\320\242?\252\377\177", has_dynamic_init = 139655413106488, gcc_location = 0xa0, odr_indicator = 136219407027088}, {beg = 139655388811472, size = 140736049683104, size_with_redzone = 136219407027104, name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", module_name = 0x7fffaa3fa3b0 "", has_dynamic_init = 135257314415776, gcc_location = 0x7fffaa3fa2d0, odr_indicator = 139655414035393}}, reg_sites = {2856295072, 32767, 245515906, 30}, access_size = 140736049683120, size = 205 '\315'}, wild = {addr = 0, access_size = 0}}}}}, AllocTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, dealloc_stack = 0x7f0400000002, alloc_type = 224270112, dealloc_type = 31764, addr_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 0, kind = (unknown: 0xc8), shadow_byte = 1 '\001'}, heap = {addr = 0, alloc_tid = 6150393168328, free_tid = 136425565460256, alloc_stack_id = 96, free_stack_id = 0, chunk_access = {bad_addr = 136425565460160, offset = 232, chunk_begin = 139655156621320, chunk_size = 0, user_requested_alignment = 2608, access_type = 1, alloc_type = 2}}, stack = {addr = 0, tid = 6150393168328, offset = 136425565460256, frame_pc = 96, access_size = 136425565460160, frame_descr = 0xe8 <error: Cannot access memory at address 0xe8>}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 6150393168328, size = 136425565460256, size_with_redzone = 96, name = 0x7c140d5e16c0 "\230\005", module_name = 0xe8 <error: Cannot access memory at address 0xe8>, has_dynamic_init = 139655156621320, gcc_location = 0x0, odr_indicator = 140736049682992}, {beg = 139655414227250, size = 140736049683072, size_with_redzone = 2, name = 0x7f0400000000 "", module_name = 0x7f040f9b77a4 <__sanitizer::theDepot+2756196> "\234\005", has_dynamic_init = 140733193389468, gcc_location = 0x7f040db059c0, odr_indicator = 140736049683120}, {beg = 2, size = 139655414755264, size_with_redzone = 136219407027088, name = 0x7fffaa3f9a80 "\320\242?\252\377\177", module_name = 0x7f040f4a0738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 160, gcc_location = 0x7be40d5e0b90, odr_indicator = 139655388811472}, {beg = 140736049683104, size = 136219407027104, size_with_redzone = 93866019923344, name = 0x7fffaa3fa3b0 "", module_name = 0x7b040c2dd4a0 "pU^\rt{", has_dynamic_init = 140736049685200, gcc_location = 0x7f040f5833c1 <___interceptor_free(void*)+113>, odr_indicator = 140736049683104}}, reg_sites = {245515906, 30, 2856295088, 32767}, access_size = 93866020887501, size = 224 '\340'}, wild = {addr = 0, access_size = 6150393168328}}}}}, MallocUsableSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, addr_description = {data = {kind = 224270112, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 6150393168328, alloc_stack_id = 224270112, free_stack_id = 31764, chunk_access = {bad_addr = 96, offset = 136425565460160, chunk_begin = 232, chunk_size = 139655156621320, user_requested_alignment = 0, access_type = 0, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 6150393168328, frame_pc = 136425565460256, access_size = 96, frame_descr = 0x7c140d5e16c0 "\230\005"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 6150393168328, size_with_redzone = 136425565460256, name = 0x60 <error: Cannot access memory at address 0x60>, module_name = 0x7c140d5e16c0 "\230\005", has_dynamic_init = 232, gcc_location = 0x7f0400006008, odr_indicator = 0}, {beg = 140736049682992, size = 139655414227250, size_with_redzone = 140736049683072, name = 0x2 <error: Cannot access memory at address 0x2>, module_name = 0x7f0400000000 "", has_dynamic_init = 139655418443684, gcc_location = 0x7fff0000059c, odr_indicator = 139655386257856}, {beg = 140736049683120, size = 2, size_with_redzone = 139655414755264, name = 0x7be40d5e0b90 "\003\021", module_name = 0x7fffaa3f9a80 "\320\242?\252\377\177", has_dynamic_init = 139655413106488, gcc_location = 0xa0, odr_indicator = 136219407027088}, {beg = 139655388811472, size = 140736049683104, size_with_redzone = 136219407027104, name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", module_name = 0x7fffaa3fa3b0 "", has_dynamic_init = 135257314415776, gcc_location = 0x7fffaa3fa2d0, odr_indicator = 139655414035393}}, reg_sites = {2856295072, 32767, 245515906, 30}, access_size = 140736049683120, size = 205 '\315'}, wild = {addr = 0, access_size = 0}}}}}, SanitizerGetAllocatedSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, addr_description = {data = {kind = 224270112, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 6150393168328, alloc_stack_id = 224270112, free_stack_id = 31764, chunk_access = {bad_addr = 96, offset = 136425565460160, chunk_begin = 232, chunk_size = 139655156621320, user_requested_alignment = 0, access_type = 0, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 6150393168328, frame_pc = 136425565460256, access_size = 96, frame_descr = 0x7c140d5e16c0 "\230\005"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 6150393168328, size_with_redzone = 136425565460256, name = 0x60 <error: Cannot access memory at address 0x60>, module_name = 0x7c140d5e16c0 "\230\005", has_dynamic_init = 232, gcc_location = 0x7f0400006008, odr_indicator = 0}, {beg = 140736049682992, size = 139655414227250, size_with_redzone = 140736049683072, name = 0x2 <error: Cannot access memory at address 0x2>, module_name = 0x7f0400000000 "", has_dynamic_init = 139655418443684, gcc_location = 0x7fff0000059c, odr_indicator = 139655386257856}, {beg = 140736049683120, size = 2, size_with_redzone = 139655414755264, name = 0x7be40d5e0b90 "\003\021", module_name = 0x7fffaa3f9a80 "\320\242?\252\377\177", has_dynamic_init = 139655413106488, gcc_location = 0xa0, odr_indicator = 136219407027088}, {beg = 139655388811472, size = 140736049683104, size_with_redzone = 136219407027104, name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", module_name = 0x7fffaa3fa3b0 "", has_dynamic_init = 135257314415776, gcc_location = 0x7fffaa3fa2d0, odr_indicator = 139655414035393}}, reg_sites = {2856295072, 32767, 245515906, 30}, access_size = 140736049683120, size = 205 '\315'}, wild = {addr = 0, access_size = 0}}}}}, CallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, count = 136425565460256, size = 0}, ReallocArrayOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, count = 136425565460256, size = 0}, PvallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, size = 136425565460256}, InvalidAllocationAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, alignment = 136425565460256}, InvalidAlignedAllocAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, size = 136425565460256, alignment = 0}, InvalidPosixMemalignAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, alignment = 136425565460256}, AllocationSizeTooBig = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, user_size = 136425565460256, total_size = 0, max_size = 0}, RssLimitExceeded = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002}, OutOfMemory = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, requested_size = 136425565460256}, StringFunctionMemoryRangesOverlap = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, length1 = 136425565460256, length2 = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 6150393168328, kind = (unknown: 0x20), shadow_byte = 23 '\027'}, heap = {addr = 6150393168328, alloc_tid = 136425565460256, free_tid = 96, alloc_stack_id = 224270016, free_stack_id = 31764, chunk_access = {bad_addr = 232, offset = 139655156621320, chunk_begin = 0, chunk_size = 140736049682992, user_requested_alignment = 306, access_type = 2, alloc_type = 0}}, stack = {addr = 6150393168328, tid = 136425565460256, offset = 96, frame_pc = 136425565460160, access_size = 232, frame_descr = 0x7f0400006008 ""}, global = {addr = 6150393168328, static kMaxGlobals = 4, globals = {{beg = 136425565460256, size = 96, size_with_redzone = 136425565460160, name = 0xe8 <error: Cannot access memory at address 0xe8>, module_name = 0x7f0400006008 "", has_dynamic_init = 0, gcc_location = 0x7fffaa3f9a30, odr_indicator = 139655414227250}, {beg = 140736049683072, size = 2, size_with_redzone = 139655156596736, name = 0x7f040f9b77a4 <__sanitizer::theDepot+2756196> "\234\005", module_name = 0x7fff0000059c <error: Cannot access memory at address 0x7fff0000059c>, has_dynamic_init = 139655386257856, gcc_location = 0x7fffaa3f9ab0, odr_indicator = 2}, {beg = 139655414755264, size = 136219407027088, size_with_redzone = 140736049683072, name = 0x7f040f4a0738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0xa0 <error: Cannot access memory at address 0xa0>, has_dynamic_init = 136219407027088, gcc_location = 0x7f040dd750d0, odr_indicator = 140736049683104}, {beg = 136219407027104, size = 93866019923344, size_with_redzone = 140736049685424, name = 0x7b040c2dd4a0 "pU^\rt{", module_name = 0x7fffaa3fa2d0 "", has_dynamic_init = 139655414035393, gcc_location = 0x7fffaa3f9aa0, odr_indicator = 129094534786}}, reg_sites = {2856295088, 32767, 3805600717, 21854}, access_size = 140736049684960, size = 208 '\320'}, wild = {addr = 6150393168328, access_size = 136425565460256}}}}, addr2_description = {data = {kind = 8, {shadow = {addr = 139655414466455, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 139655414466455, alloc_tid = 139655402355968, free_tid = 135257315563552, alloc_stack_id = 3807268192, free_stack_id = 21854, chunk_access = {bad_addr = 30064771156, offset = 139655414296445, chunk_begin = 135257315563936, chunk_size = 139655414296445, user_requested_alignment = 1088, access_type = 1, alloc_type = 1}}, stack = {addr = 139655414466455, tid = 139655402355968, offset = 135257315563552, frame_pc = 93866022554976, access_size = 30064771156, frame_descr = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125> "I\211\302H\205\300u\035\351\213"}, global = {addr = 139655414466455, static kMaxGlobals = 4, globals = {{beg = 139655402355968, size = 135257315563552, size_with_redzone = 93866022554976, name = 0x700000054 <error: Cannot access memory at address 0x700000054>, module_name = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125> "I\211\302H\205\300u\035\351\213", has_dynamic_init = 135257315563936, gcc_location = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125>, odr_indicator = 136081968092224}, {beg = 14069978465185145088, size = 140736049684664, size_with_redzone = 139655414730616, name = 0x0, module_name = 0x7b240d5f64f0 "\240\177^\rd{", has_dynamic_init = 139655392725176, gcc_location = 0x7b340d5ea420, odr_indicator = 140736049684704}, {beg = 135807090169376, size = 135257314416064, size_with_redzone = 135394773385680, name = 0x7b040c2dd5e0 "", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 135257314416064, gcc_location = 0x0, odr_indicator = 93866020812672}, {beg = 0, size = 135807090169376, size_with_redzone = 93866020854292, name = 0x7c040d5e1440 "", module_name = 0x7b040c2dd620 "", has_dynamic_init = 16907164302008, gcc_location = 0x7fffaa3fa150, odr_indicator = 136356845982792}}, reg_sites = {257699709, 32516, 236128440, 32516}, access_size = 93866020282656, size = 128 '\200'}, wild = {addr = 139655414466455, access_size = 139655402355968}}}}, function = 0xc3429ade3ec1a100 <error: Cannot access memory at address 0xc3429ade3ec1a100>}, StringFunctionSizeOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, addr_description = {data = {kind = 224270112, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 6150393168328, alloc_stack_id = 224270112, free_stack_id = 31764, chunk_access = {bad_addr = 96, offset = 136425565460160, chunk_begin = 232, chunk_size = 139655156621320, user_requested_alignment = 0, access_type = 0, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 6150393168328, frame_pc = 136425565460256, access_size = 96, frame_descr = 0x7c140d5e16c0 "\230\005"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 6150393168328, size_with_redzone = 136425565460256, name = 0x60 <error: Cannot access memory at address 0x60>, module_name = 0x7c140d5e16c0 "\230\005", has_dynamic_init = 232, gcc_location = 0x7f0400006008, odr_indicator = 0}, {beg = 140736049682992, size = 139655414227250, size_with_redzone = 140736049683072, name = 0x2 <error: Cannot access memory at address 0x2>, module_name = 0x7f0400000000 "", has_dynamic_init = 139655418443684, gcc_location = 0x7fff0000059c, odr_indicator = 139655386257856}, {beg = 140736049683120, size = 2, size_with_redzone = 139655414755264, name = 0x7be40d5e0b90 "\003\021", module_name = 0x7fffaa3f9a80 "\320\242?\252\377\177", has_dynamic_init = 139655413106488, gcc_location = 0xa0, odr_indicator = 136219407027088}, {beg = 139655388811472, size = 140736049683104, size_with_redzone = 136219407027104, name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", module_name = 0x7fffaa3fa3b0 "", has_dynamic_init = 135257314415776, gcc_location = 0x7fffaa3fa2d0, odr_indicator = 139655414035393}}, reg_sites = {2856295072, 32767, 245515906, 30}, access_size = 140736049683120, size = 205 '\315'}, wild = {addr = 0, access_size = 0}}}}, size = 140736049684960}, BadParamsToAnnotateContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, beg = 136425565460256, end = 0, old_mid = 0, new_mid = 6150393168328}, BadParamsToAnnotateDoubleEndedContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, storage_beg = 136425565460256, storage_end = 0, old_container_beg = 0, old_container_end = 6150393168328, new_container_beg = 136425565460256, new_container_end = 96}, BadParamsToCopyContiguousContainerAnnotations = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, stack = 0x7f0400000002, old_storage_beg = 136425565460256, old_storage_end = 0, new_storage_beg = 0, new_storage_end = 6150393168328}, ODRViolation = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, global1 = {beg = 139655156596738, size = 136425565460256, size_with_redzone = 0, name = 0x0, module_name = 0x598000001c8 <error: Cannot access memory at address 0x598000001c8>, has_dynamic_init = 136425565460256, gcc_location = 0x60, odr_indicator = 136425565460160}, global2 = {beg = 232, size = 139655156621320, size_with_redzone = 0, name = 0x7fffaa3f9a30 "\200\232?\252\377\177", module_name = 0x7f040f5b2132 <__sanitizer::StackDepotBase<__sanitizer::StackDepotNode, 1, 20>::Put(__sanitizer::StackTrace, bool*)+690> "H\213E\330D\213E\300D\211@\bD\213U\320L\213]\310E\211\023M\205\366\017\204\256\376\377\377A\306\006\001H\213]\360L\213u\370\351\245\376\377\377\203\372\t~+L\211M\300\211U\310H\211M\320L\211]\330\350\3649\377\377L\213M\300\213U\310H\213M\320L\213]\330\203\302\001\351\217\376\377\377\270\n", has_dynamic_init = 140736049683072, gcc_location = 0x2, odr_indicator = 139655156596736}, stack_id1 = 261846948, stack_id2 = 32516}, InvalidPointerPair = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, pc = 139655156596738, bp = 136425565460256, sp = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 6150393168328, kind = (unknown: 0x20), shadow_byte = 23 '\027'}, heap = {addr = 6150393168328, alloc_tid = 136425565460256, free_tid = 96, alloc_stack_id = 224270016, free_stack_id = 31764, chunk_access = {bad_addr = 232, offset = 139655156621320, chunk_begin = 0, chunk_size = 140736049682992, user_requested_alignment = 306, access_type = 2, alloc_type = 0}}, stack = {addr = 6150393168328, tid = 136425565460256, offset = 96, frame_pc = 136425565460160, access_size = 232, frame_descr = 0x7f0400006008 ""}, global = {addr = 6150393168328, static kMaxGlobals = 4, globals = {{beg = 136425565460256, size = 96, size_with_redzone = 136425565460160, name = 0xe8 <error: Cannot access memory at address 0xe8>, module_name = 0x7f0400006008 "", has_dynamic_init = 0, gcc_location = 0x7fffaa3f9a30, odr_indicator = 139655414227250}, {beg = 140736049683072, size = 2, size_with_redzone = 139655156596736, name = 0x7f040f9b77a4 <__sanitizer::theDepot+2756196> "\234\005", module_name = 0x7fff0000059c <error: Cannot access memory at address 0x7fff0000059c>, has_dynamic_init = 139655386257856, gcc_location = 0x7fffaa3f9ab0, odr_indicator = 2}, {beg = 139655414755264, size = 136219407027088, size_with_redzone = 140736049683072, name = 0x7f040f4a0738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0xa0 <error: Cannot access memory at address 0xa0>, has_dynamic_init = 136219407027088, gcc_location = 0x7f040dd750d0, odr_indicator = 140736049683104}, {beg = 136219407027104, size = 93866019923344, size_with_redzone = 140736049685424, name = 0x7b040c2dd4a0 "pU^\rt{", module_name = 0x7fffaa3fa2d0 "", has_dynamic_init = 139655414035393, gcc_location = 0x7fffaa3f9aa0, odr_indicator = 129094534786}}, reg_sites = {2856295088, 32767, 3805600717, 21854}, access_size = 140736049684960, size = 208 '\320'}, wild = {addr = 6150393168328, access_size = 136425565460256}}}}, addr2_description = {data = {kind = 8, {shadow = {addr = 139655414466455, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 139655414466455, alloc_tid = 139655402355968, free_tid = 135257315563552, alloc_stack_id = 3807268192, free_stack_id = 21854, chunk_access = {bad_addr = 30064771156, offset = 139655414296445, chunk_begin = 135257315563936, chunk_size = 139655414296445, user_requested_alignment = 1088, access_type = 1, alloc_type = 1}}, stack = {addr = 139655414466455, tid = 139655402355968, offset = 135257315563552, frame_pc = 93866022554976, access_size = 30064771156, frame_descr = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125> "I\211\302H\205\300u\035\351\213"}, global = {addr = 139655414466455, static kMaxGlobals = 4, globals = {{beg = 139655402355968, size = 135257315563552, size_with_redzone = 93866022554976, name = 0x700000054 <error: Cannot access memory at address 0x700000054>, module_name = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125> "I\211\302H\205\300u\035\351\213", has_dynamic_init = 135257315563936, gcc_location = 0x7f040f5c2f7d <__sanitizer::DTLS_on_tls_get_addr(void*, void*, unsigned long, unsigned long)+125>, odr_indicator = 136081968092224}, {beg = 14069978465185145088, size = 140736049684664, size_with_redzone = 139655414730616, name = 0x0, module_name = 0x7b240d5f64f0 "\240\177^\rd{", has_dynamic_init = 139655392725176, gcc_location = 0x7b340d5ea420, odr_indicator = 140736049684704}, {beg = 135807090169376, size = 135257314416064, size_with_redzone = 135394773385680, name = 0x7b040c2dd5e0 "", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 135257314416064, gcc_location = 0x0, odr_indicator = 93866020812672}, {beg = 0, size = 135807090169376, size_with_redzone = 93866020854292, name = 0x7c040d5e1440 "", module_name = 0x7b040c2dd620 "", has_dynamic_init = 16907164302008, gcc_location = 0x7fffaa3fa150, odr_indicator = 136356845982792}}, reg_sites = {257699709, 32516, 236128440, 32516}, access_size = 93866020282656, size = 128 '\200'}, wild = {addr = 139655414466455, access_size = 139655402355968}}}}}, Generic = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 136425565460256, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 136425565460256, alloc_tid = 0, free_tid = 0, alloc_stack_id = 456, free_stack_id = 1432, chunk_access = {bad_addr = 136425565460256, offset = 96, chunk_begin = 136425565460160, chunk_size = 232, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 136425565460256, tid = 0, offset = 0, frame_pc = 6150393168328, access_size = 136425565460256, frame_descr = 0x60 <error: Cannot access memory at address 0x60>}, global = {addr = 136425565460256, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 6150393168328, name = 0x7c140d5e1720 "\240\025^\r\204{", module_name = 0x60 <error: Cannot access memory at address 0x60>, has_dynamic_init = 136425565460160, gcc_location = 0xe8, odr_indicator = 139655156621320}, {beg = 0, size = 140736049682992, size_with_redzone = 139655414227250, name = 0x7fffaa3f9a80 "\320\242?\252\377\177", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 139655156596736, gcc_location = 0x7f040f9b77a4 <__sanitizer::theDepot+2756196>, odr_indicator = 140733193389468}, {beg = 139655386257856, size = 140736049683120, size_with_redzone = 2, name = 0x7f040f632fc0 <__asan::instance> "", module_name = 0x7be40d5e0b90 "\003\021", has_dynamic_init = 140736049683072, gcc_location = 0x7f040f4a0738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248>, odr_indicator = 160}, {beg = 136219407027088, size = 139655388811472, size_with_redzone = 140736049683104, name = 0x7be40d5e0ba0 "\234\005", module_name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", has_dynamic_init = 140736049685424, gcc_location = 0x7b040c2dd4a0, odr_indicator = 140736049685200}}, reg_sites = {257438657, 32516, 2856295072, 32767}, access_size = 129094534786, size = 176 '\260'}, wild = {addr = 136425565460256, access_size = 0}}}}, pc = 93866020887501, bp = 140736049684960, sp = 140736049684944, access_size = 8, bug_descr = 0x7f040f5ec797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}}}, halt_on_error_ = true}
error = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\004{\000\000P\236?\252\377\177\000\0000\000\000\000\000\000\000\0005\000\000\000\000\000\000\0000\236?\252\377\177\000\000\034\233S\017\004\177\000\000\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000e\232?\252\377\177\000\000\305\314Y\017\004\177\000\000P\376_\rD{\000\000(\000\000\000\000\000\000\000@\376_\rD{\000\000@\376_\rD{\000\000\220\226?\252\377\177\000\000\005,N\017\004\177\000\000\000\237\366\342^U\000\000\000P\327\r\004\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000^\000\001\001\000\000\000\000\000\000\000\000\370\377\377\377"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 136425565460256, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 136425565460256, alloc_tid = 0, free_tid = 0, alloc_stack_id = 456, free_stack_id = 1432, chunk_access = {bad_addr = 136425565460256, offset = 96, chunk_begin = 136425565460160, chunk_size = 232, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 136425565460256, tid = 0, offset = 0, frame_pc = 6150393168328, access_size = 136425565460256, frame_descr = 0x60 <error: Cannot access memory at address 0x60>}, global = {addr = 136425565460256, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 6150393168328, name = 0x7c140d5e1720 "\240\025^\r\204{", module_name = 0x60 <error: Cannot access memory at address 0x60>, has_dynamic_init = 136425565460160, gcc_location = 0xe8, odr_indicator = 139655156621320}, {beg = 0, size = 140736049682992, size_with_redzone = 139655414227250, name = 0x7fffaa3f9a80 "\320\242?\252\377\177", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 139655156596736, gcc_location = 0x7f040f9b77a4 <__sanitizer::theDepot+2756196>, odr_indicator = 140733193389468}, {beg = 139655386257856, size = 140736049683120, size_with_redzone = 2, name = 0x7f040f632fc0 <__asan::instance> "", module_name = 0x7be40d5e0b90 "\003\021", has_dynamic_init = 140736049683072, gcc_location = 0x7f040f4a0738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248>, odr_indicator = 160}, {beg = 136219407027088, size = 139655388811472, size_with_redzone = 140736049683104, name = 0x7be40d5e0ba0 "\234\005", module_name = 0x555ee2c62590 <device_free> "\363\017\036\372USH\211\373H\203\354\030H\205\377\017\204-\n", has_dynamic_init = 140736049685424, gcc_location = 0x7b040c2dd4a0, odr_indicator = 140736049685200}}, reg_sites = {257438657, 32516, 2856295072, 32767}, access_size = 129094534786, size = 176 '\260'}, wild = {addr = 136425565460256, access_size = 0}}}}, pc = 93866020887501, bp = 140736049684960, sp = 140736049684944, access_size = 8, bug_descr = 0x7f040f5ec797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}
#9 0x00007f040f590f8d in __asan::ReportGenericError (pc=<optimized out>, bp=bp@entry=140736049684960, sp=sp@entry=140736049684944, addr=<optimized out>, is_write=is_write@entry=false, access_size=access_size@entry=8, exp=<optimized out>, fatal=true) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = <optimized out>
error = <optimized out>
enable_fp = <optimized out>
#10 0x00007f040f5923f9 in __asan::__asan_report_load8 (addr=<optimized out>) at ../../../../src/libsanitizer/asan/asan_rtl.cpp:131
bp = 140736049684960
pc = <optimized out>
local_stack = 135394773394672
sp = 140736049684944
#11 0x0000555ee2d4dbcd in discovery_op_free (op=0x7b840d5e16a0) at src/shared/gatt-client.c:407
No locals.
#12 0x0000555ee2e7adea in bt_gatt_request_unref (req=0x7b840d5e1f20) at src/shared/gatt-helpers.c:577
No locals.
#13 bt_gatt_request_unref (req=0x7b840d5e1f20) at src/shared/gatt-helpers.c:566
No locals.
#14 0x0000555ee2d3bcf4 in destroy_att_send_op (data=0x7b640d5e7fa0) at src/shared/att.c:215
op = 0x7b640d5e7fa0
#15 0x0000555ee2cf9972 in queue_remove_all (queue=0x7b340d5ea420, function=function@entry=0x0, user_data=user_data@entry=0x0, destroy=destroy@entry=0x555ee2d3bc10 <destroy_att_send_op>) at src/shared/queue.c:341
tmp = 0x7b240d5f64f0
entry = 0x0
count = <optimized out>
#16 0x0000555ee2d46086 in bt_att_cancel_all (att=0x7c040d5e1440) at src/shared/att.c:1939
entry = <optimized out>
#17 bt_att_cancel_all (att=0x7c040d5e1440) at src/shared/att.c:1932
entry = <optimized out>
chan = <optimized out>
#18 0x0000555ee2d46fc0 in bt_att_unref (att=0x7c040d5e1440) at src/shared/att.c:1350
No locals.
#19 bt_att_unref (att=0x7c040d5e1440) at src/shared/att.c:1341
No locals.
#20 0x0000555ee2c621ff in attio_cleanup (device=device@entry=0x7c740d5e0b00) at src/device.c:873
No locals.
#21 0x0000555ee2c62737 in device_free (user_data=0x7c740d5e0b00) at src/device.c:918
device = 0x7c740d5e0b00
__func__ = "device_free"
#22 0x0000555ee2ce34ca in remove_interface (data=0x7b740d5e5570, name=name@entry=0x555ee2f09380 "org.bluez.Device1") at gdbus/object.c:742
iface = 0x7b640d5e6260
#23 0x0000555ee2ce608c in g_dbus_unregister_interface (connection=<optimized out>, path=<optimized out>, name=<optimized out>) at gdbus/object.c:1499
data = <optimized out>
#24 0x0000555ee2c1837b in remove_temporary_devices (adapter=adapter@entry=0x7c340d5e0200) at src/adapter.c:826
dev = 0x7c740d5e0b00
l = <optimized out>
next = 0x0
#25 0x0000555ee2c196da in adapter_shutdown () at src/adapter.c:11503
adapter = 0x7c340d5e0200
list = 0x7b340d5e3910 = {0x7c340d5e0200}
__func__ = "adapter_shutdown"
#26 0x0000555ee2cba19c in signal_callback (signum=<optimized out>, user_data=<optimized out>) at src/main.c:1517
terminated = false
#27 signal_callback (signum=<optimized out>, user_data=<optimized out>) at src/main.c:1504
terminated = false
#28 0x0000555ee2e6f37e in signal_read (io=<optimized out>, user_data=0x7b340d5e34c0) at src/shared/mainloop-notify.c:145
data = <optimized out>
si = <optimized out>
result = <optimized out>
fd = <optimized out>
#29 0x0000555ee2e6c275 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:173
watch = <optimized out>
result = <optimized out>
destroy = <optimized out>
#30 0x00007f040f29cb9b in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#31 0x00007f040f29e1d7 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#32 0x00007f040f29e577 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#33 0x0000555ee2e6f1d9 in mainloop_run () at src/shared/mainloop-glib.c:65
No locals.
#34 0x0000555ee2e6fb0b in mainloop_run_with_signal (func=func@entry=0x555ee2cba120 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-notify.c:196
data = 0x7b340d5e34c0
io = 0x7b440d5f9590
ret = <optimized out>
#35 0x0000555ee29eb41b in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1745
context = <optimized out>
err = <optimized out>
sdp_mtu = 0
sdp_flags = <optimized out>
gdbus_flags = <optimized out>
__func__ = "main""https://github.com/bluez/bluez/pull/2777
---
Regards,
Linux Bluetooth
PATCH 2/2 bearer: Fix LE Connect and Disconnect ignoring auto-connect
In reply to Kevin DewaldBearer.LE1.Disconnect is documented to disable incoming connections of a device that is not trusted until Connect is called again, as Device1.Disconnect does, but it left the device in the auto-connect list. A device that keeps advertising, such as a HID device, was then connected back right after the disconnection.
Bearer.LE1.Connect did not put a device back in the auto-connect list either, unlike Device1.Connect. A device taken out of it by Device1.Disconnect, or left out of it because it was temporary when its profiles were probed, was then not reconnected after losing the connection.
Fix it by pausing and resuming auto-connect as Device1 does.
--- src/bearer.c | 5 +++++ 1 file changed, 5 insertions(+)
src/bearer.c +5 -0
@@ -153,6 +153,7 @@ static DBusMessage *bearer_connect(DBusConnection *conn, DBusMessage *msg, msg, NULL); else {btd_device_set_temporary (device, false); +device_resume_auto_connect (device); err =device_connect_le (device);if (err <0 )return btd_error_failed (msg,strerror (-err));
@@ -183,6 +184,10 @@ static DBusMessage *bearer_disconnect(DBusConnection *conn, DBusMessage *msg,return NULL ; } +/* Auto-connect is only done over LE */ +if (bearer->type !=BDADDR_BREDR ) +device_pause_auto_connect (device); +if (msg)queue_push_tail (bearer->disconnects,dbus_message_ref (msg));
Signature · 1 line
2.54.0 (Apple Git-157)
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Fri, 6 Nov 2026 17:56:47 -0800 you wrote:
org.bluez.Bearer.LE1.Disconnect is documented, like org.bluez.Device1.Disconnect, to disable incoming connections of a device that is not trusted until Connect is called again. Device1 does this by taking the device out of the auto-connect list, but the LE bearer does not: a paired HID device that is not trusted and keeps advertising is connected back right after Bearer.LE1.Disconnect.
[...]
Here is the summary with links:
- [BlueZ,1/2] device: Add functions to pause and resume auto-connect
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=00a473e0ada7 - [BlueZ,2/2] bearer: Fix LE Connect and Disconnect ignoring auto-connect https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=77afa9ee44ed
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html