We obtain a general solution and solve the Hyers--Ulam stability problem for the general quadratic functional equation $$ f(x+y+z)+f(x-y)+f(x-z)=f(x-y-z)+f(x+y)+f(x+z). $$