This cavity can be filled, but the top 6" must be filled with a Cerwood gasket to allow for expansion.
This area can also be filled as an option with a mix of Perlite and Portland Cement. This would act as an insulator and as well stabilze the flue. A Pipe cap is installed at the top of the masonry with a Pipe Collar.