On paper it looks good, but in practice the rule of law in Vietnam is a fickle beast. Local officials interpret the law any way it suits them, often against the wishes of Hanoi. There is no independent judiciary. Not surprisingly, most legal disputes are settled out of court.
The country has a very serious problem with heroin and methamphetamine use and the authorities clamp down hard.
Marijuana and, in the northwest, opium are readily available. Note that there are many plain-clothes police in Vietnam and if you’re arrested, the result might be a large fine, a long prison term or both.
Few foreigners experience much hassle from police and demands for bribes from travellers are very rare. If something does go wrong, or if something is stolen, the police can’t do much more than prepare an insurance report for a negotiable fee – take an English-speaking Vietnamese person with you to translate.