In this paper, we propose a novel federated blockchain (FedChain)-based clustering protocol to enhance network security and connectivity in flying ad hoc networks (FANETs) with cell-free massive MIMO (CF-mMIMO). By leveraging blockchain technology and federated learning (FL), the cluster can be protected against Sybil attacks, enabling secure cluster formation without increasing the number of control packets. We formulate the cost function maximization problem based on cross-layer design, which integrates physical layer information (mobility, position, channel capacity, and remaining energy) and network layer parameters (connectivity) to optimize the formation of stable clusters with minimal control overhead. Furthermore, we select the optimal cluster heads (CHs) based on the highest remaining energy and velocity-constrained criteria, ensuring long-term stability. To solve the security issue, blockchain technology is adopted to validate transactions among nodes and ensure secure formation by distinguishing legitimate users and Sybil attack nodes. Additionally, we develop a novel FL framework to predict and distinguish node status in real time without additional control packets, improving security and control overhead performance during cluster formation. Simulation results demonstrate that the proposed FedChain-based clustering protocol outperforms the lowest ID (LI), high connectivity degree (HCD), and conventional blockchain-based clustering (CBC) protocols in terms of connectivity, control overhead, and security performance. The results highlight that the FedChain-based clustering protocol provides robust security and connectivity, making it well-suited for dynamic FANET environments.