In this paper, we prove the existence of nontrivial unbounded domains $Omegasubsetmathbb{R}^{n+1},ngeq1$, bifurcating from the straight cylinder $Btimesmathbb{R}$ (where $B$ is the unit ball of $mathbb{R}^n$), such that the overdetermined elliptic problem begin{equation*} begin{cases} Delta u +f(u)=0 &mbox{in $Omega$, } u=0 &mbox{on $partialOmega$, } partial_{ u} u=mbox{constant} &mbox{on $partialOmega$, } end{cases} end{equation*} has a positive bounded solution. We will prove such result for a very general class of functions $f: [0, +infty) to mathbb{R}$. Roughly speaking, we only ask that the Dirichlet problem in $B$ admits a nondegenerate solution. The proof uses a local bifurcation argument.