Content-Length: 311217 | pFad | https://github.com/python/cpython/issues/98793

ad asyncio: Possible missing typecheck in overlapped.c · Issue #98793 · python/cpython · GitHub
Skip to content

asyncio: Possible missing typecheck in overlapped.c #98793

Description

@JelleZijlstra

I don't have a Windows machine to check, but I noticed while reading code that the _overlapped.WSAConnect() function calls PyTuple_GET_SIZE on its argument without checking that it is actually a tuple (

switch (PyTuple_GET_SIZE(obj)) {
).

The following code should reproduce the problem and access out-of-bounds memory:

import asyncio.windows_events
import socket
ip = asyncio.windows_events.IocpProactor()
sock = socket.socket(type=socket.SOCK_DGRAM)
ip.connect(sock, None)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/98793

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy