mxk / burble

Blackrock User-Mode Bluetooth LE Library
Mozilla Public License 2.0
27 stars 2 forks source link

double locks in gatt/server #14

Open octopus-kkk opened 2 months ago

octopus-kkk commented 2 months ago

In the gatt/server.rs file, there are potential double-lock issues that can occur in the following scenarios:

(1) A double-lock bug can happen in ServerCtx::execute_write() and ServerCtx::cccd_write() The first lock is at L853, the second at L530. Call Chain: execute_write()->do_write()->cccd_write()

(2) A double-lock bug can happen in ServerCtx::execute_write() and ServerCtx::csf_write() The first lock is at L853, the second at L511. Call Chain: execute_write()->do_write()->csf_write()