I'm guessing the sub's fault.
unless the freighter was aware the sub was there (interesting question, given the multiple japanese ship/american sub incidents), it was certainly up to the sub to avoid colliding (?).
Makes me wonder if there is any practical reason for a sub to be THAT close to a freighter, i.e. detection issues.