<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git, branch v2.34.4</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.34.4</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.34.4'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2022-06-23T10:35:49Z</updated>
<entry>
<title>Git 2.34.4</title>
<updated>2022-06-23T10:35:49Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f2eed22852b0a21556f0c9f56732913eba553e62'/>
<id>urn:sha1:f2eed22852b0a21556f0c9f56732913eba553e62</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.33.4</title>
<updated>2022-06-23T10:35:47Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=378eaded1aec073a815b8687e67a2e2eadd3228c'/>
<id>urn:sha1:378eaded1aec073a815b8687e67a2e2eadd3228c</id>
<content type='text'>
* maint-2.33:
  Git 2.33.4
  Git 2.32.3
  Git 2.31.4
  Git 2.30.5
  setup: tighten ownership checks post CVE-2022-24765
  git-compat-util: allow root to access both SUDO_UID and root owned
  t0034: add negative tests and allow git init to mostly work under sudo
  git-compat-util: avoid failing dir ownership checks if running privileged
  t: regression git needs safe.directory when using sudo
</content>
</entry>
<entry>
<title>Git 2.33.4</title>
<updated>2022-06-23T10:35:41Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=80c525c4acaf6072697d4bd2a3a5137f91665b55'/>
<id>urn:sha1:80c525c4acaf6072697d4bd2a3a5137f91665b55</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.32.3</title>
<updated>2022-06-23T10:35:38Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=eebfde3f213e2990727a64da0d7d04ad961a28b0'/>
<id>urn:sha1:eebfde3f213e2990727a64da0d7d04ad961a28b0</id>
<content type='text'>
* maint-2.32:
  Git 2.32.3
  Git 2.31.4
  Git 2.30.5
  setup: tighten ownership checks post CVE-2022-24765
  git-compat-util: allow root to access both SUDO_UID and root owned
  t0034: add negative tests and allow git init to mostly work under sudo
  git-compat-util: avoid failing dir ownership checks if running privileged
  t: regression git needs safe.directory when using sudo
</content>
</entry>
<entry>
<title>Git 2.32.3</title>
<updated>2022-06-23T10:35:32Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=656d9a24f624039831bc2e865f4cc42f393caf70'/>
<id>urn:sha1:656d9a24f624039831bc2e865f4cc42f393caf70</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.31.4</title>
<updated>2022-06-23T10:35:30Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=fc0c773028685cdbae35c6c71f3fd3b87ab70985'/>
<id>urn:sha1:fc0c773028685cdbae35c6c71f3fd3b87ab70985</id>
<content type='text'>
* maint-2.31:
  Git 2.31.4
  Git 2.30.5
  setup: tighten ownership checks post CVE-2022-24765
  git-compat-util: allow root to access both SUDO_UID and root owned
  t0034: add negative tests and allow git init to mostly work under sudo
  git-compat-util: avoid failing dir ownership checks if running privileged
  t: regression git needs safe.directory when using sudo
</content>
</entry>
<entry>
<title>Git 2.31.4</title>
<updated>2022-06-23T10:35:25Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5b1c746c352e85211770e5cbd26a433b3affd3b4'/>
<id>urn:sha1:5b1c746c352e85211770e5cbd26a433b3affd3b4</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.30.5</title>
<updated>2022-06-23T10:35:23Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-23T10:35:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2f8809f9a1838eb607f14097dcd63071f2eb00fe'/>
<id>urn:sha1:2f8809f9a1838eb607f14097dcd63071f2eb00fe</id>
<content type='text'>
* maint-2.30:
  Git 2.30.5
  setup: tighten ownership checks post CVE-2022-24765
  git-compat-util: allow root to access both SUDO_UID and root owned
  t0034: add negative tests and allow git init to mostly work under sudo
  git-compat-util: avoid failing dir ownership checks if running privileged
  t: regression git needs safe.directory when using sudo
</content>
</entry>
<entry>
<title>Git 2.30.5</title>
<updated>2022-06-23T10:31:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-27T21:38:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=88b7be68a4bf9f39b84ed438d8d776c0d752b316'/>
<id>urn:sha1:88b7be68a4bf9f39b84ed438d8d776c0d752b316</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>setup: tighten ownership checks post CVE-2022-24765</title>
<updated>2022-06-23T10:31:05Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2022-05-10T19:35:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=3b0bf2704980b1ed6018622bdf5377ec22289688'/>
<id>urn:sha1:3b0bf2704980b1ed6018622bdf5377ec22289688</id>
<content type='text'>
8959555cee7 (setup_git_directory(): add an owner check for the top-level
directory, 2022-03-02), adds a function to check for ownership of
repositories using a directory that is representative of it, and ways to
add exempt a specific repository from said check if needed, but that
check didn't account for owership of the gitdir, or (when used) the
gitfile that points to that gitdir.

An attacker could create a git repository in a directory that they can
write into but that is owned by the victim to work around the fix that
was introduced with CVE-2022-24765 to potentially run code as the
victim.

An example that could result in privilege escalation to root in *NIX would
be to set a repository in a shared tmp directory by doing (for example):

  $ git -C /tmp init

To avoid that, extend the ensure_valid_ownership function to be able to
check for all three paths.

This will have the side effect of tripling the number of stat() calls
when a repository is detected, but the effect is expected to be likely
minimal, as it is done only once during the directory walk in which Git
looks for a repository.

Additionally make sure to resolve the gitfile (if one was used) to find
the relevant gitdir for checking.

While at it change the message printed on failure so it is clear we are
referring to the repository by its worktree (or gitdir if it is bare) and
not to a specific directory.

Helped-by: Junio C Hamano &lt;junio@pobox.com&gt;
Helped-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
</content>
</entry>
</feed>
