{sarcasm}It's amazing how many people have suddenly become experts on customary international law on armed conflict at sea after IRIS DENA was sunk.{/sarcasm}

You can read the linked article if you want to know the actual rules. See also the bit I've screenshotted.

https://www.bbc.com/news/articles/c4geelnw7w3o

My time in the US Navy was a long time back, but they were pretty blunt with us: in case of hostilities, enemy submarines were under no obligation to rescue us, and if we survived a sinking and didn't make a life raft, you'd better be able to keep afloat. We did a lot of training to cover this.`

Particularly annoying to me is seeing people talk about Laconia. They're often not actually right about the Nuremberg decision (see link for that), and they're skipping over the reality that interwar international law on this was a dead letter *before* the Laconia order because the Allies ignored it. Nimitz actually submitted an affidavit in Doenitz' defense, and he wasn't the only US submariner to do so.

https://avalon.law.yale.edu/imt/juddoeni.asp

The Avalon Project : Judgment : Doenitz

Now, if the IRIS DENA had been sunk in Indian or Sri Lankan waters, there would be some other issues in play, since both India and Sri Lanka are neutral powers, but the sinking happened in international waters.