Let Y=(Y-t)(t greater than or equal to 0) be an unobserved random process which influences the distribution of a random variable T which can be interpreted as the time to failure. When a conditional hazard rate corresponding to T is a quadratic function of covariates, Y, the marginal survival function may be represented by the first two moments of the conditional distribution of Y among survivors. Such a representation may not have an explicit parametric form. This makes it difficult to use standard maximum likelihood procedures to estimate parameters - especially for censored survival data. In this paper a generalization of the EM algorithm for survival problems with unobserved, stochastically changing covariates is suggested. It is shown that, for a general model of the stochastic failure model, the smoothing estimates of the first two moments of Y are of a specific form which facilitates the EM type calculations. Properties of the algorithm are discussed.