OMG, am dying!!!

Someone used the bug GitHub refused to fix, that allows you to add a commit to a repo you don’t control... to upload YouTube-dl to the DMCA request repo on GitHub.

@rysiek I do not, there is a user on hellbird that did this referencing it. I have no knowledge of the reported vuln.

@rysiek @thegibson Has to do with how GH handles different forks of a repo. Seems they're just branches in the parent repo rather than their own intendant repo. (namespaced by username or something) Makes total sense.

The "bug" is that you can fork someone else's repo, push a commit to your fork, and view the commit on the parent repo, (or anyone else's fork of that repo for that matter) hence the commit hash in the URL. If you click on the commit, you'll see a note that the commit you're viewing isn't part of any branch in that repository.

@mr64bit @rysiek

Looks like they consider it more of a feature than a bug... oopsies!

@rysiek @mr64bit And they are obstinate about leaving it as a workflow element...

oh dear.

@bamfic @rysiek @thegibson Bet it already exists somewhere on github. Wouldn't be the strangest thing I've found on there either.
Take this for example.

@rysiek @mr64bit


@rysiek @thegibson I don't know, you should just be able to follow child commits until you find all the branch HEADs, then only display the page if the commit is part of one of the branches in that user's repo. Linking to files at a certain commit happens all the time on Github, and that's far more complex, cause it's got to walk the tree back to when the file was created, right?
@mr64bit @rysiek @thegibson I guess this is also why everyone's forks go away if you destroy your repo.

@rysiek Perhaps I misread your intent... but perhaps not. :)

@TheGibson How to checkout:
git clone
git fetch origin 416da574ec0df3388f652e44f7fe71b1e3a4701f
git checkout 416da574ec0df3388f652e44f7fe71b1e3a4701f

@thegibson which bug report was it they refused to fix that was used here?

It's a cute trick, but this is not a " bug that GitHub refuses to fix" -- it's how git forks work fundamentally. The alternative is to either deep-copy each repo on fork, or to calculate reachability on each direct object request. Both options extremely expensive.

@monsieuricon @thegibson Calculating reachability is one of the modes of git itself.

Having two different repos share an object store is a github decision.

@clacke a conscious decision is not a "bug, that GitHub refuses to fix" though. All public forks share objects. Private forks don't.


@monsieuricon @clacke

It is a security vulnerability. Whether or not they decide to fix it.

@thegibson how is it a security vulnerability? The object isn't part of the repo, it's just accessible through an unrelated repo via shared objects. It's confusing, but unless someone copy-pastes from the web interface, it's benign.


@monsieuricon @clacke

Because it creates a culture of weak authorization in ever project, and lets people do things like upload Youtube-dl to a repo that isn't theirs?

I mean ultimately we can record it as a feature if you want, but what if someone decided to just start pumping multiple TB of randomized data into a downstream project?

At the very least his reduces github's ability to meet compliance standards, and is a problem for them....

But as we can see right here, it can be very effectively, and practically abused.

I mean I see models of failure due to this lack of downstream control for the maintainer of the attacked repo.


but this hasn't "uploaded Youtube-dl to a repo that isn't theirs," though. If you clone the DMCA repo, you won't find these objects there, because they aren't part of it. This merely allows someone to view objects via arbitrary web paths. It's confusing -- and can be amusing (, but it's not really different than using debugfs to show arbitrary inode contents regardless of where you are in the actual FS tree.



I agree that it would be best if objects not belonging to that specific tree would return a 404, but until git learns to do this cheaply, this is not feasible for projects like github (or, for that matter) to do, as this would invite a way to do a very simple and efficient DoS via requesting a bunch of arbitrary object paths and forcing the server end to run a bunch of expensive reachability calculations.


@monsieuricon @thegibson It is intrinsic to the on-disk data structure, but not to the protocol. If anyone can do it, it's github.

I was assuming a long time ago that they didn't even use git repos on-disk, so I'm surprised to see abstractions leak like this.


Well, git protocol doesn't solve this either, it merely refuses to serve you a direct object request unless it's associated with a ref (tag/branch). You can allow requesting only reachable objects via uploadpack.allowReachableSHA1InWant, but even the manpage sternly warns you that it's expensive and doesn't quite solve the problem anyway (


@monsieuricon @thegibson What I'm saying is that this is an implementation detail of the default git implementation and not intrinsic to the protocol. The protocol is just "give me abrju262637ahg please".

@geert This is how we only need 18G for all of instead of 300G. :)

@monsieuricon @thegibson @notclacke I can put there whatever I want ;-)
If I would use a different name/email, could you find out who brought in the commit into

Sign in to participate in the conversation

A bunch of technomancers in the fediverse. Keep it fairly clean please. This arcology is for all who wash up upon it's digital shore.