If I short a stock and then the company goes bankrupt, what obligation do I have to fulfill to my broker? I can no longer buy the stock back because the stock (i.e. the company) no longer exists, so what can I do? By bankruptcy, I mean something like Lehmann brothers that does not exist any more.
When you take on a short position you have "borrowed" those shares to sell on the market. To counter that position you would buy back those shares but if the company you shorted is no longer listed then those shares would be significantly devalued. (In many cases this means that the shares no longer have any value at all.) This essentially means you do not own any obligations.
For some reasons you don't have to worry about buying to cover shares.
This is because when you short, you are borrowing from a stockholder and paying an interest rate to the stockholder. This interest rate is also based on the demand, if shares are hard to borrow yet there are people that want to short, then interest rates can be higher. When a company goes bankrupt, their shares aren't even worth charging an interest rate for. And you can borrow forever if you aren't paying dividends and interest, bankrupt companies are not paying dividends.
Basically, you don't have to give it back.
There generally is not a giant short squeeze in the pink sheets market of a bankrupt company.