Skip to content

bash.exe、mintty.exe hung, hacking way cause app hung in msys-2.0.dll #324

@cssxn

Description

@cssxn

msys-2.0.dll which from cygwin project that using a hacking way to find the current dir path.

see,

const uint8_t *rcall = (const uint8_t *) memchr (get_dir, 0xe8, 80);

the app hung when RtlGetCurrentDirectory_U is already hooked by other dll, and the opcode operator has an 0xE8,

that make this func find_fast_cwd_pointer get wrong lock pointer from PEB.

after that. when access the wrong pointer cause app hung or acccess violation.

this bug was fixed since April 2025 in cygwin project, see below

https://github.com/cygwin/cygwin/blob/b41e3b652c4215556a62a2f47e8f8f11553fa550/winsup/cygwin/x86_64/fastcwd.cc#L40

Image

It would be greate to merge this fix;

this effect a lot of sofware which dependence on msys-2.0.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions