![]() `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. Git is an open source, scalable, distributed revision control system. If you expose git archive via `git daemon`, disable it by running `git config -global daemon.uploadArch false`. Users who are unable to upgrade should disable `git archive` in untrusted repositories. The problem has been patched in the versions published on, going back to v2.30.7. This integer overflow can result in arbitrary heap writes, which may result in arbitrary code execution. It may also be triggered indirectly through git archive via the export-subst mechanism, which expands format specifiers inside of files within the repository during a git archive. 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. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule.
0 Comments
Leave a Reply. |