One other thing to note about dissertations in particular is that most PhD students reach a point in their writing/research when they absolutely, positively, 100% can't stand to write one more sentence or think about their topic for one second more...but they haven't finished.
My husband is at that point in his dissertation now, and he still has one chapter left to write, plus the introduction and conclusion, plus editing what he's already written.
If you ask him about his dissertation topic, you'll probably either get a total non-answer because he absolutely does not want to think about it one second more than he has to, or you'll get a rant about how sick of it he is. It kind of depends upon his mood or how well he knows you. He doesn't even like talking about it to me, even though I've read some of his dissertation and discussed the general topic with him continuously over the years. He'd usually rather talk about something, anything else.
I don't think it's a rude question to ask, as long as you don't pursue the topic without a clear indication that the person wants to talk about his/her research, but it is very much "ask at your own risk."
For someone who is earlier in the process of writing, they might have a desire to talk about their research, because they'll still be somewhat excited about it, and may still be working out exactly what they want to research (which is a stage where talking it out can be very helpful for people).
This is probably true for master's degree students as well, but I would imagine it's to a somewhat lesser degree. The average thesis is the length of like an article in an academic journal (so a very long paper), while a dissertation is equivalent to a book. Master's degrees don't take as long, in part because a thesis is shorter than a dissertation (and so typically requires less depth and breadth of research, as well as being somewhat faster to write), while a PhD rarely takes less than 5 years to complete, and often takes substantially more time.