This overflow can be triggered directly by a user running a command which invokes the commit formatting machinery (e.g., `git log -format=.`). When processing the padding operators, there is a integer overflow in `pretty.c::format_and_pad_commit()` where a `size_t` is stored improperly as an `int`, and then added as an offset to a `memcpy()`. This functionality is also exposed to `git archive` via the `export-subst` gitattribute. `git log` can display commits in an arbitrary format using its `-format` specifiers. Git is distributed revision control system. Before doing so, inspect each new `.gitmodules` file to ensure that it does not contain suspicious module URLs. Instead, consider cloning repositories without recursively cloning their submodules, and instead run `git submodule update` at each layer. Avoid cloning repositories from untrusted sources with `-recurse-submodules`. ![]() If upgrading is impractical, two short-term workarounds are available. ![]() ![]() These two may be combined to include arbitrary files based on known paths on the victim's filesystem within the malicious repository's working copy, allowing for data exfiltration in a similar manner as CVE-2022-39253. Though Git will abort local clones whose source `$GIT_DIR/objects` directory contains symbolic links, the `objects` directory itself may still be a symbolic link.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |