Supreme court has upheld that some things can be banned if they are in the interest of maintaining the security of a detention facility. Inmates shouldn't be receiving books on how to make bombs for instance.
This still does not equate to a ban on books as you have represented.