We were with the Messenger of Allah ﷺ on a Hajj or Amra when a swarm of locusts came toward us, and we began striking them with our whips and sticks, killing them. Then we felt regret and said, "What have we done while we are in a state of ihram?" So we asked the Prophet ﷺ, and he said, "There is no harm in it, for it is game of the sea."
حدثنا عفان قال حدثنا حماد بن سلمة قال أخبرنا أبو المهزم
كنا مع رسول الله ﷺ في حج أو عمرة فاستقبلتنا رجل من جراد فجعلنا نضربهن بسياطنا وعصينا نقتلهن فسقط في أيدينا فقلنا ما صنعنا ونحن محرمون فسألنا النبي ﷺ فقال لا بأس صيد البحر
Its isnad is daif, because of Abu Muhazzim.It was narrated by Abu Dawud, 2/171, no. 1853, in the Book of Rites of Pilgrimage, on locusts for one in the state of ihram during Hajj, and by Tirmidhi, 3/198, no. 850, in the Book of Hajj, on hunting sea game while in the state of ihram, where he said it is a gharib hadith narrated from Abu Muhazzim, Yazid bin Sufyan, and Shubah has criticized him. It was also narrated by Ibn Majah, 2/1074, no. 3222.The wording itself is sahih, and the Noble Quran bears witness to it, "and hunting on land is forbidden to you while you are in the state of ihram" [Maidah 5:96].