well according to this article it is legal to carry a firearm in national parks if you have a carry permit. The other aspect of this is multiple state jurisdictions that recognize that permit and poaching laws (which you would not be protected from if you killed an animal in self defense).
http://www.bestutahlawyer.com/blog/2...fire-them.html
The article also mentions that a better way is just to travel in a larger group, make lots of noise, and carry some pepper spray. This is just a good general rule of thumb.
But this thread is a good reminder to practice common sense and safe hiking practices when traveling in wilderness with large predators to avoid tragedies such as this one.
-S