Something goes bad on Earth, ISS is cut from any kind of supply and the escape pods can't be used. If there are 2 people on board at that time, how long can they survive there? Did someone write a protocol for this type of situation?
The longevity of the crew in terms of water and air recycling, as far as I know, is the easy part. The true test is the caloric intake of the two inhabitants and the longevity of the ISS itself.
The largest issues are:
Food & water - there will be a limited supply for the inhabitants and once the food and water are used up (water is also used to generate oxygen via electrolysis) there is no way to get more, assuming your dire situation continues with the Earth. This aspect depends on how much food and water is/was stocked at the time of the crisis and how well the two ration these resources.
Orbit - perhaps the largest issue hindering long term survival in the ISS would be that the space station is constantly losing altitude. The orbital path of the space station is roughly 370 km (average between min and max altitude ranges) and loses roughly 100 m of altitude per day. Currently the space station is "boosted" back up to a higher orbit periodically by the Soyuz and the Zvezda module's 2 main engines (formerly by the Space Shuttle when it was still in service). Without those constant visits and the ability of the Zvezda module, it is only a matter of time before the ISS will de-orbit itself.
Possible solution to the Orbit issue: NASA signed a deal with Ad Astra to test out the VASIMR (basically a electromagnetic thruster) which could make boosting the space station easier and cheaper, but that is not slated to join the ISS until 2015.
The state of supplies on the ISS changes over time. Right at the end of the Shuttle era, they stockpiled lots of hardware, clothes, food and water supplies. But most specifically they made sure that large hardware components, that were replaceable, were left on station, since the Shuttle was uniquely qualified to carry them.
Over time, they have drawn down that reserve, and then replenish parts of it via Dragon, Progress, Cygnus, ATV, and HTV launches.
The current state of supplies thus fluctuates over time.
Water is an interesting consumable. The Shuttle which used fuel cells for power, would produce excess water while on station, and they would spend much of the flight transferring the water. With the absence of the shuttle visiting the station, more water needs to be brought on cargo flights to cover that lack.
We've seen several failures of reupply missions. When a Progress launch failed on 28 April 2015, this is what NASA said:
In a presentation to a NASA Advisory Council panel here April 8, NASA officials said food supplies on the ISS would reach a threshold called “reserve level” on July 24, and go to zero on Sept. 5. That assumed that the station received no more supplies beyond a SpaceX Dragon cargo mission launched to the station in April.
The other major limiting consumable is a solid waste container known by the Russian acronym KTO. Without additional cargo missions beyond the Dragon flight, KTO supplies would reach the reserve level July 20 and be exhausted on Sept. 2. Other consumables, including water, would not reach reserve levels until later in the year or early 2016.
This was with 6 crew on board for most of the time, reducing to 3 for about a month in June-July. Rounding up to 6 people for 4 months, should be enough for 2 people for 1 year.
After another failure (Antares Orb-3, on Oct 28, 2014), NASA indicated the station had about 6 months of supplies left.
So NASA has a pretty good idea of supply levels at all times, and has planned for the failure of resupply missions.
Survival of the ISS in a doomsday scenario is rather a different situation, though. I'm having a hard time imagining a scenario that would render Earth uninhabitable for 1 year, and safe after that. I.e. if the entire Earth becomes uninhabitable, it'll stay that way for much longer.
Neal Stephenson's novel Seveneves uses the ISS as a lifeboat in such a scenario. But in his story, there's enough advance warning to make the ISS livable for as long as it needs to be (not being more specific to avoid spoilers).