The deal guarantees Allen, who has one more year on his current contract, will remain Carey Price's backup beyond the 2020-21 season.
The Canadiens acquired Allen from the St. Louis Blues for a third-round pick in September. The teams also swapped seventh-round picks in the deal. He will earn $4 million in salary this season.
The 30-year-old has a 148-94-26 career record over seven seasons, all with the Blues.