All drugs except miraa (a leafy shoot chewed as a stimulant) are illegal in Kenya. Marijuana (commonly called bhang) is widely available but illegal; possession carries a penalty of up to 10 years in prison. Dealers are common on the beaches north and south of Mombasa and frequently set up travellers for sting operations for real or phoney cops to extort money.
African prisons are unbelievably harsh places – don’t take the risk. Note that miraa is illegal in Tanzania, so if you do develop a taste for the stuff in Kenya, you should leave it behind when heading south.