Debian DLA-1414-1 : mercurial security update
Critical Nessus Plugin ID 110927
SynopsisThe remote Debian host is missing a security update.
DescriptionSome security vulnerabilities were found in Mercurial which allow authenticated users to trigger arbitrary code execution and unauthorized data access in certain server configuration. Malformed patches and repositories can also lead to crashes and arbitrary code execution on clients.
In Mercurial before 4.1.3, 'hg serve --stdio' allows remote authenticated users to launch the Python debugger, and consequently execute arbitrary code, by using --debugger as a repository name.
In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository.
Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.
Mercurial version 4.5 and earlier contains a Incorrect Access Control (CWE-285) vulnerability in Protocol server that can result in Unauthorized data access. This attack appear to be exploitable via network connectivity. This vulnerability appears to have been fixed in 4.5.1.
mpatch: be more careful about parsing binary patch data
mpatch: protect against underflow in mpatch_apply
mpatch: ensure fragment start isn't past the end of orig
For Debian 8 'Jessie', these problems have been fixed in version 3.1.2-2+deb8u5.
We recommend that you upgrade your mercurial packages.
NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
SolutionUpgrade the affected mercurial, and mercurial-common packages.