You might be interested in some previous threads on the topic of Osama bin Laden during the Soviet-Afghan War and the CIA's relationship with the matter:
A flaired user initially mistook the question as being about foreign fighters in Afghanistan (such as Osama bin Laden) and gives a broad overview of their role in the conflict.
This post is somewhat tangential to your question but gives a large amount of background knowledge on the relationship between the Mujahedin and the Taliban though it is very light on the topic of Osama bin Laden.