All kinds of bad things can happen around brick chimneys. In fact, there are far too many to cover in this story. Flashing around chimneys can rust through if it’s galvanized steel, especially at the 90-degree bend at the bottom. A quick but fairly long-term fix is to simply slip new flashing under the old rusted stuff. That way any water that seeps through will be diverted.
The best fix, though, is to cut a saw kerf into the mortar and install new flashing. If you want to see what’s involved, search for “chimney flashing” at familyhandyman.com.