At least nine people died after Boko Haram militants launched a major attack on a Nigerian military base in northeastern Buni Yadi town, officials said.