VYPR
High severity8.6NVD Advisory· Published Oct 15, 2020· Updated Apr 15, 2026

CVE-2020-27153

CVE-2020-27153

Description

In BlueZ before 5.55, a double free was found in the gatttool disconnect_cb() routine from shared/att.c. A remote attacker could potentially cause a denial of service or code execution, during service discovery, due to a redundant disconnect MGMT event.

Affected products

5
  • cpe:2.3:a:bluez:bluez:*:*:*:*:*:*:*:*
    Range: <5.55
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*+ 1 more
    • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
    • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • OpenSUSE/Leap2 versions
    cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*+ 1 more
    • cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
    • cpe:2.3:o:opensuse:leap:15.2:*:*:*:*:*:*:*

Patches

2
5a180f2ec9ed

Release 5.55

https://github.com/bluez/bluezMarcel HoltmannSep 6, 2020via nvd-ref
2 files changed · +24 1
  • ChangeLog+23 0 modified
    @@ -1,3 +1,26 @@
    +ver 5.55:
    +	Fix issue with handling security level for HoG.
    +	Fix issue with handling HIDSDPDisable attribute.
    +	Fix issue with handling HID virtual cable unplug.
    +	Fix issue with handling HID channel disconnect order.
    +	Fix issue with handling AVDTP delay reporting states.
    +	Fix issue with handling AVRCP notification events.
    +	Fix issue with handling AVRCP list player attributes.
    +	Fix issue with handling AVRCP category 1 player settings.
    +	Fix issue with handling AVRCP media player passthrough bitmask.
    +	Fix issue with handling HFP 1.7 default features.
    +	Fix issue with handling GATT disconnecting handling.
    +	Fix issue with handling GATT database hash.
    +	Fix issue with handling service changed characteristic.
    +	Fix issue with handling read of multiple characteristic values.
    +	Fix issue with handling Just-Works auto-accept pairing.
    +	Fix issue with handling authentication of bonded devices.
    +	Fix issue with handling L2CAP streaming mode for AVDTP.
    +	Fix issue with handling SysEx parser for MIDI support.
    +	Fix issue with handling configured scan parameter values.
    +	Fix issue with handling temporary devices removal.
    +	Fix issue with handling advertising flags.
    +
     ver 5.54:
     	Fix issue with HOGP to accept data only from bonded devices.
     	Fix issue with A2DP sessions being connected at the same time.
    
  • configure.ac+1 1 modified
    @@ -1,5 +1,5 @@
     AC_PREREQ(2.60)
    -AC_INIT(bluez, 5.54)
    +AC_INIT(bluez, 5.55)
     
     AM_INIT_AUTOMAKE([foreign subdir-objects color-tests silent-rules
     					tar-pax no-dist-gzip dist-xz])
    
1cd644db8c23

shared/att: Fix possible crash on disconnect

https://github.com/bluez/bluezLuiz Augusto von DentzJul 16, 2020via nvd-ref
1 file changed · +40 6
  • src/shared/att.c+40 6 modified
    @@ -84,6 +84,7 @@ struct bt_att {
     	struct queue *req_queue;	/* Queued ATT protocol requests */
     	struct queue *ind_queue;	/* Queued ATT protocol indications */
     	struct queue *write_queue;	/* Queue of PDUs ready to send */
    +	bool in_disc;			/* Cleanup queues on disconnect_cb */
     
     	bt_att_timeout_func_t timeout_callback;
     	bt_att_destroy_func_t timeout_destroy;
    @@ -222,8 +223,10 @@ static void destroy_att_send_op(void *data)
     	free(op);
     }
     
    -static void cancel_att_send_op(struct att_send_op *op)
    +static void cancel_att_send_op(void *data)
     {
    +	struct att_send_op *op = data;
    +
     	if (op->destroy)
     		op->destroy(op->user_data);
     
    @@ -631,11 +634,6 @@ static bool disconnect_cb(struct io *io, void *user_data)
     	/* Dettach channel */
     	queue_remove(att->chans, chan);
     
    -	/* Notify request callbacks */
    -	queue_remove_all(att->req_queue, NULL, NULL, disc_att_send_op);
    -	queue_remove_all(att->ind_queue, NULL, NULL, disc_att_send_op);
    -	queue_remove_all(att->write_queue, NULL, NULL, disc_att_send_op);
    -
     	if (chan->pending_req) {
     		disc_att_send_op(chan->pending_req);
     		chan->pending_req = NULL;
    @@ -654,6 +652,15 @@ static bool disconnect_cb(struct io *io, void *user_data)
     
     	bt_att_ref(att);
     
    +	att->in_disc = true;
    +
    +	/* Notify request callbacks */
    +	queue_remove_all(att->req_queue, NULL, NULL, disc_att_send_op);
    +	queue_remove_all(att->ind_queue, NULL, NULL, disc_att_send_op);
    +	queue_remove_all(att->write_queue, NULL, NULL, disc_att_send_op);
    +
    +	att->in_disc = false;
    +
     	queue_foreach(att->disconn_list, disconn_handler, INT_TO_PTR(err));
     
     	bt_att_unregister_all(att);
    @@ -1574,6 +1581,30 @@ bool bt_att_chan_cancel(struct bt_att_chan *chan, unsigned int id)
     	return true;
     }
     
    +static bool bt_att_disc_cancel(struct bt_att *att, unsigned int id)
    +{
    +	struct att_send_op *op;
    +
    +	op = queue_find(att->req_queue, match_op_id, UINT_TO_PTR(id));
    +	if (op)
    +		goto done;
    +
    +	op = queue_find(att->ind_queue, match_op_id, UINT_TO_PTR(id));
    +	if (op)
    +		goto done;
    +
    +	op = queue_find(att->write_queue, match_op_id, UINT_TO_PTR(id));
    +
    +done:
    +	if (!op)
    +		return false;
    +
    +	/* Just cancel since disconnect_cb will be cleaning up */
    +	cancel_att_send_op(op);
    +
    +	return true;
    +}
    +
     bool bt_att_cancel(struct bt_att *att, unsigned int id)
     {
     	const struct queue_entry *entry;
    @@ -1591,6 +1622,9 @@ bool bt_att_cancel(struct bt_att *att, unsigned int id)
     			return true;
     	}
     
    +	if (att->in_disc)
    +		return bt_att_disc_cancel(att, id);
    +
     	op = queue_remove_if(att->req_queue, match_op_id, UINT_TO_PTR(id));
     	if (op)
     		goto done;
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.