Backport fsck tests for CVE-2018-11235, arbitrary code execution via submodule names

Apply the changes v2.17.0..v2.17.1 from upstream.

This provides defense in depth by adding a second check for anyone who
has transfer.fsckobjects enabled.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
13 files changed
tree: e8a6bb8d869b93a3391e10717ab40b23f8ec676d
  1. block-sha1/
  2. builtin/
  3. ci/
  4. compat/
  5. contrib/
  6. debian/
  7. Documentation/
  8. ewah/
  9. git-gui/
  10. gitk-git/
  11. gitweb/
  12. mergetools/
  13. perl/
  14. po/
  15. ppc/
  16. refs/
  17. t/
  18. templates/
  19. vcs-svn/
  20. xdiff/
  21. .gitattributes
  22. .gitignore
  23. .mailmap
  24. .travis.yml
  25. abspath.c
  26. aclocal.m4
  27. advice.c
  28. advice.h
  29. alias.c
  30. alloc.c
  31. apply.c
  32. apply.h
  33. archive-tar.c
  34. archive-zip.c
  35. archive.c
  36. archive.h
  37. argv-array.c
  38. argv-array.h
  39. attr.c
  40. attr.h
  41. base85.c
  42. bisect.c
  43. bisect.h
  44. blob.c
  45. blob.h
  46. branch.c
  47. branch.h
  48. builtin.h
  49. bulk-checkin.c
  50. bulk-checkin.h
  51. bundle.c
  52. bundle.h
  53. cache-tree.c
  54. cache-tree.h
  55. cache.h
  56. check-builtins.sh
  57. check-racy.c
  58. check_bindir
  59. color.c
  60. color.h
  61. column.c
  62. column.h
  63. combine-diff.c
  64. command-list.txt
  65. commit-slab.h
  66. commit.c
  67. commit.h
  68. common-main.c
  69. config.c
  70. config.mak.in
  71. config.mak.uname
  72. configure.ac
  73. connect.c
  74. connect.h
  75. connected.c
  76. connected.h
  77. convert.c
  78. convert.h
  79. copy.c
  80. COPYING
  81. credential-cache--daemon.c
  82. credential-cache.c
  83. credential-store.c
  84. credential.c
  85. credential.h
  86. csum-file.c
  87. csum-file.h
  88. ctype.c
  89. daemon.c
  90. date.c
  91. decorate.c
  92. decorate.h
  93. delta.h
  94. diff-delta.c
  95. diff-lib.c
  96. diff-no-index.c
  97. diff.c
  98. diff.h
  99. diffcore-break.c
  100. diffcore-delta.c
  101. diffcore-order.c
  102. diffcore-pickaxe.c
  103. diffcore-rename.c
  104. diffcore.h
  105. dir-iterator.c
  106. dir-iterator.h
  107. dir.c
  108. dir.h
  109. editor.c
  110. entry.c
  111. environment.c
  112. exec_cmd.c
  113. exec_cmd.h
  114. fast-import.c
  115. fetch-pack.c
  116. fetch-pack.h
  117. fmt-merge-msg.h
  118. fsck.c
  119. fsck.h
  120. generate-cmdlist.sh
  121. gettext.c
  122. gettext.h
  123. git-add--interactive.perl
  124. git-archimport.perl
  125. git-bisect.sh
  126. git-compat-util.h
  127. git-cvsexportcommit.perl
  128. git-cvsimport.perl
  129. git-cvsserver.perl
  130. git-difftool--helper.sh
  131. git-difftool.perl
  132. git-filter-branch.sh
  133. git-instaweb.sh
  134. git-merge-octopus.sh
  135. git-merge-one-file.sh
  136. git-merge-resolve.sh
  137. git-mergetool--lib.sh
  138. git-mergetool.sh
  139. git-p4.py
  140. git-parse-remote.sh
  141. git-quiltimport.sh
  142. git-rebase--am.sh
  143. git-rebase--interactive.sh
  144. git-rebase--merge.sh
  145. git-rebase.sh
  146. git-relink.perl
  147. git-remote-testgit.sh
  148. git-request-pull.sh
  149. git-send-email.perl
  150. git-sh-i18n.sh
  151. git-sh-setup.sh
  152. git-stash.sh
  153. git-submodule.sh
  154. git-svn.perl
  155. GIT-VERSION-GEN
  156. git-web--browse.sh
  157. git.c
  158. git.rc
  159. gpg-interface.c
  160. gpg-interface.h
  161. graph.c
  162. graph.h
  163. grep.c
  164. grep.h
  165. hashmap.c
  166. hashmap.h
  167. help.c
  168. help.h
  169. hex.c
  170. http-backend.c
  171. http-fetch.c
  172. http-push.c
  173. http-walker.c
  174. http.c
  175. http.h
  176. ident.c
  177. imap-send.c
  178. INSTALL
  179. iterator.h
  180. khash.h
  181. kwset.c
  182. kwset.h
  183. levenshtein.c
  184. levenshtein.h
  185. LGPL-2.1
  186. line-log.c
  187. line-log.h
  188. line-range.c
  189. line-range.h
  190. list-objects.c
  191. list-objects.h
  192. list.h
  193. ll-merge.c
  194. ll-merge.h
  195. lockfile.c
  196. lockfile.h
  197. log-tree.c
  198. log-tree.h
  199. mailinfo.c
  200. mailinfo.h
  201. mailmap.c
  202. mailmap.h
  203. Makefile
  204. match-trees.c
  205. merge-blobs.c
  206. merge-blobs.h
  207. merge-recursive.c
  208. merge-recursive.h
  209. merge.c
  210. mergesort.c
  211. mergesort.h
  212. mru.c
  213. mru.h
  214. name-hash.c
  215. notes-cache.c
  216. notes-cache.h
  217. notes-merge.c
  218. notes-merge.h
  219. notes-utils.c
  220. notes-utils.h
  221. notes.c
  222. notes.h
  223. object.c
  224. object.h
  225. pack-bitmap-write.c
  226. pack-bitmap.c
  227. pack-bitmap.h
  228. pack-check.c
  229. pack-objects.c
  230. pack-objects.h
  231. pack-revindex.c
  232. pack-revindex.h
  233. pack-write.c
  234. pack.h
  235. pager.c
  236. parse-options-cb.c
  237. parse-options.c
  238. parse-options.h
  239. patch-delta.c
  240. patch-ids.c
  241. patch-ids.h
  242. path.c
  243. pathspec.c
  244. pathspec.h
  245. pkt-line.c
  246. pkt-line.h
  247. preload-index.c
  248. pretty.c
  249. prio-queue.c
  250. prio-queue.h
  251. progress.c
  252. progress.h
  253. prompt.c
  254. prompt.h
  255. quote.c
  256. quote.h
  257. reachable.c
  258. reachable.h
  259. read-cache.c
  260. README.md
  261. ref-filter.c
  262. ref-filter.h
  263. reflog-walk.c
  264. reflog-walk.h
  265. refs.c
  266. refs.h
  267. remote-curl.c
  268. remote-testsvn.c
  269. remote.c
  270. remote.h
  271. replace_object.c
  272. rerere.c
  273. rerere.h
  274. resolve-undo.c
  275. resolve-undo.h
  276. revision.c
  277. revision.h
  278. run-command.c
  279. run-command.h
  280. send-pack.c
  281. send-pack.h
  282. sequencer.c
  283. sequencer.h
  284. server-info.c
  285. setup.c
  286. sh-i18n--envsubst.c
  287. sha1-array.c
  288. sha1-array.h
  289. sha1-lookup.c
  290. sha1-lookup.h
  291. sha1_file.c
  292. sha1_name.c
  293. shallow.c
  294. shell.c
  295. shortlog.h
  296. show-index.c
  297. sideband.c
  298. sideband.h
  299. sigchain.c
  300. sigchain.h
  301. split-index.c
  302. split-index.h
  303. strbuf.c
  304. strbuf.h
  305. streaming.c
  306. streaming.h
  307. string-list.c
  308. string-list.h
  309. submodule-config.c
  310. submodule-config.h
  311. submodule.c
  312. submodule.h
  313. symlinks.c
  314. tag.c
  315. tag.h
  316. tar.h
  317. tempfile.c
  318. tempfile.h
  319. thread-utils.c
  320. thread-utils.h
  321. tmp-objdir.c
  322. tmp-objdir.h
  323. trace.c
  324. trace.h
  325. trailer.c
  326. trailer.h
  327. transport-helper.c
  328. transport.c
  329. transport.h
  330. tree-diff.c
  331. tree-walk.c
  332. tree-walk.h
  333. tree.c
  334. tree.h
  335. unicode_width.h
  336. unimplemented.sh
  337. unix-socket.c
  338. unix-socket.h
  339. unpack-trees.c
  340. unpack-trees.h
  341. update_unicode.sh
  342. upload-pack.c
  343. url.c
  344. url.h
  345. urlmatch.c
  346. urlmatch.h
  347. usage.c
  348. userdiff.c
  349. userdiff.h
  350. utf8.c
  351. utf8.h
  352. varint.c
  353. varint.h
  354. version.c
  355. version.h
  356. versioncmp.c
  357. walker.c
  358. walker.h
  359. wildmatch.c
  360. wildmatch.h
  361. worktree.c
  362. worktree.h
  363. wrap-for-bin.sh
  364. wrapper.c
  365. write_or_die.c
  366. ws.c
  367. wt-status.c
  368. wt-status.h
  369. xdiff-interface.c
  370. xdiff-interface.h
  371. zlib.c
README.md

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from http://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just “subscribe git” in the body to majordomo@vger.kernel.org. The mailing list archives are available at http://news.gmane.org/gmane.comp.version-control.git/, http://marc.info/?l=git and other archival sites.

The maintainer frequently sends the “What's cooking” reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name “git” was given by Linus Torvalds when he wrote the very first version. He described the tool as “the stupid content tracker” and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of “get” may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • “global information tracker”: you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • “goddamn idiotic truckload of sh*t”: when it breaks