Your stock looks like a real USMC M40 stock, but something about the paint rubs me the wrong way. The paint color, paint condition, and areas painted all look a little off to me. But there's a huge difference seeing an item in photos and seeing the same item in person. I'd have to have it in hand and look it over to get a better idea of what the history might be. Photos can never show everything and differences in lighting can make things look quite different than how they look in person. Paint color is definitely something that needs to be seen in person.
The known Vietnam War era painted USMC M40 stocks appear to be a darker green color than your stock, but many hues of green paint were used during the war, so that's not a truly definitive characteristic. Even a photo of Chuck Mawhinney in Vietnam with an M40 shows a few different colors of paint on the rifle's stock.
The known painted M40 stocks are also in extremely rough condition. The jungles of Vietnam are unforgiving and reeked havoc on infantry equipment and weapons, so it's expected to see quite a bit of wear from use. The paint on your stock is mostly intact, with the exception of the cheekpiece comb and the underside of the forend. The paint on your stock is surprisingly resilient to wear/damage. It shows a lot of marks, but not many scratches/dents seem to go through the paint. If it is original Vietnam War era paint, then it's the most paint we've ever seen on an original USMC M40 stock.
Lastly, when 8541 Scout Snipers painted their stocks in Vietnam, they just hung the stock from a tree and coated the whole thing. As you can see from the photos below, the barrel channel, the receiver inletting, and the bottom metal inletting are all coated in paint. I highly doubt that the snipers were taping off these areas before painting the stock. If they didn't want something painted, they didn't include it with the hanging stock. They would have also purposefully painted these areas because the paint could act as another level of waterproofing the stock, so it makes sense for the snipers to completely cover the wood stock with paint. The snipers didn't paint the M40's barreled action and bottom metal, so those were removed. The sling swivels and buttplate were left on the stock when it was painted. The only wood on the stock that should be left unpainted is under the buttplate. This is the thickest part of the stock and the furthest away from the barreled action, so it didn't matter much if this area had some water penetration. The main concern was waterproofing around the barreled action so that the wood in this area wouldn't swell/warp and affect the rifle's zero and accuracy.
Your stock doesn't have the receiver and bottom metal inletting painted, which seems very strange to me. Also, the bedding material in your stock is very strange. The color is different than the bedding in all the original M40 stocks I've owned, and the bedding material acting as the barrel pad on your stock is extremely crude. The color of the bedding should be a dark greenish color, not that orange-tan that your stock has. Your bedding material looks more like the Bisonite bedding material that's used on the USMC M70 marksman stocks. Some of the bedded M40 stocks I've owned didn't have a barrel pad made out of bedding material (the recoil lug inlet was bedded and it stopped there). Other bedded M40 stocks I've owned have a barrel pad made out of the bedding material, but it was extremely clean and squared off. Obviously great care was taken in making it, and this can even be seen on the painted war used M40 stock in the photos below. On your stock, however, the bedding material that makes up the barrel pad is extremely crude, and just kinda smeared on without any thought towards it actual function.
If I had to guess, I'd say that your stock is a legit USMC M40 stock, but it was bedded and painted after the Vietnam War. I don't think those are actual war used modifications, especially since they're so different than what's on known stocks and the paint lacks the waterproofing functionality. Even though the Bisonite bedding is the same as the M70 stocks (and not the other M40 stocks), it wasn't just the Marines using that material in their rifles. So, who knows if your stock was bedded/painted by the Marines, it could easily be done in the civilian world.
One thing to consider is the prevalence of faked war items over the decades and even centuries. Look at all the real WWI and WWII helmets out there with fake paint on them, shit like that is everywhere. So, it stands to reason that it's very possible that the same thing could happen to a real M40 stock. I want to make it very clear that I'm not saying that your stock's bedding material and paint is fake, but we need to consider ALL options. Your stock isn't like any of the others I've documented, and I've had a large enough sample size to show specific patterns of usage. So, something is going on with it. It could be something new or it could be completely fabricated. More study needs to be done to help make a distinct determination, but right now, from what I've seen in the photos, there's a few major red flags that can't be ignored. It does appear to be a real M40 wood stock though, the bedding material and paint is what's in question.
View attachment 8298562
View attachment 8298563
View attachment 8298564
View attachment 8298565
View attachment 8298566
View attachment 8298567
Here's photos of another real Vietnam War painted USMC M40 stock that I found online. This clone build belongs to another collector and I think this stock is the same painted M40 stock that sold on Gunbroker many years ago. Notice the color and condition. I might have more photos of this stock somewhere, I was bidding on it when it went up for sale a long time ago. I can't remember for certain, but I'm pretty sure that the receiver and bottom metal inletting areas are also painted (like the stock in my possession above).
View attachment 8298569
View attachment 8298568