Skip to content

L2CAP: Possible Stack based buffer overflow in le_ecred_reconf_req()

High
ceolin published GHSA-wr8r-7f8x-24jj Nov 21, 2023

Package

zephyr (west)

Affected versions

<= 3.4

Patched versions

None

Description

Summary

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req.

Details

image

If buf->len is bigger than sizeof(chans) / sizeof(scid) times sizeof(scid), then chan_count can become bigger than L2CAP_ECRED_CHAN_MAX_PER_REQ (which is 5).

image

It can lead to Out-Of-Bounds write on line 1385 (https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/bluetooth/host/l2cap.c#L1385).

image
Also, below, on line 1399 and 1400, there is a write to chan.tx. mtu and msp come from request.

image

Patches

main (v3.5 development cycle) #62381

For more information

If you have any questions or comments about this advisory:

Open an issue in zephyr
Email us at Zephyr-vulnerabilities
embargo: 2023-11-01

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H

CVE ID

CVE-2023-5055

Weaknesses

Credits