The vote was unanimously passed, an AFP reporter in the senate said.
The changes to the constitution will now be put to a national referendum, widely expected to be passed with little outspoken opposition.
"If I ran again, I would do more of what I am doing to improve the well being of the citizens of Rwanda," Kagame said Tuesday, in a message posted on the presidential Twitter account.
The lower house passed the amendments earlier this month.
Lawmakers voted unanimously to approve cutting presidential terms from the current seven to five years, and maintain a two-term limit.
But an exception was made for Kagame, who would be allowed to run for another seven-year term after his current mandate ends in 2017.
After those seven years, he could then potentially run for another two terms of five years each, which would extend his rule to 2034.
Minor changes made by senators will now return to the lower house for voting, but those do not include the key sections related to the possible extension of Kagame's rule.
Kagame has run Rwanda since his rebel army ended the 1994 genocide and ousted Hutu extremists.
He won elections in 2003 and 2010 and, under the current law, is due to step aside in 2017 at the end of his second term.
Earlier this year, more than 60 percent of voters signed a petition calling for constitutional changes to be drafted that would allow Kagame to stand again.
Kagame's aides have insisted that any bid for a third term would be in response to "popular demand" that he stay in power.
Supporters portray Kagame as a guarantor of post-genocide stability and the economic growth that has transformed the country over the past 20 years.
But critics say the move is orchestrated by a government and leader with an iron grip on a country where freedom of expression is severely curtailed, and part of a wider trend of African leaders seeking to stay put.
Rwanda is the northern neighbour of Burundi, where this year President Pierre Nkurunziza gained a third consecutive term despite months of protests and an attempted coup.