Skip to content

esp8266: bug in esp8266/modnetwork.c when connecting without password #3061

@Jostikas

Description

@Jostikas

In esp8266/modnetwork.c in function esp_connect isn't there a leak when an unsecure network is joined?

 if (n_args > 1) {
    p = mp_obj_str_get_data(args[1], &len);  # len gets a presumably nonzero value
    memcpy(config.ssid, p, len);
    if (n_args > 2) {
        p = mp_obj_str_get_data(args[2], &len);
    } else {
        p = "";   # len still has length of ssid
    }
    memcpy(config.password, p, len); # Doesn't this copy more than the empty string when unsecured network is joined?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy