CVE-2026-64127

Source
https://cve.org/CVERecord?id=CVE-2026-64127
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64127.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64127
Downstream
Published
2026-07-19T15:40:23.960Z
Modified
2026-07-21T03:47:57.625673155Z
Summary
Bluetooth: L2CAP: ecred_reconfigure: send packed pdu, not stack pointer
Details

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: L2CAP: ecred_reconfigure: send packed pdu, not stack pointer

Commit 1c08108f3014 ("Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings") converted the on-stack request PDU in l2capecredreconfigure() from an explicit packed struct to DEFINERAWFLEX(), but did not adjust the size and source-pointer arguments to l2capsendcmd():

  • struct {
  • struct l2capecredreconf_req req;
  • __le16 scid;
  • } pdu;
  • DEFINERAWFLEX(struct l2capecredreconfreq, pdu, scid, 1); ... l2capsendcmd(conn, chan->ident, L2CAPECREDRECONFREQ, sizeof(pdu), &pdu);

After the conversion, DEFINERAWFLEX() expands to declare an anonymous union pdu_u plus a local pointer "pdu" pointing at it. Therefore:

  • sizeof(pdu) is now sizeof(struct l2capecredreconf_req *) = 8 on 64-bit (4 on 32-bit), not the 6 bytes of (mtu, mps, scid[1]).
  • &pdu is the address of the local pointer's stack storage, not the address of the request payload.

l2capsendcmd() forwards (data, count) to l2capbuildcmd(), which calls skbputdata(skb, data, count). The L2CAPECREDRECONFIGUREREQ packet body therefore contains 8 bytes copied from the kernel stack starting at &pdu -- the 8 bytes overlap the pdu pointer's value, leaking a kernel stack address to the paired Bluetooth peer. The intended (mtu, mps, scid) fields are not transmitted at all, so the peer rejects the request as malformed and the L2CAPECRED_RECONFIGURE feature itself has been broken for the local-side initiator since the introducing commit landed.

The sibling site l2capecredconn_req() in the same commit was converted correctly (sizeof(*pdu) + len, pdu); only this site was missed.

Restore the original semantics: pass the full flex-struct size via struct_size(pdu, scid, 1) and the pdu pointer (the struct address) as the source.

Validated on a stock 7.0-based host kernel via the real call path: setsockopt(SOLBLUETOOTH, BTRCVMTU, ...) on a BTCONNECTED L2CAPMODEEXTFLOWCTL socket emits an L2CAPECREDRECONFIGURE_REQ whose body is 8 bytes (the on-stack pdu local's value) rather than the expected 6. Three captures from fresh socket / fresh hciemu peer on the same host -- low bytes vary per call, high 0xffff confirms a kernel virtual address (KASLR-randomised stack slot, not a fixed string):

RECONFREQ body (ident=0x02 len=8): 42 fb 54 af 0e ca ff ff RECONFREQ body (ident=0x02 len=8): 52 3d 2e af 0e ca ff ff RECONF_REQ body (ident=0x02 len=8): b2 fc 5b af 0e ca ff ff

After this patch the body is 6 bytes carrying the expected little-endian (mtu, mps, scid).

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64127.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1c08108f3014881ad5f4c35a2abaf9c65475035d
Fixed
ed5fcd2a26f0c16fc289c8cd6b03328a0582a687
Fixed
051922ab709c0a6917eae765c22481dfc68379e5
Fixed
356c9d1a1cbacd2a1640fff3c050e1c3472e924f
Fixed
3374ef8cf99368a40f7efd51a2a375a4c5dc6f0d

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64127.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.12.92
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.34
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.11

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64127.json"