  We extend a general maximum likelihood foreground estimation for cosmic
microwave background polarization data to include estimation of instrumental
systematic effects. We focus on two particular effects: frequency band
measurement uncertainty, and instrumentally induced frequency dependent
polarization rotation. We assess the bias induced on the estimation of the
$B$-mode polarization signal by these two systematic effects in the presence of
instrumental noise and uncertainties in the polarization and spectral index of
Galactic dust. Degeneracies between uncertainties in the band and polarization
angle calibration measurements and in the dust spectral index and polarization
increase the uncertainty in the extracted CMB $B$-mode power, and may give rise
to a biased estimate. We provide a quantitative assessment of the potential
bias and increased uncertainty in an example experimental configuration. For
example, we find that with 10\% polarized dust, tensor to scalar ratio of
$r=0.05$, and the instrumental configuration of the EBEX balloon payload, the
estimated CMB $B$-mode power spectrum is recovered without bias when the
frequency band measurement has 5% uncertainty or less, and the polarization
angle calibration has an uncertainty of up to 4$^{\circ}$.
