Skip to content

net: eswifi socket send payload length not bounded

High
ceolin published GHSA-qx3g-5g22-fq5w Mar 27, 2026

Package

zephyr (zephyr)

Affected versions

<= 4.3

Patched versions

None

Description

Summary

The eswifi socket offload driver copies user-provided payloads into a fixed buffer without checking available space; oversized sends overflow eswifi->buf, corrupting kernel memory (CWE-120). Exploit requires local code that can call the socket send API; no remote attacker can reach it directly.

Details

  • In eswifi_socket_send, the driver builds a header with snprintk(eswifi->buf, sizeof(eswifi->buf), "S3=%u\r", len); then sets offset = strlen(eswifi->buf); and does memcpy(&eswifi->buf[offset], buf, len); with no bounds check (drivers/wifi/eswifi/eswifi_socket_offload.c:288-295).
  • eswifi->buf is bounded by CONFIG_WIFI_ESWIFI_MAX_DATA_SIZE (drivers/wifi/eswifi/eswifi.h:72). Any payload larger than the remaining space (sizeof(buf) - header) will write past the end before calling eswifi_request.
  • Attack surface is any Zephyr application code that can invoke the socket offload send path; the vulnerability does not provide remote network entry—it is triggered locally by supplying an oversized buffer to the driver.

PoC

eswifi-socket-send-buffer-overflow-poc.tar.gz

  1. Build and run the ASAN harness that pulls in the unmodified driver and issues an oversized send:
cd eswifi-socket-send-buffer-overflow-poc
make clean && make run
  1. ASAN reports a buffer overflow in eswifi_socket_send when copying the large payload into eswifi->buf, demonstrating the real vulnerable code path.

Impact

Type: buffer overflow in driver staging buffer (CWE-120).
Who is impacted: Zephyr builds using the eswifi socket offload driver; any local code able to call the send API can corrupt kernel memory, leading to DoS or potential code execution.

Acknowledgments

Patches

main: #102119

For more information

If you have any questions or comments about this advisory:

embargo: 2026-03-09

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
Local
Attack complexity
Low
Privileges required
Low
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:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H

CVE ID

CVE-2026-1679

Weaknesses

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. Learn more on MITRE.

Credits