The answer is 13. It has happened twice, once in a 10 inning game, and once in a 9 inning game.
The nine inning game was
Pete Schneider for the Cincinnati Reds on July 6th 1918 against the Philadelphia Phillies.
The Reds beat the Phillies 10-9 in regulation. Schneider gave upwas charged with 6 runs, all in the 9th failing to record an out. The reliever that followed him also failed to record and out. Fred Toney was finally able to come in and get the save. No play by play is available so the exact order of events is unknown.
What is for sure is that Schneider did give up 13 walks and still managed to take home the victory.
Retrosheet also has the box score here