Controlled substances are drugs that are regulated by state and federal laws. These laws aim to control the danger of addiction, abuse, physical and mental harm, the trafficking by illegal means, and the dangers from actions of those who have used the substances. Generally such drugs are declared illegal for sale or use. However law permits authorized possession of a controlled substance under certain circumstances like when it is dispensed under a physician's prescription.
There are state specific laws on the subject.
Example of state statutes (Colorado and Ohio ) on authorized possession of a controlled substance
C.R.S. 18-18-413:Authorized possession of controlled substances
A person to whom or for whose use any controlled substance has been prescribed or dispensed by a practitioner may lawfully possess it, but only in the container in which it was delivered to him unless he is able to show that he is the legal owner or a person acting at the direction of the legal owner of the controlled substance. Any person convicted of violating this section commits a class 1 petty offense
In Ohio, possession or control of controlled substances is authorized in the following instances and subject to the following conditions:
ORC Ann. 3719.09 When possession of controlled substances is authorized
(A) Possession of controlled substances in the course of business by a manufacturer, wholesaler, licensed health professional authorized to prescribe drugs, pharmacist, category III terminal distributor of dangerous drugs, or other person authorized to possess controlled substances under this chapter or Chapter 4729. of the Revised Code;
(B) Possession by any person of any schedule V narcotic drug exempted under section 3719.15 of the Revised Code, where the quantity of the drug does not exceed one hundred thirty milligrams of opium, thirty-two and five-tenths milligrams of morphine or any of its salts, two hundred sixty milligrams of codeine or any of its salts, one hundred thirty milligrams of dihydrocodeine or any of its salts, or thirty-two and five-tenths milligrams of ethylmorphine or any of its salts, or, in the case of any other schedule V controlled substance or any combination of narcotic drugs, where the quantity does not exceed in pharmacologic potency any one of the drugs named above in the quantity stated;
(C) Possession by any person of any controlled substance that the person obtained pursuant to a prescription issued by a licensed health professional authorized to prescribe drugs or that was obtained for the person pursuant to a prescription issued by a prescriber, when the drug is in a container regardless of whether the container is the original container in which the drug was dispensed to that person directly or indirectly by a pharmacist or personally furnished to that person by the prescriber;
(D) Possession in the course of business of combination drugs that contain pentobarbital and at least one noncontrolled substance active ingredient, in a manufactured dosage form, the only indication of which is for euthanizing animals, or other substance that the state veterinary medical licensing board and the state board of pharmacy both approve under division (A) of section 4729.532 [4729.53.2] of the Revised Code, by an agent or employee of an animal shelter who is authorized by the licensure of the animal shelter with the state board of pharmacy to purchase and possess the drug solely for use as specified in that section. As used in this division, "in the course of business" means possession or use at an establishment described in a license issued under section 4729.54 of the Revised Code, or outside that establishment when necessary because of a risk to the health or safety of any person, provided that the substance is in a quantity no greater than reasonably could be used to alleviate the risk, is in the original manufacturer's container, and is returned to the establishment as soon as possible after the risk has passed.