At the break Azhar Ali (nine) and Shan Masood (three) were at the crease with Pakistan still needing another 302 runs to win the match and level the two-match series.
Sri Lanka had won the first Test by 21 runs in Abu Dhabi.
Aslam, dismissed off a no-ball by pacer Lahiru Gamage, failed to take advantage of the chance as two balls later he was out for three to the same bowler.
Earlier, paceman Wahab Riaz grabbed 4-41 and left-arm spinner Haris Sohail took 1-3 to dismiss Sri Lanka for 96 in their second innings after they resumed at 34-5.
More From This Section
Pakistan needed early gains and Riaz provided them with the important wicket of Niroshan Dickwella in the fifth over of the day for 21.
Leg-spinner Yasir Shah dismissed Dilruwan Perera for nought to leave Sri Lanka in danger of being dismissed for their lowest ever total of 71 against Pakistan.
But Kusal Mendis (29) and Rangana Herath (17) added 35 for the eighth wicket to frustrate Pakistan before Sohail struck thrice in his only over to give his team hope of an upset win.