Canon hoods mostly have a couple of springy plastic clips thet click the good firmly on to the lens. These do wear. I discovered that you can buy cheap reproductions of Canon hoods (doesn't need to be the same lens hood, I chose a wide angle one for cheapness) on ebay from china for £2 or less (!) Take care that the hood has the spring clips before ordering.
The clips can be farly easily removed and replaced - carefull use of a small flat screwdriver. The reproductions I got were a bit larger (see bottom left on 2nd photo) and make the hood rather too tightly attached, but a small amount of work with a fine file made them just perfect
IMAGE LINK: https://flic.kr/p/u4euip 5D3_3295.jpg by Go to photos/mdcaptures, on Flickr
My fairly old 70-200 f/2.8 hood occasionally accidentally rotated, giving unlepful vignettes. Because the hood really has to be reverse fitted to get in my bag, it does get a lot of wear and had become a bit loose.
I tried to find replacement clips on the internet but found nothing. Luckily I had an a second hand lens with a 3rd party hood. I tried one of the clips and - instant success! So I ordered another 3rd party hood