1st, define "drilling mud". That, can mean anything. Normally, back in the day anyway, drilling mud was a mixture of
a. fresh water (I didn't say potable water)
b. natural Wyoming benonite (a type of clay used for viscosity changes--makes the mud thicker when added to water)
c. Barite, for adjusting the weight/gal of the mud. Proper name is Baryte--it's a natural ore, processed and ground to a fine powder--chemically inert.
d. possibly some thinners or de-flocculants in case the mud starts getting too thick from the material being drilled (lignite, plant tannins, lignosufonates, and synthetic polymers)
e. Some surfactants, wetting agents, lubricants, defoamers, or corrosion inhibitors. Very little of each or any of these are used --a pretty minor concern overall.
f. Some bridging materials--helps build up wall cake on the sides of the wellbore. The ones I remember are wood by products, and paper--cellulose fibers. Calcium Carbonate too--ground oyster shells.
f1. Might be some lost circulation material left in the old mud too--ground walnut shells, chopped up paper, mica--most of that gets stuck to the wall of the hole, or is cleaned out in the mud cleaning equipment--natural stuff anyway.
Most of the above are 100% organic. Lignosulfonate for instance sounds scary but it is also used as a plasticizer in concrete, and is an ingredient in almost all sheetrock and stucco. You have some in your house I'm pretty sure.
Then you get into the man made ingredients.
g. Caustic soda beads and caustic potash to increase PH in the mud, soda ash to remove hardness in the mud, maybe some sodium chloride. Maybe some inorganic corrosion inhibitors, 02 scavenger--not much of this is used--trickled into a mud tan, not poured in by the barrel. In a barrel of used mud, these wold be in very low percentages--less than 1% I would guess.
h. depending where they were drilling, and what came out of the hole, might be some salt. Companies are supposed to check it for sodium content before letting it loose to be landfarmed.
Might also have some Black Magic type stuff in it, but they try to recoup that too. It's a black gooey stuff they pump down if the pipe is sticking. Very expensive.
Oil base mud is a different story. As far as I know, it isn't land farmed. It's so expensive, that the biggest majority of it is collected and recycled to use on another job.
Frac fluid--I don't know about.