This is a solved problem and has been for years. The last time I went to Yellowstone we rented bear spray.