]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'js/fix-open-exec'
authorJohannes Sixt <j6t@kdbg.org>
Tue, 8 Jul 2025 19:00:34 +0000 (21:00 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 8 Jul 2025 19:00:34 +0000 (21:00 +0200)
commitb7ef4071c42f6ff20e696b0197a40f60da6ce70c
tree2af3ccc1aef8f9477ae9141f42effcaa7fa9a836
parent0c8be6f09043e152493e369be8469d645098469f
parent67a128b91e25978a15f9f7e194d81b441d603652
Merge branch 'js/fix-open-exec'

This addresses CVE-2025-27613, Gitk can create and truncate a user's
files:

When a user clones an untrusted repository and runs gitk without
additional command arguments, files for which the user has write
permission can be created and truncated. The option "Support per-file
encoding" must have been enabled before in Gitk's Preferences.  This
option is disabled by default.

The same happens when "Show origin of this line" is used in the main
window (regardless of whether "Support per-file encoding" is enabled or
not).

* js/fix-open-exec:
  gitk: sanitize 'open' arguments: revisit recently updated 'open' calls
  gitk: sanitize 'open' arguments: command pipeline
  gitk: collect construction of blameargs into a single conditional
  gitk: sanitize 'open' arguments: simple commands, readable and writable
  gitk: sanitize 'open' arguments: simple commands with redirections
  gitk: sanitize 'open' arguments: simple commands
  gitk: sanitize 'exec' arguments: redirect to process
  gitk: sanitize 'exec' arguments: redirections and background
  gitk: sanitize 'exec' arguments: redirections
  gitk: sanitize 'exec' arguments: 'eval exec'
  gitk: sanitize 'exec' arguments: simple cases
  gitk: have callers of diffcmd supply pipe symbol when necessary
  gitk: treat file names beginning with "|" as relative paths

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
gitk