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
8.3
/ 10

CVSS base metrics

Attack vector
Adjacent
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
High
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