Every time the Bills blew an opportunity — and they blew plenty — the 49ers capitalized.
Backup quarterback Colin Kaepernick, who ran for 39 yards on four carries, fumbled on an end-around and Buffalo took over at its own 17. Two plays later, Patrick Willis stripped Scott Chandler, San Francisco recovered and Smith floated a 28-yard touchdown to Crabtree to put the 49ers in front 17-3 with 24 seconds to go before the half.
"We have to figure out what in the world is going on from the first guy to No. 11 on defense," said defensive end Mario Williams. "It's all on us."
A holding penalty on Buffalo's Jairus Byrd wiped out a punt return Leodis McKelvin took for a touchdown in the first quarter. The offense failed to score any points after McKelvin returned a kickoff 59 yards. And after a 12-play, 75-yard drive that took nearly 6 minutes stalled in the second quarter, Lindell kicked a field goal for Buffalo's only score.
Smith led another touchdown drive that featured Kaepernick gaining 15 yards on a sweep and ended one play later when Gore dove over the pile for a TD that extended San Francisco's lead to 24-3.
Chris Culliver intercepted an underthrown pass by Fitzpatrick just shy of the goal line to end Buffalo's best chance to reach the end zone all afternoon.
Smith also tossed a 10-yard TD pass to Mario Manningham, Kaepernick ran 16 yards for a score and Anthony Dixon added a 3-yard run for the final touchdown.
Buffalo, which snapped an eight-game road losing streak with a Week 3 win at Cleveland, started a string of four five on the road with another setback. The Bills will practice in Arizona next week to get ready for the Cardinals instead of traveling back East, similar to what the 49ers just did staying in Ohio between games at Minnesota and New York.
"After last week, I would have bet anything that we wouldn't have come out and played like this," linebacker Nick Barnett said. "It's disappointing and deflating. It's very stunning. I would not have ever imagined being in this situation with this defense."
NOTES: Buffalo allowed 500 yards in consecutive games for the first time in franchise history. ... Williams wore a small stabilizer on his left wrist instead of the brace he had the first four weeks. He appeared to grimace after a few plays. "It's good one day, and bad the next day," said Williams, who had two tackles and no sacks. ... Byrd injured a chest muscle, and Bills OL Chad Rinehart hurt his calf in the second half and didn't return. Both are day to day.
Antonio Gonzalez can be reached at: www.twitter.com/agonzalezAP
Online: http://pro32.ap.org/poll and http://twitter.com/AP_NFL