I think Sonny was Vito's underboss. It's clear that he's in charge when Vito is not around. In the novel Sonny makes his name for himself as a caporegime when his father is shot during the thirties and later on it's stated his father is considering making him formal underboss.

Of course an underboss can always be passed over.

As far as Fredo being underboss either he was given the title to pacify him or the FBI or the informants got it wrong. Although Fredo evidently has men who report to him it's clear that Michael does not trust him with much. Fredo has no authority over Tom, Rocco or Neri. Michael was so controlling and hands on as boss that he didn't really need or use an underboss.


"When the snows fall and the white winds blow, the lone wolf dies but the pack survives."
Winter is Coming

Now this is the Law of the Jungleā€”as old and as true as the sky; And the wolf that shall keep it may prosper, but the wolf that shall break it must die.
As the creeper that girdles the tree-trunk, the Law runneth forward and back; For the strength of the Pack is the Wolf, and the strength of the Wolf is the Pack.