It's widely assumed that Dovid HaMelech was the head of the Sanhedrin; see, for example, Kesef Mishneh in the beginning of Rambam's introduction to Yad HaChazaka. However, the Gemara in Berachos 4a implies that this position was held by Binayahu ben Yehoyada -- Rashi there says he was the אב בית דין. How are these reconciled? In any case, is there a source in Chazal for the assumption that Dovid HaMelech was the head of the Sanhedrin?
This post, on the Avodah list, cites Kol Mevasser (1:76)* who asks for Kesef Mishneh's source, as well as the related question of how David could have been a member of the Sanhedrin anyway (whether as its head or not).
R. Chaim Kanievsky (BeShaar HaMelech) points out that not only Benayahu, but several of David's other contemporaries, are described as heads of the Sanhedrin - including Yoav ben Tzeruyah and Shim'i ben Gera. He suggests, then, that they may have been heads of their tribes' Sanhedrins rather than of the national one. (Presumably, though, this answer wouldn't work for Benayahu and David, since the context in Berachos there is that Benayahu was being consulted as the head of the national Sanhedrin, they being the ones who can authorize optional wars.)
* The post says "Kol HaMevasser," but the correct name of the sefer is without a hei: it's a collection of responsa by R. Meshulam Roth.