What is the maximum holding time? When arriving at a busy airport, airliners may be stacked in holding patterns, increasing flight time. I know airliners are required to carry extra fuel in case of rerouting (including a safety margin).

Once in holding pattern, aircraft may be reordered (not as simple as a FIFO), thus some aircraft may stay longer in their holding pattern.

Is there a legal maximum time an aircraft can stay in an holding pattern? If needed, the question may be narrowed to EASA and FAA regulations.
No, there is no limit. Aircraft stay as long in holding patterns as they have fuel on board.