The Messenger of Allah ﷺ said, "Whatever the sea casts out or what is left behind when it ebbs, you may eat. But whatever dies in it and floats on its surface, do not eat."
حدثنا أحمد بن عبدة حدثنا يحيى بن سليم الطائفي حدثنا إسمعيل بن أمية عن أبي الزبير
قال رسول الله ﷺ ما ألقى البحر أو جزر عنه فكلوه وما مات فيه وطفا فلا تأكلوه
Its isnad is daif. Ibn Majah reported it in the Book of Hunting, Chapter on Fish Found Dead Floating on the Water, hadith no. 3247, from Ahmad bin Abdah, with this chain. Abu Zubayr is a mudallis, and he narrated it with "an" (without stating a direct hearing).