Title: Lack of validation of objects in packfile when fetching · Issue #4366 · libgit2/libgit2 · GitHub
Open Graph Title: Lack of validation of objects in packfile when fetching · Issue #4366 · libgit2/libgit2
X Title: Lack of validation of objects in packfile when fetching · Issue #4366 · libgit2/libgit2
Description: LibGit2 (unlike CLI git) does not seem to validate the contents of the packfile when fetching. This could be a problem when fetching from a possibly compromised source, e.g. create a "bad" repository using this script. Attempting to clon...
Open Graph Description: LibGit2 (unlike CLI git) does not seem to validate the contents of the packfile when fetching. This could be a problem when fetching from a possibly compromised source, e.g. create a "bad" reposito...
X Description: LibGit2 (unlike CLI git) does not seem to validate the contents of the packfile when fetching. This could be a problem when fetching from a possibly compromised source, e.g. create a "bad"...
Opengraph URL: https://github.com/libgit2/libgit2/issues/4366
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lack of validation of objects in packfile when fetching","articleBody":"LibGit2 (unlike CLI git) does not seem to validate the contents of the packfile when fetching. \r\n\r\nThis could be a problem when fetching from a possibly compromised source, e.g. create a \"bad\" repository using [this script](https://gist.github.com/simonbyrne/e8923aec3b27b285789efcd616114a95).\r\n\r\nAttempting to clone this using CLI git throws an error:\r\n```\r\nfatal: did not receive expected object 12799ccbe7ce445b11b7bd4833bcc2c2ce1b48b7\r\nfatal: index-pack failed\r\n```\r\nHowever LibGit2 happily fetches the repository. \r\n\r\nWhile LibGit2 will throw an error if you attempt to use the invalid object, CLI git may not (e.g. it will certainly happily checkout invalid loose objects, though maybe not packed files)\r\n\r\nEssentially, the problem is that the \"security barrier\" is in different places for the different programs, so attempting to use both on the same repository may present potential security hole.\r\n","author":{"url":"https://github.com/simonbyrne","@type":"Person","name":"simonbyrne"},"datePublished":"2017-10-04T20:57:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4366/libgit2/issues/4366"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a8480264-0486-9cce-42df-b6f010cfe63c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADE0:1B9505:8459C75:B1F8290:6A5E3B02 |
| html-safe-nonce | ea6541995db2d782f16e690a6269f201c4e84f16ca20541f6fba159d9f9512f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREUwOjFCOTUwNTo4NDU5Qzc1OkIxRjgyOTA6NkE1RTNCMDIiLCJ2aXNpdG9yX2lkIjoiODcxNDEwOTYzNTk3OTUyNDg2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f48322db326fc4a98cb9b33dc9abb347f30ee5dddcfe868922817ec6954a78a3 |
| hovercard-subject-tag | issue:262928191 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2/4366/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a5c411a8eb37e778078cef3abc28d5c006c5af43f5eff5a7b0a1f491926c0f19/libgit2/libgit2/issues/4366 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a5c411a8eb37e778078cef3abc28d5c006c5af43f5eff5a7b0a1f491926c0f19/libgit2/libgit2/issues/4366 |
| og:image:alt | LibGit2 (unlike CLI git) does not seem to validate the contents of the packfile when fetching. This could be a problem when fetching from a possibly compromised source, e.g. create a "bad" reposito... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | simonbyrne |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4b946991e2bd4b122ac7bb3d405be22af15feed82daaafcd1fe0a1231d54061 |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 901662 |
| octolytics-dimension-repository_nwo | libgit2/libgit2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 901662 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a421a3a9fbeebe1ed5ba7c8e5b803b098d65a30e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width