For on-campus housing, widows/widowers can remain for life. [1] There are other off-campus housing programs that only give 10 years after the death of the qualifying spouse.
That's good news. There was a lot of drama in the late 90s when I lived there, because a widow was being kicked out of a house on Santa Ynez. I'd guess that was on-campus and maybe the reason for a change.
1: https://stanfordfsh.prod.acquia-sites.com/sites/default/file...